Func _SQLConnect($DSN) ;连接数据库 $conn = ObjCreate("ADODB.Connection") ;首先要建立ADODB.Connection类 $RS = ObjCreate("ADODB.Recordset") ;创建记录集对象 ;$conn.Open ("driver={SQL Server};server=lacalhost;uid=sa;pwd=sa;database=DB_Class") $conn.Open("DSN=" & $DSN) ;使用open方法连接数据库 $RS.ActiveConnection = $conn ;设置记录集的激活链接属性来自$Conn EndFunc ;==>_SQLConnect
举报
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-24 03:40 , Processed in 0.076178 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.