PB9与SQLServer数据库连接

648 阅读1分钟

PB9与SQLServer数据库连接

  1. 点击数据库按钮

image.png

  1. 选择MSS Microsoft SQL Server->New Profile...

image.png

  1. 填写Profile name、Server、Login ID、Password、Database。

image.png

  1. 点击Preview->Test Connection,提示成功!

image.png

image.png

  1. 复制Database Connection Syntax,用于平常的数据库连接
SQLCA.DBMS = "MSS Microsoft SQL Server"
SQLCA.Database = "dxcy"
SQLCA.LogPass =  "sa"
SQLCA.ServerName = "."
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = ""

connect using SQLCA;
IF SQLCA.SQLCode = -1 Then
    Return -1	
End If

Return 1