Hi guys im running vb 2008 express edition what im trying to do
a bulk insert into sql table,how would i go about doing this.
The file im trying to load is a text file that has a name and number so it would be to columns.
Printable View
Hi guys im running vb 2008 express edition what im trying to do
a bulk insert into sql table,how would i go about doing this.
The file im trying to load is a text file that has a name and number so it would be to columns.
I'm not quite sure how would you go an insert a txt file.I thought you were looking to insert the text file in SQL and not it's columns but i think you want the columns inserted since you said bulk.
if you file isn't formatted somehow then i'm not sure how would you know where the columns begin and end.You could try to make it a CSS file.Anyhow have a look at the bulk insert.
http://msdn.microsoft.com/en-us/library/ms188365.aspx
This is the sql statement im trying to use
BULK INSERT table5 FROM 'C:\Users\willi\Desktop\plays.txt' WITH (FIELDTERMINATOR='\t',ROWTERMINATOR=' ' )
like i said im using visual basic 2008 express and sql 2005 express
Im getting this error
http://i902.photobucket.com/albums/a...ll41/image.jpg
Can anyone help with this thanks will
This is the issue I had that I managed to resolve. Check out this thread http://www.vbforums.com/showthread.php?t=626932
The solution I found I copied the code there. There are other comments you may find useful.
Good luck.