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


Data Bases > Microsoft Access > Re: Bug in ADO,...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 9 Topic 30224 of 31296
Post > Topic >>

Re: Bug in ADO, SQL Server and latest OS SPs

by lyle fairfield <lylefa1r@[EMAIL PROTECTED] > May 11, 2008 at 11:23 AM

This (the kb article is not wonderfully informative.

How does an application query "the identity column of a newly inserted 
row"? Are we talking @[EMAIL PROTECTED]
 long is a newly inserted row a newly inserted row?

This occurs, according to the article, when we use a client side cursor.
So let's check:

First, do I qualify?
Microsoft SQL Server Management Studio Express 9.00.2047.00
Microsoft Data Access Components (MDAC) 6.0.6000.16386 (vista_rtm.061101-
2205)
Operating System 6.0.6000
Think so, but who can be sure?

Sub temp()
Dim c As ADODB.Connection
Dim r As ADODB.Recordset
Set c = New ADODB.Connection

With c
..CursorLocation = adUseClient
..Open CurrentProject.BaseConnectionString
..Execute ("SET NOCOUNT ON")
End With

Set r = New ADODB.Recordset
With r
..ActiveConnection = c
..CursorLocation = adUseClient
..CursorType = adOpenStatic
..LockType = adLockOptimistic
..Open "SELECT * FROM Schools"

..AddNew Array(1), Array("Test")
Debug.Print .ActiveConnection.Execute("SELECT @[EMAIL PROTECTED]
")(0)
‘ 5280 – no bug here

..AddNew Array(1), Array("A Second Test")
Debug.Print .ActiveConnection.Execute("SELECT ID FROM Schools WHERE Name 
= 'A Second Test'")(0)
‘ 5281 – no bug here

End With

Whew! My personal VBA code and ASP code and HTA Script may not be 
affected.

But can I be sure that bound forms in Access aren’t affected? I don’t 
know. Access is an application. One has only to look at Northwinds, the 
code produced by Access Wizards, and various KB solutions to realize that 
MS is indifferent to good programming and coding practices. So does this 
article mean a bound form in an ADP may fail?

I have a couple ADPs in operation but no problem like the one described 
has ever been re****ted to me.

I won’t worry about this right now, but perhaps, someone else will post 
code that will demonstrate the bug?


"Tony Toews [MVP]" <ttoews@[EMAIL PROTECTED]
> wrote in 
news:g61d24524dubaimjg1pecanourr2blnbp1@[EMAIL PROTECTED]
> Thanks to a posting by fellow MVP Steve Foster
> 
> On a computer that is running Windows Vista, Windows Server 2008, or
> Windows XP, an incorrect value is returned when an application queries
> the identity column value of a newly inserted row in various versions
> of SQL Server 2005 and of SQL Server 2000
> http://sup****t.microsoft.com/kb/951937
 




 9 Posts in Topic:
Bug in ADO, SQL Server and latest OS SPs
"Tony Toews [MVP]&qu  2008-05-10 23:34:57 
Re: Bug in ADO, SQL Server and latest OS SPs
lyle fairfield <lylefa  2008-05-11 11:23:32 
Re: Bug in ADO, SQL Server and latest OS SPs
"Tony Toews [MVP]&qu  2008-05-11 12:33:35 
Re: Bug in ADO, SQL Server and latest OS SPs
lyle fairfield <lyle.f  2008-05-11 17:27:36 
Re: Bug in ADO, SQL Server and latest OS SPs
"Sylvain Lafontaine&  2008-05-11 18:51:07 
Re: Bug in ADO, SQL Server and latest OS SPs
"Tony Toews [MVP]&qu  2008-05-12 21:17:01 
Re: Bug in ADO, SQL Server and latest OS SPs
lyle fairfield <lyle.f  2008-05-12 15:07:49 
Re: Bug in ADO, SQL Server and latest OS SPs
"Tony Toews [MVP]&qu  2008-05-12 22:36:42 
Re: Bug in ADO, SQL Server and latest OS SPs
"aaron.kempf@[EMAIL   2008-05-13 03:13:50 

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 Oct 10 12:48:31 CDT 2008.