Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error with VB "End of statement expected."

Status
Not open for further replies.

neomax

Programmer
Jul 1, 2006
29
BG
I've right some code for ASP VB, and now I go with that code to ASP.NET (.aspx), and errors shows at moment! So, please help me , please!!
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30205: End of statement expected.

Source Error:



Line 164: sqlWhere = " where zipstart.ZipStart ='" & strZip & "'"
Line 165: qlStr = " select ChapterName.EmailAddress, ChapterName.ChapterName, Chaptername.City, ChapterName.ChapterState, ChapterName.Phone1, Chaptername.Phone2, ChapterName.ChapterState, ChapterName.ChapWebsite " _
Line 166: "from ChapterName inner join zipstart on Chaptername.ChapterCode = zipstart.ChapterCode " & sqlWhere ;
Line 167:
Line 168: rs = Server.CreateObject("ADODB.recordset")

Line 164 is with error
 
Firstly, the problem is most likely that the SQL is incorrect so check what you are actually executing on the database server.

Then, get rid of the classic asp method of "recordsets" and have a look at ADO.NET.

Last of all, use SQL Parameters as you are currently open to SQL Injection attacks.




____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I would suspect your error is with line 166...remove the semicolon at the end.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top