home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,988 of 9,834   
   Jeff Shoaf to bspiteri@ozemail.com.au   
   Re: Sql Query   
   03 Jan 08 19:07:20   
   
   3e19642f   
   From: jeffshoaf@alltel.net   
      
   Try this:   
      
   itemNameSQL.executeSql(db,":work:SOHCal.DB")   
      
   bspiteri@ozemail.com.au wrote:   
   > 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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca