Solved!
It seems adding OPTION 67108864 (MULTI_STATEMENTS) in the connection string OPTION parameter did the trick. In my last post I mentioned error 1050 but that was my fault (forgot to drop the fake table manually).
To summarize for all those who may benefit;
To enable multiple commands...
Thanks Chris,
The example was just an example, my commands are totally different but I used a couple of UPDATE statements just to make it clear to read... It is about dropping a table and building a new one as part of a routine maintenance.
I added option 67108864 (MULTI_STATEMENTS) in the...
It does not execute anything. It throws an error "[MySQL][ODBC 8.0(a) Driver][mysqld-11.5.2-MariaDB]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UPDATE table2`". So it seems it is reading the two commands...
Tom,
If I write this outside VFP (in an HeidiSql query window), it works (and definitely needs the ; )
UPDATE table1 SET column1 = 'aaa';
UPDATE table2 SET column1 = 'bbb';
but it does not work when sent by VFP within TEXT...ENDTEXT
I am successfully using TEXT....ENDTEXT to send single commands to a MySql backend. My question is whether it is possible to send multiple commands with one TEXT...ENDTEXT construct (probably not?). Example :
** connection to MySql already verified and labelled as "nH_LS"
The following works...
Just to say thet I recently used the MS program indicated by keepingbusy for a very large MDB with many tables also including memo fields and everything worked well.
You can use the program as is, just changing the name of the dbc to be created and probably a folder that will contain it...
Monika & Mike,
note that both ADD COLUMN and DROP COLUMN do support multiple fields:
ALTER TABLE myTable ADD COLUMN name c(2) ADD COLUMN name1 c(2) ADD COLUMN name2 c(2)
ALTER TABLE myTable DROP COLUMN name DROP COLUMN name1
Maurizio Zazzi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.