Im trying to create an app which allows user to import txt files into a MySQL db.
Im using a THandle to run a MySQL routine called mysqlimport. and then i want to run a query to select the imported data.
If i step through my app everything runs fine. The data is imported and the refresh works ok. but if i let the app run normal speed it doesnt work. its as though it trys running the refresh code before the the import code has finish. Can this type of thing happen???? is there any way to stop the refrdh code running until the import code has stopped?????
Below is my current code.
ProgramHandle := THandle
cmdFile := String;
// cmdFile = import command
ProgramHandle := WinExec(PChar(cmdFile),SW_Hide);
query1.close;
query1.open;
Thanks
Im using a THandle to run a MySQL routine called mysqlimport. and then i want to run a query to select the imported data.
If i step through my app everything runs fine. The data is imported and the refresh works ok. but if i let the app run normal speed it doesnt work. its as though it trys running the refresh code before the the import code has finish. Can this type of thing happen???? is there any way to stop the refrdh code running until the import code has stopped?????
Below is my current code.
ProgramHandle := THandle
cmdFile := String;
// cmdFile = import command
ProgramHandle := WinExec(PChar(cmdFile),SW_Hide);
query1.close;
query1.open;
Thanks