数据库连接的问题

wangxj0600 2002-09-12 05:55:06
程序如下:
var recordSet = Server.CreateObject("ADODB.Recordset");
recordSet.ActiveConnection = connectString;
recordSet.Source = "SELECT * FROM userInformation where userIdentifier='" + userID + "'";
recordSet.CursorType = 0;
recordSet.CursorLocation = 2;
recordSet.LockType = 3;
recordSet.Open();
其中connectString是我定义的系统dsn。为什么会出错?
...全文
27 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangxj0600 2002-09-12
  • 打赏
  • 举报
回复
我用的是jscript,不需要用set。
阿泰 2002-09-12
  • 打赏
  • 举报
回复
你 这是什么语句?
用分号作结束符?
另:在ASP里使用SET来声明对象的
set recordSet = Server.CreateObject("ADODB.Recordset")
recordSet.ActiveConnection = connectString
recordSet.Source = "SELECT * FROM userInformation where userIdentifier='" + userID + "'"
recordSet.CursorType = 0
recordSet.CursorLocation = 2
recordSet.LockType = 3
recordSet.Open()
wangxj0600 2002-09-12
  • 打赏
  • 举报
回复
dsn 连接是成功的,不过在asp页面里进不去~
fbj007 2002-09-12
  • 打赏
  • 举报
回复
你先在控制面板里测试一下你的dsn是否能连接成功

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧