⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 book.sra

📁 pb所需编程技巧和事例
💻 SRA
字号:
$PBExportHeader$book.sra
$PBExportComments$Generated Application Object
forward
global type book from application
end type
global transaction sqlca
global dynamicdescriptionarea sqlda
global dynamicstagingarea sqlsa
global error error
global message message
end forward

global variables
string username
string LoginOk
end variables

global type book from application
string appname = "book"
end type
global book book

on book.create
appname="book"
message=create message
sqlca=create transaction
sqlda=create dynamicdescriptionarea
sqlsa=create dynamicstagingarea
error=create error
end on

on book.destroy
destroy(sqlca)
destroy(sqlda)
destroy(sqlsa)
destroy(error)
destroy(message)
end on

event open;// Profile book
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=book;UID=dba;PWD=sql'"
Connect Using SQLCA;
if sqlca.sqlcode=0 then
	open(w_main)
else
	messagebox("提示:","连接数据库出错!")
end if

end event

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -