Article View: borland.public.cppbuilder.database.ado
Article #4340Odd TADOQuery behavior?
From: user
Date: Fri, 15 Feb 2002 22:51
Date: Fri, 15 Feb 2002 22:51
31 lines
2233 bytes
2233 bytes
Hello I'm using BCB enterpise with ADO Update 1. I have an app with a simple query that returns 1 record against an Access 97 table under ADO 2.5 (ie, a Win 2K machine with Access97 installed), but returns no record under ADO 2.6 (a Win 2K machine with Access 2000 installed) when run against the same mdb file (either shared from the first machine or copied to a local drive). The query returns 1 record when pasted into the SQL window of either Database Desktop or SQL Explorer and run against the mdb file via ODBC. Here's the query: Select RawDataID, DataParent from header where JobKey = 1443 I've tried parameterizing the value of JobKey, typing it in as a literal part of the SQL string, and passing it in as a String that is appended to the SQL statement. In all cases, once I call Open() on the TADOQuery, calling First(), RecordCount(), or just attempting to read the returned values throws an Exception. If I remove the where clause, the query still returns no record even though I know the table exists and contains data. Other tables in the same Access mdb file are returning data. Since the call to Open() succeeds, I presume the table name of 'header' is allowed. I'm stumped. Can anyone suggest what's wrong? Thanks David
Technical Details
Message-ID:
<3C6D90E3.6080305@domain.invalid>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news-x2.support.nl!newsfeed.frii.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,4e89e2b9a42735ac,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-02-14 14:52:32 PST Message-ID: <3C6D90E3.6080305@domain.invalid> Date: Fri, 15 Feb 2002 14:51:15 -0800 From: user@domain.invalid User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: Odd TADOQuery behavior? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 216.175.100.137 X-Trace: dnews 1013726744 216.175.100.137 (14 Feb 2002 14:45:44 -0800) Lines: 32 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news-x2.support.nl!newsfeed.frii.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews