Jump to content

MySQL Load Data query


Recommended Posts

Hi, I am trying to use the query below. It used to work fine but today it doesn't work. The only thing I did was that I dropped the table and re-created it with a different name. But I did change the name of that table in the below query.

I have checked the sql server and everything seems to be running fine. The connected to the sql works fine. It's only when I am trying to load data. Mysql is running on ubuntu and I am using win7.

_Query($sql, "LOAD DATA local INFILE 'C:db_temp.txt' INTO TABLE temp_tbl lines terminated by 'n'")

And here is the error message I get

C:Program FilesAutoIt3IncludeMySQL.au3 (48) : ==> The requested action with this object has failed.:
Return $oConnectionobj.execute ($sQuery)
Return $oConnectionobj.execute ($sQuery)^ ERROR
>Exit code: 1   Time: 0.464

My text file looks like this

12345678912345
46465465456415
89748756413212
58446468978941

Any ideas?

Edited by Jat421
Link to comment
Share on other sites

I got it working, changing "" to "/" in the file name seem to have worked. It makes sense as mysql is running on linux. But the strange thing is that it worked before. Oh well as long as it works ;) Thanks!

Edited by Jat421
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...