My problem is a ASCII-file with fieldterminator=';', rowterminator='\n' and a header-line (Firstrow=2). The SQL-Server didn't find the header-line because in this line are no fieldterminators. How can I import this file looks like:
1. row: ****This is a test-file***
2. row: field1;field2;field3;field4;field5
Do u have DB manager cleint installed in ur machine... it have data management utility thru which u can import data easily.. and what u r saying about the header line, little bit confused is it the table feild names u r mentioning... take it off..... how can an automized thing identify it...
OK, any more infos:
I have installed the full sql-server, bat I have to import the file automaticly from my C++ programm. Therefor I have write a saved procedure, in wich the import and any other tasks will done. I can't use any manager for the import. The most problem is, that the sql-server checked first the fieldterminator and then the firstrow-value. But in my case there are no fieldterminators in the first line, wich I will not import.
I hope this informations helps for this problem.
my problem is, that I have to generate the insert-statement in a procedure. I can't use any managers or format files, because I don't know the file structur in design-time. During runtime I create the bulk insert statement with any parameters. In one time there are ";" for fieldterminators, in other times tabs and so on.
My bulk insert statement works fine, but if the first line don't have any fieldterminators, the import isn't correct.
The bulk insert statement havn't any ignore lines parameter, there is only the firstrow parameter.