|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
en of statement error
hi
i keep getting this error message and dont know why Microsoft VBScript compilation (0x800A0401) Expected end of statement /------/------.asp, line 20, column 31 here is the script <!--- should get ---> <!--- current system date and time ---> Today's date and time is <%=Now()%><br> <% 'search the database Set MyConnection=Server.CreateObject ("ADODB.Connection") MyConnection.Open "database" 'MySQLQuery = "Select * from ParentTable WHERE (keyword= '" 'MySQLQuery = MySQLQuery & Request("personID") 'MySQLQuery = MySQLQuery & "')" 'SELECT ParentTable.Name, ParentTable.GroupID, personID.personID 'FROM personID INNER JOIN ParentTable ON personID.ID = ParentTable.personID; MySQLQuery = "SELECT ParentTable.Name, ParentTable.GroupID, personID.personID= " MySQLQuery = MySQLQuery & FROM personID INNER JOIN ParentTable ON personID.ID = ParentTable.personID" Set MyRecordSet=MyConnection.Execute(MySQLQuery) MySQLQuery = MySQLQuery & Request("personID") MySQLQuery = MySQLQuery & "')" Set MyRecordSet=MyConnection.Execute(MySQLQuery) heres is where the error occurs MySQLQuery = "SELECT ParentTable.Name, ParentTable.GroupID, personID.personID= " MySQLQuery = MySQLQuery & FROM personID INNER JOIN ParentTable ON personID.ID = ParentTable.personID" Set MyRecordSet=MyConnection.Execute(MySQLQuery) MySQLQuery = MySQLQuery & Request("personID") MySQLQuery = MySQLQuery & "')" Set MyRecordSet=MyConnection.Execute(MySQLQuery) i hope someone can help thanks |
|
#2
|
|||
|
|||
|
Is this on two lines? -
MySQLQuery = "SELECT ParentTable.Name, ParentTable.GroupID, personID.personID= " If it is, ASP doesn't like continuation lines. Your error is basically saying you haven't closed a statement with a " or similar. Do you use an editor that colour codes your code for you? Makes it extremely easy to spot mistakes. |
![]() |
| Viewing: SEO Chat Forums > Other > SEO Scripts > en of statement error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|