Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 28th, 2004, 08:38 AM
cl21 cl21 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 cl21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
"Token unknown" for nonexistent colon

Hi!
I am using the Firebird managed data provider for .NET and Mono Version 1.6.3 with Firebird 1.5.1 and have a very strange problem.
I was able to open an FbConnection and could also write a tuple into my database:

FbTransaction t = Db.BeginTransaction();
string q = "insert into session(id, site) values(gen_id(sessionid,1),"+SiteId+")";
FbCommand command = new FbCommand(q, Db, t);
command.ExecuteNonQuery();
...

I am using the Marathon administration tool and a tuple was inserted correctly. So far so good...
Later in the program I tried to insert another tuple:

FbTransaction t = Db.BeginTransaction();
string q = "insert into screen(id, title) values(gen_id(screenid,1),'hello')";
FbCommand command = new FbCommand(q, Db, t);
command.ExecuteNonQuery();
...

But when the query is executed (last line before the "..."), a dynamic error occurs:

FirebirdSql.Data.Firebird.FbException: Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 82
:

As far as I understand the message says that there is a misplaced colon at column 82 in the query string. But the string isn't even 82 characters long, apart from the fact that there is no colon in the string. I modified the string so that it was more than 82 characters long but, no matter what I wrote, the same error occurred. What can I do?

Thanks in advance for any help,
Christof

Reply With Quote
  #2  
Old November 2nd, 2004, 07:50 AM
cl21 cl21 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 cl21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Problem solved

Yes... this was just too mysterious to be a Firebird bug. I found the mistake and it was not related to Firebird

Reply With Quote
  #3  
Old November 2nd, 2004, 10:40 PM
tim snl's Avatar
tim snl tim snl is offline
Code Cruncher
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Tasmania, Australia
Posts: 119 tim snl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 21 m 20 sec
Reputation Power: 8
Talking

Quote:
nonexistent colon

That sounds very painful
Sounds like you have a problem yourself!
Glad you fixed it.
__________________
Beware of a programmer with a screwdriver!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > "Token unknown" for nonexistent colon


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway