Characters found after end of SQL statement

I

isaac2004

hello getting wierd error from SQL statement
it is
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Characters found after end of
SQL statement.


here is my server side code

<% Dim strSQL, objRS, strTitle, dblPrice, strISBN, strDescription,
curPrice, curDiscPrice

strISBN = request.querystring("ISBN")




'sql statement for individual books
strSQL = "SELECT tblBookDescription.ISBN,
tblBookDescription.strTitle, tblBookDescription.strDescription,
tblBookDescription.strPublisher, tblBookDescription.dblPrice,
tblAuthors.AuthorID " & _
"FROM tblAuthors INNER JOIN (tblBookDescription INNER JOIN
tblAuthorsBooks ON tblBookDescription.ISBN = tblAuthorsBooks.ISBN) ON
tblAuthors.AuthorID = tblAuthorsBooks.AuthorID; " & _
"WHERE (((tblBookDescription.ISBN)='" & strISBN & "')) "

response.write("strSQL = " & strSQL)


Set objRS = Server.CreateObject("ADODB.Recordset")

-----------------------------------------error here
objRS.open strSQL, objConn
-----------------------------------------------------------

'response.write("strSQL = " & strSQL)


curPrice = FormatCurrency(objRS("dblPrice"))
curDiscPrice = FormatCurrency((objRS("dblPrice")*.8))
dblPrice = (objRS("dblPrice"))


%>

any help please, i think it occurs where i concatenate the strISBN into
the SQL statement
 
B

Bob Barrows [MVP]

isaac2004 said:
response.write("strSQL = " & strSQL)
This was well-spotted by Dave, but you could have made it easier for us by
showing us the result of this response.write.
 
E

Evertjan.

jeya wrote on 10 aug 2009 in microsoft.public.inetserver.asp.general:
I got this error msg in VB.net using Access database.

This is a classic asp group.
Dotnet questions should be asked in
Pls solve this problem immediately.

Hey, this is usenet! Do not hurry us!
 
B

Bob Barrows

jeya said:
I got this error msg in VB.net using Access database.

***canned wrong-newsgroup reply************************
There was no way for you to know it (except maybe by browsing through some
of the previous questions in this newsgroup before posting yours - always a
recommended practice) , but this is a classic (COM-based) asp newsgroup.
ASP.Net bears very little resemblance to classic ASP so, while you may be
lucky enough to find a dotnet-knowledgeable person here who can answer your
question, you can eliminate the luck factor by posting your question to a
group where those dotnet-knowledgeable people hang out. I suggest
microsoft.public.dotnet.framework.aspnet or the forums at www.asp.net.
******************************************************************
Pls solve this problem immediately.

And exactly how do you expect someone in one of these groups to be able to
solve this without seeing the code that led to the error? Or better yet, the
sql statement that generated the error?
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top