粤生活,粤开心 » 日志 » 各位大虾帮帮忙吧ASP通过SQL语句访问数据库问题!!
各位大虾帮帮忙吧ASP通过SQL语句访问数据库问题!!
coolspen 发表于 2007-04-11 01:41:53
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_odsy_STRING
Recordset1.Source = "SELECT ordernum FROM order WHERE ordernum='" & kordernum & "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
这一段我们看着再正常不过了,但在打开网页的时候偏偏就提示下面这个句子:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC Microsoft Access Driver] FROM 子句语法错误。
/patternquantity.asp,行 41
检查来检查去,发现并没有错误,还进行了数据提前验证,最终结果是:
SELECT ordernum FROM order WHERE ordernum='SW074111'
当这该死的IIS就是通不过啊,你说郁闷不?
- » 2005年: 国内流行乐和国际流行乐详解!
最新评论
-
2007-04-11 11:03:08 匿名 124.240.*.*
各位,问题已经得到解决!
将
Recordset1.Source = "SELECT ordernum FROM order WHERE ordernum='" & kordernum & "'"
换成
Recordset1.Source = "SELECT ordernum FROM [order] WHERE ordernum='" & kordernum & "'"
就一切OK.
不过这个句子已经可以不要用到了,想到了另外的简单的解决之道!
^_^ -
2007-04-11 16:06:30 匿名 124.240.*.*
原因相信大家都知道了"ORDER"这个词在ACCESS当中是一个保留字.
^_^
