🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.dbexpress
Article #179

MySQL syntax error in runtime but not in design time

#179
From: Pere Mateu
Date: Thu, 27 Dec 2007 16:30
22 lines
1649 bytes
Hi,

I'm using BDS2007 with dbExpress to connect to MySQL server.
We set up the following components: SQLConnection, SQLDataSet, 
DataSetProvider and ClientDataSet.
We enter a simple query like this:

SELECT * FROM `TB_envases`

And in design time everything works fine: I can see all the registers from 
'TB_envases' in a DBGrid.
But when I execute the program, in runtime I get this error:

First chance exception at $7C812A5B. Exception class TDBXError with message 
'You have an error in your SQL syntax near ''TB_envases'' at line 1'. 
Process Project1.exe (2400)

I've tried to activate all the components manually by code, but the result 
is the same.
Any ideas?
Regards,
Pere 
Technical Details
Message-ID: <4773d306@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: fb4e2,e832bbc4400a56b7,start
X-Google-Attributes: gidfb4e2,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Pere Mateu" <pmateu@siam.es>
Newsgroups: borland.public.cppbuilder.database.dbexpress
Subject: MySQL syntax error in runtime but not in design time
Date: Thu, 27 Dec 2007 17:30:01 +0100
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.203.227.79
Message-ID: <4773d306@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1198772998 81.203.227.79 (27 Dec 2007 08:29:58 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail