Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Bulk Insert with VB6 app

Author  Topic 

pnh110
Starting Member

2 Posts

Posted - 2008-09-16 : 09:54:46
Thank you for the codes on the article "Using Bulk Insert to Load a Text File". I really like the sample on the Stored-Procedure. It works really well on my Query Analyzer; however, I have to load my text file locally on the C:\ drive of my SQL server in order for the query to work. Can you show me how to translate the following SQL command into VB codes? (EXEC ps_StudentList_Import 'C:\TxtFile2.txt',1,2)

Also, I would like to call (or execute) the stored-proceude from my VB app. and my "text" file is located on the client, not the server, please show me how to code it in VB. Thank you for your time.

Regards,
PNH.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-16 : 10:01:26
Try using UNC file path if you file is on client. To call stored procedure from VB refer below

http://www.nigelrivett.net/VB/VBExecSPSimple.html
Go to Top of Page
   

- Advertisement -