初学 power builder 9.0 ----1

连接数据库:

SQLCA.DBMS = "MSS Microsoft SQL Server"

SQLCA.Database = "数据库名称"

SQLCA.logpass ="登陆口令" 

SQLCA.ServerName = "服务器名称"

SQLCA.LogId = "登陆用户名"

SQLCA.AutoCommit = False

SQLCA.DBParm = ""

connect using sqlca; 

IF SQLCA.SQLCODE=0 THEN

messagebox("系统提示","连接成功")

ELSE

messagebox("系统提示","连接失败")

END IF 

posted @ 2009-06-03 21:23  悍马奔野  阅读(232)  评论(0)    收藏  举报