Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by zazzi

  1. zazzi

    Correct Connection String VFP to MariaDB

    They deal with the possibility to send to MariaDB multiple lines with TEXT....ENDTEXT and use the LOAD DATA LOCAL INFILE command to upload a csv file into a MariaDB database table. See...
  2. zazzi

    Correct Connection String VFP to MariaDB

    If this can help here is my connection working perfectly on my Win11 local development MariaDB: cConnectionString = "DRIVER={MariaDB ODBC 3.2 Driver};" ; + "SERVER=127.0.0.1;" ; + "PORT=3306;" ; + "OPTION=67108864;" ; + "UID=[put your userid here];" ; + "PWD=[put your...
  3. zazzi

    Query returning memo fields instead of strings ( MariaDB )

    You can use CAST() to force the output field type e.g. in SQL passthrough: SELECT CAST(field_returned_as_memo AS VARCHAR(100)) field_returned_as_varchar from MyTable
  4. zazzi

    numeric equivalent of space() in select

    You can put null as I showed above or any value you like, try: SELECT custno, SPACE(3) as type, SPACE(10) as bill_stat, CAST(null as n(5,2)) as numbs from test123 WHERE resto='5103' SELECT custno, SPACE(3) as type, SPACE(10) as bill_stat, CAST(123 as n(5,2)) as numbs from test123 WHERE...
  5. zazzi

    numeric equivalent of space() in select

    You may use: SELECT custno, SPACE(3) as type, SPACE(10) as bill_stat, 000.00 as numbs from test123 WHERE resto='5103' or SELECT custno, SPACE(3) as type, SPACE(10) as bill_stat, CAST(null as n(5,2)) as numbs from test123 WHERE resto='5103' if you like to have a default null value
  6. zazzi

    I would like to compute how many minutes or hours the employee left work by comparing two records

    Examples: ? ALLTRIM(STR(CTOT('21/01/2025 18:00:00') - CTOT('21/01/2025 17:00:00'))) + ' seconds' ? ALLTRIM(STR((CTOT('21/01/2025 18:00:00') - CTOT('21/01/2025 17:00:00')) / 60)) + ' minutes' ? ALLTRIM(STR((CTOT('21/01/2025 18:00:00') - CTOT('21/01/2025 17:00:00')) / 60 / 60)) + ' hours' Adjust...
  7. zazzi

    Sending multiple commands to MySql backend through TEXT...ENDTEXT

    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...
  8. zazzi

    Sending multiple commands to MySql backend through TEXT...ENDTEXT

    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...
  9. zazzi

    Sending multiple commands to MySql backend through TEXT...ENDTEXT

    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...
  10. zazzi

    Sending multiple commands to MySql backend through TEXT...ENDTEXT

    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
  11. zazzi

    Sending multiple commands to MySql backend through TEXT...ENDTEXT

    Thanks Joe, I tried but it did not work, I see GO is a command specific to MS SQL server but not allowed for MySql.
  12. zazzi

    Sending multiple commands to MySql backend through 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...
  13. zazzi

    can I import MS Access files into VFP 7.0?

    ...forgot the important thing! I used it with VFP8... Maurizio Zazzi
  14. zazzi

    can I import MS Access files into VFP 7.0?

    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...
  15. zazzi

    Some questions about alter table and column

    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

Part and Inventory Search

Back
Top