Ask a Question related to ASP Database, Design and Development.
-
Primadona Rifai #1
800A0401: Expected End of Statement
I am trying to get this code going but always the following error
message:
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/hbgary/webdev/functions/functions.asp, line 367, column 64
rs = "SELECT Body.G1, Body.G2, Body.content FROM Body Where G1="1" And
G2="1""
Here's my code:
<%Sub Get_MainBody()
set cn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
cn.Open "DSN=Webdata"
rs = "SELECT Body.G1, Body.G2, Body.content FROM Body Where G1="1"
And G2="1""
If not rs.EOF then
Response.Write rs("content")
End If
rs.Close
cn.Close
Set rs=nothing%>
Can anybody point on where I did wrong?
Thanks,
P. Rifai
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Primadona Rifai Guest
-
Expected end of statement
Hi all, This will be my 1st post on here! i am trying to view a list of files within a folder on my server drive using this bit of code. <%... -
The DREADED Expected end of statement
Microsoft VBScript compilation error '800a0401' Can someone please look at my code and tell me what the deal is? I am stumped. Expected end of... -
Expected end of statement
Try this instead provider=Microsoft.Jet.oledb.4.0;Data Source=c:\testapp\asp_test.mdb; User ID=('admin'); Password=("") -
Expected end of statement
Can you post the EXACT error you're getting? -
Expected end of statement problem
Having a nightmare problem with this and would appreciate any and all help. The situation is I want to move from a webform and format the user... -
Ray at #2
Re: 800A0401: Expected End of Statement
You're trying to stick " in the middle of a string. The " terminates the
string though. If your G1 and G2 are text types of data, delimit with '.
If they are numeric, do not delimit. IE
rs = "SELECT Body.G1, Body.G2, Body.Content FROM Body WHERE G1='1' AND
G2='1'"
Notice that that is just a string. And a string starts with a " and ends
with a ". There cannot be a " in the middle of your string. If you need a
" in the middle of string, you put "" to indicate a " character. Either
that or you concatenate chr(34).
Ray at work
"Primadona Rifai" <primadona.rifai@verizon.net> wrote in message
news:%230Xp3hSiDHA.1688@TK2MSFTNGP10.phx.gbl...> I am trying to get this code going but always the following error
> message:
>
> Error Type:
> Microsoft VBScript compilation (0x800A0401)
> Expected end of statement
> /hbgary/webdev/functions/functions.asp, line 367, column 64
> rs = "SELECT Body.G1, Body.G2, Body.content FROM Body Where G1="1" And
> G2="1""
>
>
> Here's my code:
>
> <%Sub Get_MainBody()
> set cn = Server.CreateObject("ADODB.Connection")
> set rs = Server.CreateObject("ADODB.Recordset")
> cn.Open "DSN=Webdata"
> rs = "SELECT Body.G1, Body.G2, Body.content FROM Body Where G1="1"
> And G2="1""
> If not rs.EOF then
> Response.Write rs("content")
> End If
> rs.Close
> cn.Close
> Set rs=nothing%>
>
> Can anybody point on where I did wrong?
>
> Thanks,
> P. Rifai
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Ray at Guest
-
Primadona Rifai #3
Re: 800A0401: Expected End of Statement
Thanks, I missed that in a big way.
P. Rifai
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Primadona Rifai Guest



Reply With Quote

