Link to home
Start Free TrialLog in
Avatar of team2005
team2005

asked on

How to use LOAD DATA INFILE vb.net not local

Hi!

I am using this code today:

 Dim sSql As String = "LOAD DATA INFILE 'C:\\singel\\ordrehoder.txt' into table ordrer FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';"
 Call db_allaccess_nettlis(sSql)

That is working just fine on my local db.
But if i want to store the information on a internet server, i get this error message:

[MySQL][ODBC 5.1 Driver][mysqld-5.1.51-log]Access denied for user 'singelnett2'@'%' (using password: YES)

Cant i use LOAD DATA INFILE when my database i online ?

Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Are you running that command in the remote computer? Obviously the file is on your computer so remote computer wont be able to access it.
Avatar of team2005
team2005

ASKER

Hi!

Yes the file is on my computer.

How do i do this ?
You may want to either upload the file on the server and insert it or connect to the server from your computer (SQL Management studio) and insert it.
Hi!

This system is part of a client system.
So the LOAD... must be done from the system
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi!

Tryed that now, but now i get this error message

Table 'singelhbc2.ordrer dosent exist
That's a different error. The original problem is sorted now. Now make sure you are connecting to the correct database and that it has the mentioned table.
Thanks
Hi!

Mispelled ordrer
Changed to Ordrer, then it works :)
Glad to help :-)