Article View: borland.public.cppbuilder.database.ado
Article #2397Re: Strange Behaviour
From: yufufi
Date: Fri, 11 Jul 2003 16:23
Date: Fri, 11 Jul 2003 16:23
49 lines
2641 bytes
2641 bytes
sorry my mistake:
no is a reserverd word. I should have figure it out
"yufufi" <yufufi@hotmail.com> wrote in message
news:3f05226f@newsgroups.borland.com...
> 1)
> I'm connecting to an access db with ADOConnection component
> connection string = Provider=Microsoft.Jet.OLEDB.4.0;Password="";User
> ID=Admin;Data Source=H:\My Projects\Hfbc\db\maindb.mdb;Mode=Share Deny
> None;Extended Properties="";Jet OLEDB:System database="";Jet
OLEDB:Registry
> Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet
> OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet
> OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet
> OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet
> OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
> Repair=False;Jet OLEDB:SFP=False
>
> I query the db and check the results from dbgrid
> Interestingly
>
> SELECT * FROM something WHERE no=2 returns nothing
> WHERE no<3 returns
first
> 2 row (no=1,2)
> WHERE no>1 returns
> nothing
> WHERE no<5 returns
first
> 4 row
> WHERE name='someone'
> returns correct result
>
> What might be the problem??
>
> 2)after
> SELECT no FROM sometable;
> FieldByName("no") gives the error "Field no not found"
> but
> after
> SELECT * FROM sometable;
> FieldByName("no") works smoothly??
>
> Thanx a lot
>
> Furkan Fidan
>
>
>
Technical Details
Message-ID:
<3f0ee49f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f05226f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,a42ea1625e3907b3 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-07-11 09:41:40 PST From: "yufufi" <yufufi@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3f05226f@newsgroups.borland.com> Subject: Re: Strange Behaviour Date: Fri, 11 Jul 2003 19:23:57 +0300 Lines: 51 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 195.174.18.93 Message-ID: <3f0ee49f@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1057940639 195.174.18.93 (11 Jul 2003 09:23:59 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail