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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert into: load text file into Access table

Status
Not open for further replies.

ws1

Technical User
Dec 28, 2000
3
0
0
DE
I'm working on a console application to load the contents of a text file into an access table.(access 2002) The text file varies in records, but could be for example:50000 records.
the code to do so is:
Dim Conn As New OleDb.OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dest_db1)
Conn.Open()

Dim Comm As New OleDb.OleDbCommand("INSERT INTO assist([tool],[lot_cntr]) SELECT col1,col2 FROM [Text;Database=" & strexportpath & "\" & ";HDR=YES;FMT=DELIMITED].[ws_assist.txt]", Conn)
Comm.ExecuteNonQuery()

I have developed the application on a W2000 OS and it runs without any problems.
On a few XP systems ( home edition, but also professionell) it doesn't do the db transfer at all. On the other side on some XP labtops it is running.
The error coming up is ( translated:)
"for at least one parameter no value is given"

the contents of the text file is:
DV17, 2 ' 1st field = string
DV17, 3 ' 2nd field = integer
DV17, 5
DV17, 9
DV17, 12

When using the first field only, the db transfer works.
But when including e.g.: the second field it's failing.

I'm totally stuck any help is really appreciated.
Thanks in advance

 
I found the reason for the mismatch between W2K and XP
problem solved
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top