-
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
-
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
-
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("region"
thesector = request.querystring("sector"
%>
The only thing i can see that might cause trouble would be the "&", but it's essential in this i believe..
Any other pointers? =)
- Dave
-
Why would 'prev' work, but not 'next'? (reply)
Hi Dave,
What you're doing looks ok. I wonder what values you're getting in those two variables when it blows up? How about adding a couple lines such as:
response.write("region: [" & theregion & "]<BR>"
response.write("region: [" & thesector & "]<BR>"
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 "null" 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'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("region"
thesector =
> request.querystring("sector"
%>
The only thing i can see that
> might cause trouble would be the "&", but it's essential in
> this i believe..
Any other pointers? =)
- Dave
-
Why would 'prev' work, but not 'next'? (reply)
Hi John,
>What you're doing looks ok. I wonder what values
> you're getting in those two variables when it blows up? How about
> adding a couple lines such as:
> response.write("region: [" &
> theregion & "]<BR>"
> response.write("region: [" &
> thesector & "]<BR>"
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'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 "null" or something?
I have no idea what this means.. =(
Thanks again for all the help!
- Dave
-
Why would 'prev' work, but not 'next'? (reply)
Hi Dave,
If your "Response.write(theregion)" is blank as you say, then then problem is not with ASP-db, it's with the code that sets that variable.
Is it possible you'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's an example:
If your URL looks like this: http://www.server.com/myfile.asp?region=USA
You'd write:
If Request("region" <> "" then Session("region" = Request("region"
Then you'd ALWAYS use Session("region" instead of the one from the URL line.
This way, whenever a new region is passed, you'll get and SAVE it in a session variable, and when it's wiped out by an ASP-db nav button, you'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're doing looks ok. I wonder what values
>
> you're getting in those two variables when it blows up? How about
>
> adding a couple lines such as:
> response.write("region: [" &
>
> theregion & "]<BR>"
> response.write("region: [" &
>
> thesector & "]<BR>"
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'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
> "null" 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
-
Forum Rules
|
|