参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/Admin/User/admin_site_save.asp,行 5
提交页:admin_site.asp
<form action="admin_site_save.asp" method="post" >
<table width="99%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#CCCCCC" bordercolordark="#CAD7F7" onMouseOver="this.bgColor='#EEEEEE'" onMouseOut="this.bgColor=''" class="bgcolor5">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="bgcolor5">
<tr>
<td height="30" colspan="2" class="bgcolor2"><b>[站点信息配置]</b>
</td>
</tr>
<tr>
<td height="1" align="center" class="bgcolor4"></td>
<td class="bgcolor1"></td>
</tr>
<tr>
<td width="15%" height="25" align="center" class="bgcolor4">网站名称:</td>
<td class="bgcolor1"><input name="sitename" type="text" class="input" id="sitename" title="站点名称! " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" size="60" maxlength="60" >
<font color="#E4EDF9"> <font color="#FF0000">* </font> </font> </td>
</tr>
<tr>
<td height="25" align="center" class="bgcolor4">网站地址:</td>
<td class="bgcolor1"><input name="Siteurl" type="text" class="input" id="Siteurl" title=" 站点网址! " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" size="60" maxlength="60" >
<font color="#FF0000"> * </font> </td>
</tr>
<tr>
<td height="25" align="center" valign="top" class="bgcolor4">搜索关键词:</td>
<td class="bgcolor1"> <font color="#FF0000"><font color="#FF0000">
<textarea name="SearchKey" cols="40" rows="6" id="SearchKey"></textarea>
</font> <font color="#FF0000">* </font> </font></td>
</tr>
<tr>
<td height="25" align="center" class="bgcolor4">公司名称:</td>
<td class="bgcolor1"><input name="Cname" type="text" class="input" id="Cname" title=" 公司名! " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" size="60" maxlength="60" >
<font color="#FF0000"> * </font> </td>
</tr>
<tr>
<td height="25" align="center" class="bgcolor4">联系方式:</td>
<td class="bgcolor1"><input name="lcfs" type="text" class="input" id="lcfs" title=" 站长联系方式! " onMouseOver="this.style.background='#FFFFFF';" onMouseOut="this.style.background='#F7F7F7';" size="60" maxlength="60" >
<font color="#FF0000"> * </font> </td>
</tr>
<tr>
<td height="1" align="center" class="bgcolor4"></td>
<td class="bgcolor1"></td>
</tr>
<tr>
<td height="25" align="center" class="bgcolor4"> </td>
<td class="bgcolor1"><input type="submit" name="Submit" value="确定配置"></td>
</tr>
</table></td>
</tr>
</table>
</form>
保存页:admin_site_save.asp
<!--#include file="../Conn/Conn.asp"-->
<%
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql="select * from siteinfo"
rs1.open sql,conn,1,3
rs1("SiteName")=trim(request.form("SiteName"))
rs1("Siteurl")=trim(request.form("Siteurl"))
rs1("SearchKey")=trim(request.form("SearchKey"))
rs1("Cname")=trim(request.form("Cname"))
rs1("lcfs")=trim(request.form("lcfs"))
rs1.update
rs1.close
set rs1=nothing
Response.Write("<script language=""JavaScript"">alert(""恭喜!回复成功!~"")</script>")
Response.Write"<meta http-equiv=""Refresh"" content=""0; url=admin_site.asp"">"
%>
帮帮忙,这问题弄了我很久了...
8 个解决方案
#1
数据库连接conn对象未打开
#2
看看connection string
#3
应该怎样改呢?
#4
把conn.asp貼出來看看
#5
ADODB.Recordset(0x800A0BB9)-->sql语句出错(sql语句或conn语句未定义或对一个rs属性进行赋值时发生错误)
<!--#include file="../Conn/Conn.asp"-->
打开conn.asp的页面。然后查看conn 是否正确咯!
假如你还问怎么修改那就证明……
<!--#include file="../Conn/Conn.asp"-->
打开conn.asp的页面。然后查看conn 是否正确咯!
假如你还问怎么修改那就证明……
#6
检查SQL语句
最好的办法是输出SQL语句到查询分析器里执行一下
如果正确的话就看你的connection对象是否已建立并打开。
最好的办法是输出SQL语句到查询分析器里执行一下
如果正确的话就看你的connection对象是否已建立并打开。
#7
以下是conn.asp 文件
<%
' 数据库对象
Dim objConn, strConn
Dim objCmd
' 初始化数据库连接对象
Call DBConnBegin()
Sub DBConnBegin()
On Error Resume Next
' 如果数据库对象已打开,不要再打开
If IsObject(objConn) = True Then Exit Sub
'ACCESS数据库
Dim sqlDb
sqlUsername = "admin"
sqlPassword = "!@#$%^"
sqlDbPath= "../Database/#NetWorkTimes.mdb"
strConn = "Provider=Microsoft.Jet.OleDB.4.0; User ID = " & SqlUsername & "; Jet OleDB:Database Password = " & SqlPassword & "; Data Source = " & Server.MapPath(sqlDbPath)
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConn
If Err Then
err.Clear
Set objConn = Nothing
' 显示错误信息,并且发送邮件通知管理员(有待于开发)
'Call DBConnError(Err)
Response.Write "数据库连接出错,请检查数据库参数设置。"
Response.End
End If
Set objCmd = Server.CreateObject("ADODB.Command")
End Sub
' 释放数据库连接对象
' Call DBConnEnd()
Sub DBConnEnd()
On Error Resume Next
If IsObject(objCmd) Then
objCmd.Close
Set objCmd = Nothing
End if
If IsObject(objConn) Then
objConn.Close
Set objConn = Nothing
End if
End Sub
%>
<%
' 数据库对象
Dim objConn, strConn
Dim objCmd
' 初始化数据库连接对象
Call DBConnBegin()
Sub DBConnBegin()
On Error Resume Next
' 如果数据库对象已打开,不要再打开
If IsObject(objConn) = True Then Exit Sub
'ACCESS数据库
Dim sqlDb
sqlUsername = "admin"
sqlPassword = "!@#$%^"
sqlDbPath= "../Database/#NetWorkTimes.mdb"
strConn = "Provider=Microsoft.Jet.OleDB.4.0; User ID = " & SqlUsername & "; Jet OleDB:Database Password = " & SqlPassword & "; Data Source = " & Server.MapPath(sqlDbPath)
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConn
If Err Then
err.Clear
Set objConn = Nothing
' 显示错误信息,并且发送邮件通知管理员(有待于开发)
'Call DBConnError(Err)
Response.Write "数据库连接出错,请检查数据库参数设置。"
Response.End
End If
Set objCmd = Server.CreateObject("ADODB.Command")
End Sub
' 释放数据库连接对象
' Call DBConnEnd()
Sub DBConnEnd()
On Error Resume Next
If IsObject(objCmd) Then
objCmd.Close
Set objCmd = Nothing
End if
If IsObject(objConn) Then
objConn.Close
Set objConn = Nothing
End if
End Sub
%>
#8
用asp执行存储过程求救!!
A :
proc_get_ysrtm0827 为存储过程名称
有两个输入参数 分别为int datetime
现在我执行到
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4)
这句提示我
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
ADODB.Command 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/cwk/scdw/income/JS_YJSR.asp,行31
不知道是否是类型设置的不对,请告诉我,
第二个参数我想设置为null ,该怎么设置!!!
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"这里缺了一个参数")
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"")
---------------------------------------------------------------
不用创建参数,直接用,如下所示:
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = Connection
.CommandText = "proc_get_ysrtm0827 "+cstr(@sjlw_bh)+",'"+cstr(@kjqj)+"'"
set rs=.Execute
End With
---------------------------------------------------------------
adUnsignedInt = 19
adParamInput = 1
adDate = 7
---------------------------------------------------------------
具体你可以看
C:\Program Files\Common Files\System\ado\adovbs.inc
A :
proc_get_ysrtm0827 为存储过程名称
有两个输入参数 分别为int datetime
现在我执行到
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4)
这句提示我
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
ADODB.Command 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/cwk/scdw/income/JS_YJSR.asp,行31
不知道是否是类型设置的不对,请告诉我,
第二个参数我想设置为null ,该怎么设置!!!
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"这里缺了一个参数")
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"")
---------------------------------------------------------------
不用创建参数,直接用,如下所示:
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = Connection
.CommandText = "proc_get_ysrtm0827 "+cstr(@sjlw_bh)+",'"+cstr(@kjqj)+"'"
set rs=.Execute
End With
---------------------------------------------------------------
adUnsignedInt = 19
adParamInput = 1
adDate = 7
---------------------------------------------------------------
具体你可以看
C:\Program Files\Common Files\System\ado\adovbs.inc
#1
数据库连接conn对象未打开
#2
看看connection string
#3
应该怎样改呢?
#4
把conn.asp貼出來看看
#5
ADODB.Recordset(0x800A0BB9)-->sql语句出错(sql语句或conn语句未定义或对一个rs属性进行赋值时发生错误)
<!--#include file="../Conn/Conn.asp"-->
打开conn.asp的页面。然后查看conn 是否正确咯!
假如你还问怎么修改那就证明……
<!--#include file="../Conn/Conn.asp"-->
打开conn.asp的页面。然后查看conn 是否正确咯!
假如你还问怎么修改那就证明……
#6
检查SQL语句
最好的办法是输出SQL语句到查询分析器里执行一下
如果正确的话就看你的connection对象是否已建立并打开。
最好的办法是输出SQL语句到查询分析器里执行一下
如果正确的话就看你的connection对象是否已建立并打开。
#7
以下是conn.asp 文件
<%
' 数据库对象
Dim objConn, strConn
Dim objCmd
' 初始化数据库连接对象
Call DBConnBegin()
Sub DBConnBegin()
On Error Resume Next
' 如果数据库对象已打开,不要再打开
If IsObject(objConn) = True Then Exit Sub
'ACCESS数据库
Dim sqlDb
sqlUsername = "admin"
sqlPassword = "!@#$%^"
sqlDbPath= "../Database/#NetWorkTimes.mdb"
strConn = "Provider=Microsoft.Jet.OleDB.4.0; User ID = " & SqlUsername & "; Jet OleDB:Database Password = " & SqlPassword & "; Data Source = " & Server.MapPath(sqlDbPath)
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConn
If Err Then
err.Clear
Set objConn = Nothing
' 显示错误信息,并且发送邮件通知管理员(有待于开发)
'Call DBConnError(Err)
Response.Write "数据库连接出错,请检查数据库参数设置。"
Response.End
End If
Set objCmd = Server.CreateObject("ADODB.Command")
End Sub
' 释放数据库连接对象
' Call DBConnEnd()
Sub DBConnEnd()
On Error Resume Next
If IsObject(objCmd) Then
objCmd.Close
Set objCmd = Nothing
End if
If IsObject(objConn) Then
objConn.Close
Set objConn = Nothing
End if
End Sub
%>
<%
' 数据库对象
Dim objConn, strConn
Dim objCmd
' 初始化数据库连接对象
Call DBConnBegin()
Sub DBConnBegin()
On Error Resume Next
' 如果数据库对象已打开,不要再打开
If IsObject(objConn) = True Then Exit Sub
'ACCESS数据库
Dim sqlDb
sqlUsername = "admin"
sqlPassword = "!@#$%^"
sqlDbPath= "../Database/#NetWorkTimes.mdb"
strConn = "Provider=Microsoft.Jet.OleDB.4.0; User ID = " & SqlUsername & "; Jet OleDB:Database Password = " & SqlPassword & "; Data Source = " & Server.MapPath(sqlDbPath)
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConn
If Err Then
err.Clear
Set objConn = Nothing
' 显示错误信息,并且发送邮件通知管理员(有待于开发)
'Call DBConnError(Err)
Response.Write "数据库连接出错,请检查数据库参数设置。"
Response.End
End If
Set objCmd = Server.CreateObject("ADODB.Command")
End Sub
' 释放数据库连接对象
' Call DBConnEnd()
Sub DBConnEnd()
On Error Resume Next
If IsObject(objCmd) Then
objCmd.Close
Set objCmd = Nothing
End if
If IsObject(objConn) Then
objConn.Close
Set objConn = Nothing
End if
End Sub
%>
#8
用asp执行存储过程求救!!
A :
proc_get_ysrtm0827 为存储过程名称
有两个输入参数 分别为int datetime
现在我执行到
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4)
这句提示我
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
ADODB.Command 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/cwk/scdw/income/JS_YJSR.asp,行31
不知道是否是类型设置的不对,请告诉我,
第二个参数我想设置为null ,该怎么设置!!!
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"这里缺了一个参数")
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"")
---------------------------------------------------------------
不用创建参数,直接用,如下所示:
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = Connection
.CommandText = "proc_get_ysrtm0827 "+cstr(@sjlw_bh)+",'"+cstr(@kjqj)+"'"
set rs=.Execute
End With
---------------------------------------------------------------
adUnsignedInt = 19
adParamInput = 1
adDate = 7
---------------------------------------------------------------
具体你可以看
C:\Program Files\Common Files\System\ado\adovbs.inc
A :
proc_get_ysrtm0827 为存储过程名称
有两个输入参数 分别为int datetime
现在我执行到
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4)
这句提示我
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
ADODB.Command 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/cwk/scdw/income/JS_YJSR.asp,行31
不知道是否是类型设置的不对,请告诉我,
第二个参数我想设置为null ,该怎么设置!!!
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"这里缺了一个参数")
---------------------------------------------------------------
set tmpfist=cmd.CreateParameter("lwbh",adUnsignedInt,adParamInput,4,"")
---------------------------------------------------------------
不用创建参数,直接用,如下所示:
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = Connection
.CommandText = "proc_get_ysrtm0827 "+cstr(@sjlw_bh)+",'"+cstr(@kjqj)+"'"
set rs=.Execute
End With
---------------------------------------------------------------
adUnsignedInt = 19
adParamInput = 1
adDate = 7
---------------------------------------------------------------
具体你可以看
C:\Program Files\Common Files\System\ado\adovbs.inc