473,387 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Characters found after end of SQL statement

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

Feb 20 '06 #1
2 8257
isaac2004 wrote:
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 & "')) "


Lose the semicolon right before your WHERE clause.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Feb 20 '06 #2
isaac2004 wrote:

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.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Feb 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP,...
3
by: Tetsuo | last post by:
How do I get Python to work with foreign characters? When I try to print them, I get a unicode error (characters not ASCII). Wasn't unicode invented for the express purpose of working with...
8
by: Anita | last post by:
Hi All I have a table with one column : CREATE TABLE test2 ( a char(15) primary KEY CLUSTERED ) The column a is filled with encrypted data (contains control and extended characters).
7
by: CharlesEF | last post by:
Hi All, I have run into another problem that is eating my lunch. Should be simple but I am having one heck of a time. Please look at this SELECT statement: SELECT FROM States WHERE ] =...
7
by: u260044 | last post by:
I have a problem where the French translation for "side" gets converted incorrectly into a datatable from XML. Note: The total XML is at the bottom of the message to keep from distracting from...
6
by: Kevin Simmons | last post by:
I have seen this question asked a few times but have not seen a clear answer... I have a python script that prompts the user for input from stdin via a menu. I want to process that input when...
3
by: prajithgg | last post by:
Hi, I am facing some problem while inserting some non English characters to DB2 server from my java application. We are not able to retrieve the same record when searched with the same non English...
0
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
13
by: Eps | last post by:
Hi there, I believe all strings in .net are unicode by default, I am looking for a way to remove all non ascii characters from a string (or optionally replace them). There is an article on...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.