On Tue, 23 Aug 2005 21:52:42 -0700, "in da club"
<sa***@indexinteractive.com> wrote:
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).