1,076
社区成员
发帖
与我相关
我的任务
分享
string ERRORS, sql_syntax
string presentation_str, dwsyntax_str
sql_syntax = "SELECT emp_data.emp_id,"&
+ "emp_data.emp_name FROM emp_data "&
+ "WHERE emp_data.emp_salary > 45000"
presentation_str = "style(type=grid)"
dwsyntax_str = SQLCA.SyntaxFromSQL(sql_syntax, &
presentation_str, ERRORS)
IF Len(ERRORS) > 0 THEN
MessageBox("Caution", &
"SyntaxFromSQL caused these errors: " + ERRORS)
RETURN
END IF
dw_1.Create( dwsyntax_str, ERRORS)
IF Len(ERRORS) > 0 THEN
MessageBox("Caution", &
"Create cause these errors: " + ERRORS)
RETURN
END IF
//定义
transation sqlca_other
//使用时
if not isvalid(sqlca_other) then
sqlca_other = create transaction
end if
sqlca_other.DBMS = ''
...
...
connect using sqlca_other;
//不用时
if isvalid(sqlca_other) then
Disconnect using sqlca_other;
destroy sqlca_other
end if