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 ODBC Client Server > Left join query...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1457 of 1511
Post > Topic >>

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

by "Brian" <s@[EMAIL PROTECTED] > Apr 13, 2008 at 08: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 the tables 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            False          0
                0003            Null            Null               
'correct

If I use   ADO - rsMembers.Open strSQL, CurrentProject.Connection,
adOpenForwardOnly, adLockReadOnly, adCmdText
and get   0001            False          0
                0003            False         Null                       '

which is WRONG !!!!!!!!!! False should be Null

SELECT tblMembers.AcNo,
                tblOver70Bals.Covered, tblOver70Bals.ShareBal
FROM tblMembers LEFT JOIN tblOver70Bals ON tblMembers.AcNo =
tblOver70Bals.AcNo

tblOver70Bals.Covered is a BIT field
tblOver70Bals.ShareBal  is a currency field

If I open my own ADO connection using the SQLOLEDB driver directly to the 
server it works correctly.
It seems that the JetOLEDB driver is not reading the bit values correctly
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-13 20:59:53 

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 23:14:41 CST 2008.