程序简介
DbParm=ConnectString='DSN=dagang;UID=kantmis;PWD=kantmis'
Prompt=0
environment lenv_env // holds environment information
if ( GetEnvironment(lenv_env) <> 1 ) then
MessageBox( "Application: Open", &
"Unable to get environment information.~nHalting ..." )
halt
end if
SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "huachdb"//数据库名
SQLCA.ServerName = "WISCO-2300E1457"//服务器名
SQLCA.LogId = "administrator"//登陆名
SQLCA.AutoCommit = False//取消自动提交
SQLCA.DBParm = ""
connect using sqlca;
if sqlca.sqlcode <> 0 then
MessageBox ("不能连接到数据库", "可能是没上网或者没有安装数据库~n详细信息为:"+sqlca.sqlerrtext)
return
end if
立即下载
暂无相关下载资源~_~

PB中连接数据库的方法(TXT)
