what is the data type of txnref in the Database. Try the Query as mySQL = "SELECT * from dclinter where txnref = '" & txnref1 & "' "
On 6/15/05, kejeckam <[EMAIL PROTECTED]> wrote: > > when I do a response.write (mySQL) I get the following error > > select * from dclinter where txnref =1301216246745032 > Microsoft OLE DB Provider for ODBC Drivers error '80040e07' > > [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in > criteria expression. > > /interswitch.asp, line 37 > > which I guess relatively substitutes the value properly so I wonder > where the error comes from > > > > > --- In [email protected], Mingle > <[EMAIL PROTECTED]> wrote: > > The Error Can be in the Query > > mySQL="select * from dclinter where txnref =" & txnref1 > > > > Try to write out the mySQL and see whether its the same query you > intend to > > query the DB with? > > Probably txnref1 may be an empty string or might need a single > Quotes to > > enclose it, if a string. > > > > On 6/15/05, kejeckam <[EMAIL PROTECTED]> wrote: > > > > > > Dont know why I get the error below for line 35 and it contains > this > > > line of code "set rs =Connection.Execute(mySQL)" > > > > > > the error says > > > Microsoft OLE DB Provider for ODBC Drivers error '80040e07' > > > > > > [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in > > > criteria expression. > > > > > > /interswitch.asp, line 35 > > > > > > > > > please what could be wrong > > > > > > > > > > > > > > > <%@ Language=VBScript %> > > > > > > <% Option Explicit %> > > > <% > > > dim txnref1 > > > dim dclaccount > > > dim amt > > > dim mySQL > > > dim T1 > > > dim T2 > > > > > > txnref1=request.form("value3") > > > dclaccount=request.form("value1") > > > amt=request.form("value2") > > > > > > > > > Dim ConnectionString > > > ConnectionString = "DRIVER={Microsoft Access Driver > > > (*.mdb)};Dbq=" & server.mappath("/inter.mdb") & ";UID=;PWD=;" > > > > > > Dim Connection > > > Set Connection = Server.CreateObject("ADODB.Connection") > > > set rs = Server.CreateObject("ADODB.Recordset") > > > > > > Connection.ConnectionTimeout = 30 > > > Connection.CommandTimeout = 80 > > > Connection.Open ConnectionString > > > > > > > > > Dim rs > > > > > > mySQL="select * from dclinter where txnref =" & txnref1 > > > > > > ' Retrieve the records > > > > > > set rs =Connection.Execute(mySQL) > > > do while not rs.eof > > > > > > T1=rs("txnref") > > > T2=rs("rspcode") > > > > > > if T1=txnref1 and T2="00" then > > > dim cat > > > cat=T1 > > > rs("dclaccount")=dclaccount > > > rs("amt")=amt > > > rs.update > > > > > > strHost = "mail.dcltelecom.com <http://mail.dcltelecom.com> < > http://mail.dcltelecom.com>" > > > Dim objNewMail 'As CDONTS.NewMail > > > Set objNewMail = Server.CreateObject > > > ("CDONTS.NewMail") > > > > > > ObjNewMail.To <http://ObjNewMail.To> <http://ObjNewMail.To> = " > [EMAIL PROTECTED]" > > > ObjNewMail.From = "[EMAIL PROTECTED]" > > > ObjNewMail.Subject = "New Payment Information" > > > ObjNewMail.Body = "A cash payment of Naira NGN " & > > > amt & " " & "was paid in with DCL Account Number: " & dclaccount > & " > > > with transaction reference number " & txnref1 > > > ObjNewMail.Send > > > > > > Set ObjNewMail = Nothing > > > response.write "successfull" > > > end if > > > > > > if T1 =txnref1 and T2 <> "00" then > > > > > > > > > rs("dclaccount")=dclaccount > > > rs("amt")=amt > > > rs.update > > > > > > response.write "failed" > > > end if > > > > > > rs.movenext > > > loop > > > > > > if cat <> txnref1 then > > > > > > response.write "Please the transaction was > > > uncompleted" > > > response.write txnref1 & " " & dclaccount > > > end if > > > rs.close > > > set rs=nothing > > > > > > Connection.close > > > set Connection=nothing > > > > > > > > > %> > > > > > > > > > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [Non-text portions of this message have been removed] > > > > > > Yahoo! Groups Links > > > > > > > > [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
