![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have used sql queries in paradox events previoisly and had no problems, I now to use a new ODBC driver, the sql builder works fine. I have tried to put the code on a button and now the sql query fails. my code is as follows. Can anyone help me. It fails at the execute statment. var itemNameSQL SQL ViewName tableview db database tc1,tc2,tc3 Tcursor cus,sup,prt,so,sod Longint ar1 Array[] anytype dynalias Dynarray[] anytype endVar tc1.open("Update Integers.db") so = tc1.LastSalesOrder dynalias["USER NAME"] = "XX" dynalias["PASSWORD"] = "xxxxxx " db.open (":Altro Caliach:", dynalias) ; this will open the connection to the local table or SQL table via the alias itemNameSQL = SQL ; the following stores the SQL statement into the variable SELECT Omnis_sohfile.SOHCADS, Omnis_adrfile.ADRID, Omnis_sohfile.SOHSONO Omnis_sohfile.SOHCREF, Omnis_sohfile.SOHDATE, Omnis_sohfile.SOHDAQO, Omnis_sohfile.SOHCUSC, Omnis_adrfile.ADRCNAM, Omnis_adrfile.ADRADDR, Omnis_adrfile.ADRZIP, Omnis_adrfile.ADRTEL, Omnis_sohfile.SOHQVAD FROM OMNIS.ADRFILE Omnis_adrfile, OMNIS.SOHFILE Omnis_sohfile WHERE (Omnis_sohfile.SOHCADS = Omnis_adrfile.ADRID) and Omnis_sohfile.SOHSONO > '~so' endsql IF NOT executeSQL(db, itemNameSQL, ":work:SOHCal.DB") then MSGINFO("Sorry", "Did not work.") endif ViewName.open(":work:SOHCal.DB") ;displays the answer table Endmethod |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |