| View previous topic :: View next topic |
| Author |
Message |
Mark Horrocks Guest
|
Posted: Thu May 10, 2007 7:08 pm Post subject: Occaisional bug in 7.08 IBDataset |
|
|
I use IBDataset for inserts. My SQL will typically be select * from MyTable
where aKeyField = 0
Sometimes, If I try to add fields using field editor after adding a new
table to the DB (Firebird 2.0) I get an SQL error "..token unknown line 2
column 1 from".
The SQL couldn't be simpler. If I use the field names in the SQL statement
instead of * I get the same error even when "from" is nowhere near line 2 .
The only thing that fixes the problem is to delete the IBDataset and replace
it with a new one.
Any ideas what causes this? I have double checked that the SQL is saved but
clearly something is not being updated or is corrupted.
Mark Horrocks |
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Thu May 10, 2007 10:21 pm Post subject: Re: Occaisional bug in 7.08 IBDataset |
|
|
IBX, AFAIK, never changes your SQL at all. You can use the
TIBSQLMonitor to see what the app is doing, but if you're getting bad
SQL it must be from your app.
--
Craig Stuntz [TeamB] ˇ Vertex Systems Corp. ˇ Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Borland newsgroup denizen Sergio González has a new CD of
Irish music out, and it's good: http://tinyurl.com/7hgfr |
|
| Back to top |
|
 |
Francois Malan Guest
|
Posted: Fri May 11, 2007 8:11 am Post subject: Re: Occaisional bug in 7.08 IBDataset |
|
|
Mark Horrocks wrote:
| Quote: | I use IBDataset for inserts. My SQL will typically be select * from
MyTable where aKeyField = 0
Sometimes, If I try to add fields using field editor after adding a
new table to the DB (Firebird 2.0) I get an SQL error "..token
unknown line 2 column 1 from".
The SQL couldn't be simpler. If I use the field names in the SQL
statement instead of * I get the same error even when "from" is
nowhere near line 2 . The only thing that fixes the problem is to
delete the IBDataset and replace it with a new one.
Any ideas what causes this? I have double checked that the SQL is
saved but clearly something is not being updated or is corrupted.
Mark Horrocks
|
How do you add the fields?
If you do something like MyDataset.SQL.Add('SELECT a,b,c FROM mytable')
then of course you could end up with a problem, you should first clear
the existing SQl with MyDataSet.SQL.Clear; ... and the add your sql.
-- |
|
| Back to top |
|
 |
ssamayoa Guest
|
Posted: Sat May 12, 2007 2:52 am Post subject: Re: Occaisional bug in 7.08 IBDataset |
|
|
| Quote: | Sometimes, If I try to add fields using field editor after adding a new
table to the DB (Firebird 2.0) I get an SQL error "..token unknown line 2
column 1 from".
|
I experienced similar problems but with "select" clause at run time. The
only solution is to edit the form / data module source, change anything
(hit space in empty line) and recompile then the error goes away.
Did you try disconnectiong / connection the database component?
Regards.
--- posted by geoForum on http://delphi.newswhat.com |
|
| Back to top |
|
 |
Mark Horrocks Guest
|
Posted: Tue May 15, 2007 4:38 pm Post subject: Re: Occaisional bug in 7.08 IBDataset |
|
|
I am getting this error with SQL at design time, I am not changing the SQL
at run time. It happens with SQL as simple as select * from mytable where
pkfield = 0.
If I blank the SQL and replace it the problem remains, if I change the SQL
(at design time) to select field names instead of * the problem remains with
the original error message pointing to the original (now wrong) line.
Deleting the dataset and replacing it fixes the problem. |
|
| Back to top |
|
 |
|