////Ado
Dim StrCon As String
StrCon = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;" _
& "Initial Catalog=你的数据库名称;Data Source=" & 你的IP地址 & ";" _
& "Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;" _
& "Use Encryption for Data=False;Tag with column collation when possible=False"
dim AcSys as new adodb.connection
With AcSys
If .State = adStateOpen Then .Close
.ConnectionString = StrCon
.ConnectionTimeout = 30
.Open
End With
Dim StrCon As String
StrCon = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;" _
& "Initial Catalog=你的数据库名称;Data Source=" & 你的IP地址 & ";" _
& "Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;" _
& "Use Encryption for Data=False;Tag with column collation when possible=False"
dim AcSys as new adodb.connection
With AcSys
If .State = adStateOpen Then .Close
.ConnectionString = StrCon
.ConnectionTimeout = 30
.Open
End With
解决方案 »
- sqlserver2000 查询【简单的】
- 请教一个t-sql的时间函数
- bcp连接失败问题,高分急
- 求一SQL语句
- 请给个Analysis Service Sp3 的下载地址
- 如何SQL语句里面为创建的表,分配权限给某一用户?
- SQL Server备份问题总结
- ~~~~~~~~~~关于合计数据的问题!!_======请大师指教!!!!!!==80分,放出!!解决立马给分!!!!
- 为什么有这样的关系存在?
- 高手帮忙:如何得到Connection.execute cmdstring,adcmdstoredproc的执行情况?如:"2 lines affected"
- 恐怕学习SQL SERVER有遗漏。请大家尽量往这里帖上平时不常见的语句。。
- 关于SQL Server 2000中Datetime型数据的格式??
dim ar_tmp as new adodb.recordset
with ac_tmp
...
...
end withtxtSQL = "select 名称 from 学生表 where 号码='"& combobox.text &"'"
with ar_tmp
if .state=adstateopen then .close
.open txtSQL,ac_tmp,adopenkeyset,adlockreadonly
end withif ar_tmp.recordcount>0 then
text.text=ar_tmp!名称
else
text.text=""
endif
ar_tmp.close