版块 > 技术问题 > 怎么连接sql server
消息:
2
怎么连接sql server
消息:
29

ConnectionNum是整数型

ConnectionNum=SQl连接("server","username","password","database","OLEDB",hOLEDB.SQLServer)

如果ConnectionNum不等于0,那么

// The connection was successful

信息("The connection was successful")

SQL执行("SELECT* FROM Makino","QRY1")

跟踪(SQL信息("QRY1"))

否则

// The connection failed: displaying an error message

SQL信息()

错误("The connection to the data source failed."+回车+...

"Error code: "+SQL.错误+回车+SQL.错误消息)

结束

// In any case (connection OK or not)

SQl断开连接()

535544858
    统计
    注册会员总数: 379
    论坛帖子总数: 1049