i am trying to write a procedure in transact-sql that will sweep through a directory of ascii files and import them into a table. The number of files and filenames are unknown. Any tips would be appreciated.
I'm sure there are multiple ways to do this, but you could create a DTS package using VBScript that uses ADO to read the binary data into a recordset and then updates the SQL Server table.
And, thinking about it a little more... you might also experiment with using sp_oacreate to instantiate an ADO connection object and also a recordset object inside the proc and use the sp_oamethod calls to invoke the needed functionality within these objects. You should at least have MDAC 2.5 on your server 7.0 machine, therefore, the ADO objects will be available to you.
I know I'm not giving you a coded solution (time constrained), but this should get you started...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.