Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with procedure

Status
Not open for further replies.

stanfran

Programmer
Dec 26, 2000
1
US
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...

Hope this helps...
Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top