It is currently Thu Dec 13, 2018 6:11 pm




Post new topic Reply to topic  [ 12 posts ] 
End Of Statement Error(s) 
Author Message

Joined: Mon Apr 13, 2009 12:15 pm
Posts: 11
Post End Of Statement Error(s)
I am using dbqwiksite V6. I can design a site or pages
using the wizard. However whenever I move away from the
design tab of ANY page (to goto Preview) I immediately
get an error:

Script error detected at line 1571.
Source line: SQL = SQL & " Legal_referral."rec_id"," & vbCrLf
Description: Expected end of statement

The line number may change depending on actual page but
the error is consistent and repeatable. "rec_id" is my primary
key to a MS SQL database. "Legal_referral" is the table name.

I have not done anything fancy to the ASP output. I have not
had it long enough to do that. Only the dbq demos seem to be able
to work in Preview. "Test on PC" also creates same error.

Has anyone had success in using V6 with MS SQL Server?
Please help, I need to get past first base.


Thu Apr 01, 2010 12:40 pm
Profile E-mail

Joined: Mon Mar 15, 2010 2:36 am
Posts: 5
Location: Atlanta USA
Post Re: End Of Statement Error(s)
Iceman,

I've gotten similar error messages (also at line 1571) with primary keys with the same scenario you describe. I am using dbQwiksite 6 with MS Access db. I've usually able to correct the error by using dbQwiksite's Table Editor to drop the primary key, then add it back.

Sometimes I get a "table locked" message from the Table Editor within dbQwiksite and it won't allow access at all to the table. I've been able to get around that by using dbQwikEdit.

I've been able to correct numerous "like" error messages under same scenario by "drop/add keys" and "drop/add fields".

Hope this helps.

_________________
Art in Atlanta


Mon Apr 05, 2010 1:44 am
Profile E-mail WWW

Joined: Sun Jan 13, 2008 1:49 am
Posts: 146
Location: Texas, USA
Post Re: End Of Statement Error(s)
Make sure that you do not use MS Access 2007.


Mon Apr 05, 2010 2:46 am
Profile

Joined: Mon Apr 13, 2009 12:15 pm
Posts: 11
Post Re: End Of Statement Error(s)
After posting my original msg, I decided to closely examine code that worked and code that didn't.

The following did NOT work:

Script error detected at line 1571.
Source line: SQL = SQL & " Legal_referral."rec_id"," & vbCrLf
Description: Expected end of statement

Code that would work:
Source line: SQL = SQL & " Legal_referral.'rec_id'," & vbCrLf

Note the single quotes around 'rec_id' in the second instance. That seems to be what dbQ wants. In the first instance the code generator puts DOUBLE QUOTES around this field name. When you analyze it, it CAN NOT store a value to the var SQL. Therefore "Expected end of statement" error.

This should be an easy fix at dbQwik and I can not figure out why they will not get it to us. For some reason their code generator writes out the code string in a manner that breaks the code.

Ugain, I am curious about your "fix" and admit I haven't tried that yet. My worry is that your fix would only work if you indeed have no records in the table if you are going to be forced to drop a primary key. Are you actually dropping the field or are you just dropping it's definition as a primary key?

In either event, that seems to be a drastic "fix" that the makers are forcing us to take. Obviously, that shouldn't be the case.

If you can more verbosely explain what you did, I and others may understand better the exact steps you took.

Thanks,

Tom


Mon Apr 05, 2010 3:53 am
Profile E-mail

Joined: Mon Apr 13, 2009 12:15 pm
Posts: 11
Post Re: End Of Statement Error(s)
My previous msg meant to refer to member
Anacht instead of Ugain. Sorry for the confusion.


Mon Apr 05, 2010 4:07 am
Profile E-mail

Joined: Mon Mar 15, 2010 2:36 am
Posts: 5
Location: Atlanta USA
Post Re: End Of Statement Error(s)
Iceman11,

re: "Are you actually dropping the field or are you just dropping it's definition as a primary key? "

I drop the definition as primary key, not the field. Then I immediately add it back with the Table Editor. I've done it with records in the table without any loss. However, I'm working with a test database and I wouldn't do it with a live/real db without a backup.

Note: This is my own workaround, not one advised by tech support. Just one of several I've developed through educated guesses and experimentation.

_________________
Art in Atlanta


Mon Apr 05, 2010 4:30 am
Profile E-mail WWW

Joined: Mon Apr 13, 2009 12:15 pm
Posts: 11
Post Re: End Of Statement Error(s)
Anacht,

[re: I drop the definition as primary key, not the field. Then I immediately add it back with the Table Editor. I've done it with records in the table without any loss. However, I'm working with a test database and I wouldn't do it with a live/real db without a backup.]

I have tried your suggestion will unchanged outcomes. Let me try a
different tactic.

I very much want V6 to work for me but at it's current stage I can't
even get one compile to actually work. Unbelievable!!!

Can you please explain to me your EXACT computer and software configuration. I want to try to duplicate that to see if I can gain some success.

Computer OS - XP / Vista etc. ?
Version of dbQwiksite ?
Name of Database (Access, SQL Server etc.) ?
Version of the above db?
Using what language for code generation ( ASP, PHP, ASP.Net) ?
Are db's local or remote or both?
Are there field types you try to stay away from?
Any other spec that might be meaningful and helpful?

When all is said and done, would you consider using this code in a mission critical application?

Your assistance would be informative to me and others.

Thanks!


Tue Apr 06, 2010 3:40 am
Profile E-mail

Joined: Mon Mar 15, 2010 2:36 am
Posts: 5
Location: Atlanta USA
Post Re: End Of Statement Error(s)
Iceman,

Answers to your questions:

Dell Dimension 3000 p4 2.8 ghz, 2gb RAM, XP Pro w/service pack 3
dbQwiksite 6.0.0.6

Access (local db) version? Is there a version?
I did not have an existing db. I used dbQwiksite's project wizard to create an MDB file. All the tables, fields, keys, etc. were generated with dbQwiksite.

Generating PHP and mySQL for remote host.

I'm only using field types that dbQwiksite's Project (Database?) Wizard and Table Editor allow.

At one point I was going to order Access 2003 to create/edit table structures with the thought that my MDB file generated by dbQwiksite might be causing problems. Seems like maybe I'm a rare bird starting with no database. Now I'm trying to get the WAMP server running and develop purely in the PHP and mySQL environment on the local side to rule out any issues with Access and ASP.

Hope this helps.

_________________
Art in Atlanta


Tue Apr 06, 2010 8:01 am
Profile E-mail WWW

Joined: Sun Jan 13, 2008 1:49 am
Posts: 146
Location: Texas, USA
Post Re: End Of Statement Error(s)
I have a similar set-up. Sony-VAIO with 3GHz Intel P4, 3Gb RAM, Win7_Ultimate_32bit.

I have Enterprise Office 2007. If I use Access 2007 file I get all sorts of errors.
The QS internally creates MS_Access 2000 mdb tables. These seem to work much better. :?: :?: :?:


Tue Apr 06, 2010 1:28 pm
Profile

Joined: Sat Oct 10, 2009 1:33 am
Posts: 8
Post Re: End Of Statement Error(s) EASY FIX... ha cha cha
8) USE SQUARE BRACKETS INSTEAD OF QUOTES
EXAMPLE:
SELECT
[TABLE1].[FIELD1],
[TABLE1].[FIELD2],
[TABLE1].[FIELD3],
[TABLE1].[FIELD4]
FROM [dbo].[TABLE1] [dbo].[TABLE1]

DO NOT USE "TABLE1"."FIELD1",

The DBQwiksite Program adds quotes, yechhh

In other words remove the quotes that the program generates in the SQL windows and replace them with left and right brackets


Tue May 18, 2010 10:01 pm
Profile E-mail

Joined: Mon Apr 13, 2009 12:15 pm
Posts: 11
Post Re: End Of Statement Error(s)
Webwork,

You said :
"USE SQUARE BRACKETS INSTEAD OF QUOTES
EXAMPLE:
SELECT
[TABLE1].[FIELD1],
[TABLE1].[FIELD2],
[TABLE1].[FIELD3],
[TABLE1].[FIELD4]
FROM [dbo].[TABLE1] [dbo].[TABLE1]

DO NOT USE "TABLE1"."FIELD1",
"
On the surface I find your response interesting but it is unclear to me as to when you might expect to use this technique.

As we all know DBQ is a code generator. You may make dozens of minor changes to your logic and/or table structure while attempting to build a "real system". Are you saying that I would need to take the generated code "EACH TIME" and substitute quotes with square brackets. If so I would be spending 2/3 of my time changing quotes.

Also EXACTLY where are we supposed to make those changes. You say in the "SQL windows". What SQL windows are you speaking of? So far I have been unable to even test my session in the live window (because of the error -re-read my original post).

Please be verbose in your answers so that we all might benefit from your answers to a problem that is troubling us all. How do you get to your code and does that mean you can no longer make anymore changes?

Thanks!


Wed May 19, 2010 3:11 am
Profile E-mail

Joined: Sat Oct 10, 2009 1:33 am
Posts: 8
Post Re: End Of Statement Error(s) BAD BUG
Actually square brackets may cure one issue only to end up with another. They were to go into the custom SQL Query. End of statement errors are happening because too many quotes are ending up on the field names in V6 IN MS SQL 2000. The queries work without two sets of double quotes around the field names, V6 at least for me is generating two sets of double quotes on the output. Square brackets eliminated this issue for me in the data page and the local preview worked fine. The update and add queries were still broken. The PHP version output works fine. It is only the ASP I am having this issue. In my opinion this is a bad bug.


Wed May 19, 2010 6:08 am
Profile E-mail
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Copyright © 2004-2008 TheDevShop Ltd. All Rights Reserved