1.数据查询
//mytans是连接数据库的事物对象
//数据库连接
mytrans=create transaction
mytrans.DBMS = "ODBC"
mytrans.AutoCommit = False //关闭自动提交数据库更新,另外mytrans.autocommit=true//开启自动提交数据库更新
mytrans.DBParm = "ConnectString='DSN=quality'"
connect using mytrans;
//以上一般在应用程序的open事件
//以下在窗口输入产品型号调出编号的代码:
string serialno0
string value
if sle_1.text="" then
messagebox("Information","没提供数据")
return
else
value=sle_1.text
end if
mytrans.autocommit=true//开启自动提交数据库更新
select serialno into :serialno0 from product_base where partno=:value using mytrans;
if mytrans.sqlcode=-1 then