Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Modules daovba ado > Left join query...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1453 of 1609
Post > Topic >>

Left join query in ADO gives FALSE instead of NULL from linked sqlserver

by "Brian" <s@[EMAIL PROTECTED] > Apr 11, 2008 at 07:59 PM

(previously posted in .formscoding group but got no responses)

Hi,
I have been using DAO and ADO for years to get at data from linked tables
and by accident I am finding a fault with ADO.

My query is below and tmpTrans is a local Access table while all the
others
are SQL2005 tables.  I am linked to all of them.

If I use     DAO - Set rsMembers = CurrentDb.OpenRecordset(strSQL,
dbOpenDynaset, dbSeeChanges, dbReadOnly)
and get   0001           1             28921.71     False          0
                0003           1             0.14             Null
Null

If I use   ADO - rsMembers.Open strSQL, CurrentProject.Connection,
adOpenForwardOnly, adLockReadOnly, adCmdText
and get   0001           1             28921.71     False          0
                0003           1             0.14             False
Null                       ' which is WRONG !!!!!!!!!! False should be
Null

SELECT tblMembers.AcNo,
                tmpTrans.AcTyp, tmpTrans.Balance,
                tblOver70Bals.Covered, tblOver70Bals.ShareBal,
FROM (tblMembers LEFT JOIN tblOver70Bals ON tblMembers.AcNo =
tblOver70Bals.AcNo) INNER JOIN tmpTrans ON tblMembers.AcNo = tmpTrans.AcNo
WHERE  (tblMembers.AcOpen <> 0)
ORDER BY tmpTrans.AcTyp, tmpTrans.AcNo;

Can anyone explain please?
Any solution?  I prefer ADO.
I may now have to go back and review mounds and mounds of queries.

Thanks
Brian
 




 1 Posts in Topic:
Left join query in ADO gives FALSE instead of NULL from linked s
"Brian" <s@[  2008-04-11 19:59:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 8:49:59 CST 2008.