Subject RE: [firebird-support] Re: COUNT field incorrect Error
Author Alan McDonald
>
> connection.execute "EXECUTE Procedure SP_WEB_UPDATEACCOUNT(" & session
> ("AID") & ",'" & FName & _
> "','" & LName & "','" & Addr1 & "','" & addr2 & "','" & City & "','"
> & State & _
> "','" & Zip & "');"
>
That error has nothing to do with Firebird - it's ASP related..

Have you tested that a value actually exists for session("AID") by echoing
to output?
Have you tested the entire statement by assigning the statement to a
variable and echoing it to the page?
e.g.
myvar = "EXECUTE Procedure SP_WEB_UPDATEACCOUNT(" & session("AID") & ",'" &
FName & "','" & LName & "','" & Addr1 & "','" & addr2 & "','" & City & "','"
& State & "','" & Zip & "');"
Response.Write myvar

You need to try this form of syntax (i.e. use brackets as well and the CStr
function for integers)
connection.execute("EXECUTE Procedure SP_WEB_UPDATEACCOUNT("
CStr(session("AID"))+ ",'" & FName & "','" & LName & "','" & Addr1 & "','" &
addr2 & "','" & City & "','" & State & "','" & Zip & "')")

And you could also use parameters as in this method which is by far the most
reliable:
Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = DBConn
cmd.CommandText = "SP_WEB_UPDATEACCOUNT"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append cmd.CreateParameter( "AID", adInteger, adParamInput )
cmd.Parameters("RVALUE") = CLng(Session("AID"))
cmd.Parameters.Append cmd.CreateParameter( "FNAME", adVarChar, adParamInput
30)
cmd.Parameters("FNAME") = (Request.Form("fname"))

etc

cmd.Execute ,, adCmdStoredProc + adExecuteNoRecords

Alan