Group:  Microsoft Access ยป microsoft.public.access.odbcclientsvr
Thread: ODBC Returning Multiple Records when there is only one

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

ODBC Returning Multiple Records when there is only one
newsposter[ at ]orion-forever.com 23.08.2006 18:50:12
Basically, when I link using odbc to a table in SQL, occasionally ODBC
will return multiple unique records when there really is only one.
It's starting to become a real issue as I have to group by to remove
the extra records (that don't really exist), but that comes at a
significant efficiency drop.

Here's the example, I have a table of customers. The employee, using a
access form field, searches the name "John Quinn". There is only one
"John Quinn" in the database, but it'll return two rows.

This problem spans many different tables.

Any help would be appreciated.

Re: ODBC Returning Multiple Records when there is only one
"Thanas" <atsioplakis[ at ]gmail.com> 23.08.2006 23:41:54
Can you post your Query? I think the problem has to be there.
-Thanas

newsposter[ at ]orion-forever.com wrote:
[Quoted Text]
> Basically, when I link using odbc to a table in SQL, occasionally ODBC
> will return multiple unique records when there really is only one.
> It's starting to become a real issue as I have to group by to remove
> the extra records (that don't really exist), but that comes at a
> significant efficiency drop.
>
> Here's the example, I have a table of customers. The employee, using a
> access form field, searches the name "John Quinn". There is only one
> "John Quinn" in the database, but it'll return two rows.
>
> This problem spans many different tables.
>
> Any help would be appreciated.

Re: ODBC Returning Multiple Records when there is only one
newsposter[ at ]orion-forever.com 24.08.2006 16:45:09
It really can't be in the query, no joins, the table does not have
multiple records, but when I use obdc, it returns multiple records.
this is the group by version, the one I'd rather use it just straight
(grouping across the 300,000 records I have impacts efficiency).


SELECT tblTransactions.player_code, tblTransactions.mlb_id,
tblTransactions.trans_date, tblTransactions.trans_code,
tblTransactions.org_from, tblTransactions.org_to,
tblTransactions.description, tblTransactions.trans_id,
tblTransactions.append_date, tblTransactions.bulletin,
tblTransactions.dl_detail
FROM tblTransactions
GROUP BY tblTransactions.player_code, tblTransactions.mlb_id,
tblTransactions.trans_date, tblTransactions.trans_code,
tblTransactions.org_from, tblTransactions.org_to,
tblTransactions.description, tblTransactions.trans_id,
tblTransactions.append_date, tblTransactions.bulletin,
tblTransactions.dl_detail
ORDER BY tblTransactions.trans_date DESC;

Re: ODBC Returning Multiple Records when there is only one
"Thanas" <atsioplakis[ at ]gmail.com> 24.08.2006 18:50:59
Now you got me curious. What kind of server was it again? You could
also try to Select Distinct. That may help you only return distinct
records. But you state that there is only one record in that table
correct? The other thing is to check that you have the latest ODBC
driver for whatever database you are using.

I am not sure if that really help any, but let me know.
-Thanas

newsposter[ at ]orion-forever.com wrote:
[Quoted Text]
> It really can't be in the query, no joins, the table does not have
> multiple records, but when I use obdc, it returns multiple records.
> this is the group by version, the one I'd rather use it just straight
> (grouping across the 300,000 records I have impacts efficiency).
>
>
> SELECT tblTransactions.player_code, tblTransactions.mlb_id,
> tblTransactions.trans_date, tblTransactions.trans_code,
> tblTransactions.org_from, tblTransactions.org_to,
> tblTransactions.description, tblTransactions.trans_id,
> tblTransactions.append_date, tblTransactions.bulletin,
> tblTransactions.dl_detail
> FROM tblTransactions
> GROUP BY tblTransactions.player_code, tblTransactions.mlb_id,
> tblTransactions.trans_date, tblTransactions.trans_code,
> tblTransactions.org_from, tblTransactions.org_to,
> tblTransactions.description, tblTransactions.trans_id,
> tblTransactions.append_date, tblTransactions.bulletin,
> tblTransactions.dl_detail
> ORDER BY tblTransactions.trans_date DESC;

Re: ODBC Returning Multiple Records when there is only one
<david[ at ]epsomdotcomdotau> 24.08.2006 22:27:32
do you have a primary key? Is the primary key returned in the
query dataset? can you post the code used to open the recordset?

(david)

<newsposter[ at ]orion-forever.com> wrote in message
news:1156359012.886142.315230[ at ]p79g2000cwp.googlegroups.com...
[Quoted Text]
> Basically, when I link using odbc to a table in SQL, occasionally ODBC
> will return multiple unique records when there really is only one.
> It's starting to become a real issue as I have to group by to remove
> the extra records (that don't really exist), but that comes at a
> significant efficiency drop.
>
> Here's the example, I have a table of customers. The employee, using a
> access form field, searches the name "John Quinn". There is only one
> "John Quinn" in the database, but it'll return two rows.
>
> This problem spans many different tables.
>
> Any help would be appreciated.
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net