Sign in to follow this  
Followers 0
dixonpete

EzMySQL UDF question

3 posts in this topic

I'm trying to use the _EzMySql_Exec function to send a SOURCE command to MySQL so I can load some data from a MySQLDUMP'd file. It doesn't seem to want to go and get an error on that line even though I have permission for the logged in user.

Here's the code:

; this should work but doesn't. Source commmand not supported by the MySQL UDF library?

if Not _EzMySql_Exec("SOURCE " & StringReplace( @TempDir, "\", "/", 0) & "/delphi.sql") Then

MsgBox(0, "Error loading delphi database", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg())

Exit

EndIf

Issuing the equivalent command from the MySQL box works fine. Everything else seems to work ok.

Share this post


Link to post
Share on other sites



I'm trying to use the _EzMySql_Exec function to send a SOURCE command to MySQL so I can load some data from a MySQLDUMP'd file. It doesn't seem to want to go and get an error on that line even though I have permission for the logged in user.

Here's the code:

; this should work but doesn't. Source commmand not supported by the MySQL UDF library?

if Not _EzMySql_Exec("SOURCE " & StringReplace( @TempDir, "\", "/", 0) & "/delphi.sql") Then

MsgBox(0, "Error loading delphi database", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg())

Exit

EndIf

Issuing the equivalent command from the MySQL box works fine. Everything else seems to work ok.

Seems one has to read the file line by line and submit it via the EZMySQL_Exec function. All is well.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

_EzMySQL_Exec is able to execute multiple queries, so try it :mellow: It should be possible to simply pass the whole file content when it fits into the string.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
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
Sign in to follow this  
Followers 0