Subject | Re: COUNT field incorrect Error |
---|---|
Author | jskeeve |
Post date | 2005-06-30T15:17:57Z |
As far as have I tried the having done the response.write trick to
see if there is a problem with the sql. I have. That's how I got the
SQL string to post up here. I will however try the CStr to see if
that helps any. I guess I will post this message in an ASP group.
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
see if there is a problem with the sql. I have. That's how I got the
SQL string to post up here. I will however try the CStr to see if
that helps any. I guess I will post this message in an ASP group.
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
> >session
> > connection.execute "EXECUTE Procedure SP_WEB_UPDATEACCOUNT(" &
> > ("AID") & ",'" & FName & _& "','"
> > "','" & LName & "','" & Addr1 & "','" & addr2 & "','" & City
> > & State & _echoing
> > "','" & 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
> 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 & "');"the CStr
> Response.Write myvar
>
> You need to try this form of syntax (i.e. use brackets as well and
> function for integers)& "','" &
> connection.execute("EXECUTE Procedure SP_WEB_UPDATEACCOUNT("
> CStr(session("AID"))+ ",'" & FName & "','" & LName & "','" & Addr1
> addr2 & "','" & City & "','" & State & "','" & Zip & "')")the most
>
> And you could also use parameters as in this method which is by far
> reliable:adParamInput )
> 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,
> cmd.Parameters("RVALUE") = CLng(Session("AID"))adVarChar, adParamInput
> cmd.Parameters.Append cmd.CreateParameter( "FNAME",
> 30)
> cmd.Parameters("FNAME") = (Request.Form("fname"))
>
> etc
>
> cmd.Execute ,, adCmdStoredProc + adExecuteNoRecords
>
> Alan