|
 |
asp_database_setup thread: Error using "GetString" command
Message #1 by mot98@y... on Wed, 20 Feb 2002 02:01:00
|
|
I am using the "Beginning ASP Databases" book, and I am using the example
on page 173.
I configured it to query my own database and creat the table as described.
I am getting this error when trying to view the page:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/waterloo_select.asp, line 18
Response.Write oRSmt.GetString(,,"</TD><TD>","</TD></TR><TR><TD>", ")
This is exactly how it is written in the book, so I am a little confused
as to why it is erroring out... here is the code in full...:
<%
Set oRSmt=Server.CreateObject("ADODB.Recordset")
txtSQL = "SELECT * FROM Contacts WHERE BusinessCity=Waterloo;"
oRSmt.Open txtSQL, "DSN=BMH"
oRSmt.MoveFirst
Response.Write "<TABLE BORDER=1><TR><TD>"
Response.Write oRSmt.GetString
(,,"</TD><TD>","</TD></TR><TR><TD>", ")
Response.Write "</TD></TR></TABLE>"
oRSmt.Close
Set oRSmt=nothing
%>
Can someone help me with this??
TIA...
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 20 Feb 2002 13:18:59 +1100
|
|
Count the number of double quotes ( " ) that you have on that line. You have
a mis-matched number of string delimiters.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <mot98@y...>
Subject: [asp_database_setup] Error using "GetString" command
: I am using the "Beginning ASP Databases" book, and I am using the example
: on page 173.
:
: I configured it to query my own database and creat the table as described.
: I am getting this error when trying to view the page:
:
: Microsoft VBScript compilation error '800a03ea'
:
: Syntax error
:
: /waterloo_select.asp, line 18
:
: Response.Write oRSmt.GetString(,,"</TD><TD>","</TD></TR><TR><TD>", ")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by mot98@y... on Wed, 20 Feb 2002 03:01:15
|
|
Thanks Ken, I actually resolved the prob by putting in a "$" instead..
but now I am coming up with this error...
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/waterloo_select.asp, line 15
it is refering to this line of code below...
oRSmt.Open txtSQL, "DSN=BMH"
any suggestions would be much appreciated...
Cheers
> Count the number of double quotes ( " ) that you have on that line. You
have
> a mis-matched number of string delimiters.
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <mot98@y...>
> Subject: [asp_database_setup] Error using "GetString" command
>
>
> : I am using the "Beginning ASP Databases" book, and I am using the
example
> : on page 173.
> :
> : I configured it to query my own database and creat the table as
described.
> : I am getting this error when trying to view the page:
> :
> : Microsoft VBScript compilation error '800a03ea'
> :
> : Syntax error
> :
> : /waterloo_select.asp, line 18
> :
> : Response.Write oRSmt.GetString
(,,"</TD><TD>","</TD></TR><TR><TD>", ")
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
Message #4 by "Ken Schaefer" <ken@a...> on Wed, 20 Feb 2002 14:06:36 +1100
|
|
www.adopenstatic.com/faq/80040e10.asp
The problem is with your SQL statement.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <mot98@y...>
Subject: [asp_database_setup] Re: Error using "GetString" command
: but now I am coming up with this error...
:
: Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
:
: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
:
: /waterloo_select.asp, line 15
:
: it is refering to this line of code below...
:
: oRSmt.Open txtSQL, "DSN=BMH"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |