dixonpete Posted September 5, 2011 Share Posted September 5, 2011 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. Link to comment Share on other sites More sharing options...
dixonpete Posted September 9, 2011 Author Share Posted September 9, 2011 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()) ExitEndIf 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. Link to comment Share on other sites More sharing options...
ProgAndy Posted September 9, 2011 Share Posted September 9, 2011 (edited) _EzMySQL_Exec is able to execute multiple queries, so try it It should be possible to simply pass the whole file content when it fits into the string. Edited September 9, 2011 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now