Results 1 to 6 of 6

Thread: Why would 'prev' work, but not 'next'?

  1. #1
    Dave Shishkoff Guest

    Why would 'prev' work, but not 'next'?

    Hi all, for some reason i get the following error when you click on the 'next' button:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC Microsoft Access 97 Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
    - - - - -

    However, 'prev' works fine... Any ideas?

    - Dave

  2. #2
    John Guest

    Why would 'prev' work, but not 'next'? (reply)

    Hi Dave,

    We just updated the online docs TODAY with a full list of the reserved words. Go to www.aspdb.com, click on documentation and choose the User Manual. It's near the bottom in a three column table arranged alphabeticaly.

    Hope this helps!

    John

    On 2/11/99 5:24:30 PM, Dave Shishkoff wrote:
    > Hi all, for some reason i get the following error when you click on the
    > 'next' button:

    Microsoft OLE DB Provider for ODBC Drivers error
    > '80040e14'

    [Microsoft][ODBC Microsoft Access 97 Driver] The
    > SELECT statement includes a reserved word or an argument name that is
    > misspelled or missing, or the punctuation is incorrect.
    - - - -
    > -

    However, 'prev' works fine... Any ideas?

    - Dave

  3. #3
    Dave Shishkoff Guest

    Why would 'prev' work, but not 'next'? (reply)

    Hi John,

    >We just updated the online docs TODAY with a full list of the
    > reserved words. Go to www.aspdb.com, click on documentation and choose the
    > User Manual. It's near the bottom in a three column table arranged
    > alphabeticaly.

    >Hope this helps!

    Unfortunately, no, none of my words matched.. Here's the line i'm using:

    MyDb.dbSQL = "Select * FROM mydatabase where region like '%"&theregion&"%' and sector like '%"&thesector&"%'"

    And, i get the two variables from:

    <%
    theregion = request.querystring(&#34;region&#34
    thesector = request.querystring(&#34;sector&#34
    %>

    The only thing i can see that might cause trouble would be the &#34;&&#34;, but it&#39;s essential in this i believe..

    Any other pointers? =)

    - Dave

  4. #4
    John Guest

    Why would 'prev' work, but not 'next'? (reply)

    Hi Dave,

    What you&#39;re doing looks ok. I wonder what values you&#39;re getting in those two variables when it blows up? How about adding a couple lines such as:

    response.write(&#34;region: [&#34; & theregion & &#34;]<BR>&#34
    response.write(&#34;region: [&#34; & thesector & &#34;]<BR>&#34

    just in front of your dbSQL statement, and see what your line looks like? Might as well dump out dbSQL too. Maybe the culprit is a &#34;null&#34; or something?

    Let us know,

    John

    On 2/12/99 12:14:27 AM, Dave Shishkoff wrote:
    > Hi John,

    >We just updated the online docs TODAY with a full list of the
    >
    > reserved words. Go to www.aspdb.com, click on documentation and choose
    > the
    > User Manual. It&#39;s near the bottom in a three column table
    > arranged
    > alphabeticaly.

    >Hope this helps!

    Unfortunately, no, none
    > of my words matched.. Here&#39;s the line i&#39;m using:

    MyDb.dbSQL =
    > &#34;Select * FROM mydatabase where region like
    > &#39;%&#34;&theregion&&#34;%&#39; and sector like
    > &#39;%&#34;&thesector&&#34;%&#39;&#34;

    And, i get the two variables
    > from:

    <%
    theregion = request.querystring(&#34;region&#34
    thesector =
    > request.querystring(&#34;sector&#34
    %>

    The only thing i can see that
    > might cause trouble would be the &#34;&&#34;, but it&#39;s essential in
    > this i believe..

    Any other pointers? =)

    - Dave

  5. #5
    Dave Shishkoff Guest

    Why would 'prev' work, but not 'next'? (reply)

    Hi John,

    >What you&#39;re doing looks ok. I wonder what values
    > you&#39;re getting in those two variables when it blows up? How about
    > adding a couple lines such as:

    > response.write(&#34;region: [&#34; &
    > theregion & &#34;]<BR>&#34
    > response.write(&#34;region: [&#34; &
    > thesector & &#34;]<BR>&#34

    Okay, it spat out what it should, but when you make a selection, ie, go to form mode, it (the response.write) appears blank... And that&#39;s where the next option dies.. Again, prev works..but not next..very strange.

    > see what your line looks like? Might as well dump out dbSQL too. Maybe
    > the culprit is a &#34;null&#34; or something?

    I have no idea what this means.. =(

    Thanks again for all the help!

    - Dave

  6. #6
    John Guest

    Why would 'prev' work, but not 'next'? (reply)

    Hi Dave,

    If your &#34;Response.write(theregion)&#34; is blank as you say, then then problem is not with ASP-db, it&#39;s with the code that sets that variable.

    Is it possible you&#39;re pulling that from the URL line? If so, then it will be overwritten when you click many of the ASP-db navigation buttons. The solution is to store your variable in a session var. Here&#39;s an example:

    If your URL looks like this: http://www.server.com/myfile.asp?region=USA

    You&#39;d write:

    If Request(&#34;region&#34 <> &#34;&#34; then Session(&#34;region&#34 = Request(&#34;region&#34

    Then you&#39;d ALWAYS use Session(&#34;region&#34 instead of the one from the URL line.
    This way, whenever a new region is passed, you&#39;ll get and SAVE it in a session variable, and when it&#39;s wiped out by an ASP-db nav button, you&#39;ll still have it in your session variable.

    Hope this helps,
    John

    On 2/15/99 7:15:22 PM, Dave Shishkoff wrote:
    > Hi John,

    >What you&#39;re doing looks ok. I wonder what values
    >
    > you&#39;re getting in those two variables when it blows up? How about
    >
    > adding a couple lines such as:

    > response.write(&#34;region: [&#34; &
    >
    > theregion & &#34;]<BR>&#34
    > response.write(&#34;region: [&#34; &
    >
    > thesector & &#34;]<BR>&#34

    Okay, it spat out what it should, but
    > when you make a selection, ie, go to form mode, it (the response.write)
    > appears blank... And that&#39;s where the next option dies.. Again, prev
    > works..but not next..very strange.

    > see what your line looks like?
    > Might as well dump out dbSQL too. Maybe
    > the culprit is a
    > &#34;null&#34; or something?

    I have no idea what this means..
    > =(

    Thanks again for all the help!

    - Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •