Characters found after end of SQL statement

Discussion in 'ASP General' started by isaac2004, Feb 20, 2006.

  1. isaac2004

    isaac2004 Guest

    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
     
    isaac2004, Feb 20, 2006
    #1
    1. Advertising

  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"
     
    Bob Barrows [MVP], Feb 20, 2006
    #2
    1. Advertising

  3. isaac2004

    Evertjan. Guest

    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
    <microsoft.public.dotnet.framework.aspnet>

    > Pls solve this problem immediately.


    Hey, this is usenet! Do not hurry us!

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 10, 2009
    #3
  4. isaac2004

    Bob Barrows Guest

    jeya wrote:
    > 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?


    --
    Microsoft MVP - ASP/ASP.NET - 2004-2007
    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"
     
    Bob Barrows, Aug 10, 2009
    #4
  5. Gazing into my crystal ball I observed jeya<>
    writing in news::

    > I got this error msg in VB.net using Access database.Pls solve this
    > problem immediately.
    >
    > From
    > http://www.google.co.in/search?q=characters found after end of sql stat
    > ement.&hl=en&start=10&sa=N
    >
    > Posted via DevelopmentNow.com Groups
    > http://www.developmentnow.com/g/


    http://catb.org/~esr/faqs/smart-questions.html

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Aug 10, 2009
    #5
  6. Gazing into my crystal ball I observed jeya<>
    writing in news::

    > I got this error msg in VB.net using Access database.Pls solve this
    > problem immediately.
    >
    > From
    > http://www.google.co.in/search?q=characters found after end of sql stat
    > ement.&hl=en&start=10&sa=N
    >
    > Posted via DevelopmentNow.com Groups
    > http://www.developmentnow.com/g/


    http://catb.org/~esr/faqs/smart-questions.html

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Aug 10, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dna
    Replies:
    1
    Views:
    1,279
  2. William \(Bill\) Vaughn
    Replies:
    0
    Views:
    450
    William \(Bill\) Vaughn
    Aug 21, 2003
  3. David Browne
    Replies:
    0
    Views:
    463
    David Browne
    Aug 21, 2003
  4. Neo Geshel
    Replies:
    2
    Views:
    3,624
    Versteijn
    Aug 18, 2004
  5. weiwei

    asp and sql statement in sql server db

    weiwei, Sep 22, 2004, in forum: ASP General
    Replies:
    3
    Views:
    207
    Jeff Cochran
    Sep 22, 2004
Loading...

Share This Page