Article View: borland.public.cppbuilder.database.ado
Article #5315Re: Access 97 Table Name
From: Jari Kettunen
Date: Thu, 21 Jun 2001 06:06
Date: Thu, 21 Jun 2001 06:06
35 lines
1987 bytes
1987 bytes
First use Query-components then use double "" parenthes around tablename in
SQL-Statement
Static statements in query-component should look alike ' select * from
"a:b:c:d" '
or in code
void __fastcall TForm1::Button1Click(TObject *Sender)
{
ADOQuery1->Close();
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add("select * from \"a:b:c:d\" ");
ADOQuery1->Open();
}
"Lee Gan" <leegan@hotmail.com> wrote in message news:3b30feed$1_1@dnews...
> I use ADO to access an MS Access 97 database. The table I am accessing has
a
> name like this: "a:aaa:aa:aaaa" where "a" is a char. The problem is if I
use
> an SQL statement like "SELECT * FROM a:aaa:aa:aaa WHERE ...", the program
> will interpret the table name a:aaa:aa:aaaa as a sequence of parameters
> because of the ":" within the table name. So what I did was first, create
a
> query which copies the contents of a:aaa:aa:aaaa but whose name does not
> contain the ":", and then do "SELECT * FROM QueryName WHERE ...".
>
> My question is: Does anyone know of an alternative solution without
creating
> a dummy query? Many thanks,
>
> Lee
>
>
>
>
Technical Details
Message-ID:
<3b318f14_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b30feed$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,5a793e13b2e06fa2 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-06-20 23:09:20 PST From: "Jari Kettunen" <john.doe@somewhere.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3b30feed$1_1@dnews> Subject: Re: Access 97 Table Name Date: Thu, 21 Jun 2001 09:06:07 +0300 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 212.146.11.6 Message-ID: <3b318f14_2@dnews> X-Trace: dnews 993103636 212.146.11.6 (20 Jun 2001 23:07:16 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews