kwilliams
03-29-2004, 12:26 PM
I have this code:
<%
strID = Session("Agenda_ID")
'Response.Write(strID) 'TEST'S PULLING OF ID
strDelete = Session("DeletePacket")
strRedirect = "/FOLDER/SUBFOLDER/agendas_thankyou.asp"
%>
<%
if strDelete = "N" then
Response.Redirect(strRedirect)
End if
%>
<%
'UPDATE PACKET
if strDelete = "Y" then
Set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_strConn_Login_STRING
Command1.CommandText = "UPDATE dbo.Commission_Agendas SET Packet = NULL WHERE Agenda_ID = 'strID'"
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
Set Command1 = nothing
%>
...but I get this error message:
Microsoft OLE DB Provider for SQL Server error '80040e07'
Syntax error converting the varchar value '%strID%' to a column of data type int.
/ScriptLibrary/fsoDeleteFile.asp, line 30
Line 30 is referencing the UPDATE statement. Does anyone see why it won't use "strID" as a filter? strID is the ID for the table, and it's datatype is int. This works find in JavaScript, but the VBScript version is giving me this weird message. ANy & all help is appreciated. Thanks.
<%
strID = Session("Agenda_ID")
'Response.Write(strID) 'TEST'S PULLING OF ID
strDelete = Session("DeletePacket")
strRedirect = "/FOLDER/SUBFOLDER/agendas_thankyou.asp"
%>
<%
if strDelete = "N" then
Response.Redirect(strRedirect)
End if
%>
<%
'UPDATE PACKET
if strDelete = "Y" then
Set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_strConn_Login_STRING
Command1.CommandText = "UPDATE dbo.Commission_Agendas SET Packet = NULL WHERE Agenda_ID = 'strID'"
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
Set Command1 = nothing
%>
...but I get this error message:
Microsoft OLE DB Provider for SQL Server error '80040e07'
Syntax error converting the varchar value '%strID%' to a column of data type int.
/ScriptLibrary/fsoDeleteFile.asp, line 30
Line 30 is referencing the UPDATE statement. Does anyone see why it won't use "strID" as a filter? strID is the ID for the table, and it's datatype is int. This works find in JavaScript, but the VBScript version is giving me this weird message. ANy & all help is appreciated. Thanks.