MS Access VB ODBC LINK PROBLEM

This is a discussion on MS Access VB ODBC LINK PROBLEM within the ODBC forums in Framework and Interface Programming category; Hi- I've got a problem with the code below. Not so much with the SELECT statement, but with the results. It I import the data from the server this query works great, but with a LINK it returns incorrect results. As an example with a link this query will return a recordcount of 1. If I do a findfirst then findlast then findfirst it will find, correctly 3 records. This is all based on the same 'Account_number' and History_Event_NTD range for both examples. WHAT IS IT WITH ODBC LINK VS. AN ODBC IMPORT THAT CAUSES SELECT STATEMENT NOT TO RETURN ...

Go Back   Application Development Forum > Framework and Interface Programming > ODBC

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-03-2003, 10:42 AM
Scott
Guest
 
Default MS Access VB ODBC LINK PROBLEM

Hi-

I've got a problem with the code below. Not so much with the SELECT
statement, but with the results. It I import the data from the server this
query works great, but with a LINK it returns incorrect results.

As an example with a link this query will return a recordcount of 1. If I do
a findfirst then findlast then findfirst it will find, correctly 3 records.
This is all based on the same 'Account_number' and History_Event_NTD range
for both examples.

WHAT IS IT WITH ODBC LINK VS. AN ODBC IMPORT THAT CAUSES SELECT STATEMENT
NOT TO RETURN THE COMPLETE AMOUNT OF DATA AND HOW CAN WE GET AROUND THIS
PROBLEM?

Scott

Set ALTRANHD_rst = CurrentDb.OpenRecordset("SELECT ALTRANHD.* FROM ALTRANHD
" & _
" WHERE (((ALTRANHD.ACCOUNT_NUMBER)='" & ALTRANDT_rst!Account_Number & "')"
& _
" AND ((ALTRANHD.HISTORY_EVENT_NTD)>='" & ALTRANDT_rst!HISTORY_EVENT_NTD &
"'" & _
" AND (ALTRANHD.HISTORY_EVENT_NTD)<='" & ALTRANDT_rst!HISTORY_EVENT_NTD +
0.003 & "'))" & _
" ORDER BY ALTRANHD.ACCOUNT_NUMBER, ALTRANHD.HISTORY_EVENT_NTD,
ALTRANHD.INCIDENT_NUMBER;")





Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:16 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.