Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Paradox > Sql Query
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1309 of 1389
Post > Topic >>

Sql Query

by bspiteri@[EMAIL PROTECTED] Jan 2, 2008 at 10:24 PM

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
 




 1 Posts in Topic:
Sql Query
bspiteri@[EMAIL PROTECTED  2008-01-02 22:24:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sat Jul 5 18:21:51 CDT 2008.