emergency error '80040e14'

I

in da club

i get error '80040e14' from this codes..



sqlbul="select * from buyers where sesid="&session.SessionID

set rsbul=baglantim.execute(sqlbul)

if rsbul.eof then

response.redirect "index.asp"

end if

toplam=rsbul("toplam")





i tried like this



sqlbul="select toplam from buyers where sesid="&clng(session.SessionID)
response.write sqlbul
response.end
set rsbul=baglantim.execute(sqlbul)





it returns

select toplam from buyers where sesid=477419109



i run it in query analyser it works well..

how can i get rid of this message
 
L

Lucvdv

i get error '80040e14' from this codes..



sqlbul="select * from buyers where sesid="&session.SessionID

Error 80040e14 can have half a thousand reasons, wasn't there a more
detailed description in the error message?

See http://www.aspfaq.com/show.asp?id=2400


It sometimes indicates something is wrong with delimiters ([] around table
or column names, '' around strings).
It can also be related to incorrect datatypes (for example searching for a
text string in a numeric column).


Are you using column-level permissions on the table? Then that could be
why it works with "select toplam " but fails with "select * ".


Is 'sesid' a character (char, varchar, ...) field?
I suppose not, but if it is you should quote the value.

sqlbul = "select * from buyers where sesid='" & session.SessionID & "'"

I use a short function for this at the start of some of my ASP files:

Function Quote(s)
Quote = "'" & Replace(s, "'", "''") & "'"
End Function

and all my queries that involve character fields look like this:

sqlbul = "select * from buyers where sesid=" & Quote(session.SessionID)

This can avoid unexpected results (strange errors or SQL injection if
someone fabricates a request manually).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top