MySQL Forums
Forum List  »  Connector/ODBC

Re: Calling LOAD DATA INFILE by ODBC
Posted by: agussssss huesaa
Date: January 05, 2014 05:51AM

SOLVED!!!
I use the file directly from my computer and it works!

xSQL = "LOAD DATA local INFILE
'c:\\test.txt' INTO TABLE
temp FIELDS TERMINATED BY ';'"

It puts the file on the server and load data! I though that the file has to be in the server first!... It's easely than I thought... Great!



agussssss huesaa Wrote:
-------------------------------------------------------
> Hi from Barcelona,
> I'm trying to use the function LOAD DATA
> INFILE... If I use the sentence with MyPHPAdmin it
> Works PERFECT... But if I use the same command in
> Visual Basic with ODBC it translate my Path and
> not found the file to load. the code is:
>
> Dim rs As New ADODB.Recordset
> Dim con As New ADODB.Connection
>
> Dim xSQL As String
> xSQL = "LOAD DATA local INFILE
> '/home/user/public_html/ftp/test.txt' INTO TABLE
> temp FIELDS TERMINATED BY ';'"
> con.ConnectionString = "DRIVER={MySQL ODBC
> 5.2 ANSI
> Driver};SERVER=1.1.1.1;DATABASE=reyamaha_bd;UID=us
> er;PWD=pwdpwd" & ";"
> con.Open
> con.Execute (xSQL)
>
>
> I think than the ODBC connector tranlate the
> path to:
> '\home\user\public_html\ftp\test.txt'
>
> And this path not runs....
>
> Please, any help¿?¿?
>
> Thanks

Options: ReplyQuote


Subject
Written By
Posted
Re: Calling LOAD DATA INFILE by ODBC
January 05, 2014 05:51AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.