The following MSAccess VBA code worked well with SQL Server 2005, but produces an error with SQLServer 2012.
The error is #3251 "Current recordset does not support updating".
Set gCnn = New ADODB.Connection
gCnn.ConnectionString = "Driver={SQL Server Native Client 11.0};Server=myCOMPUTER\mySERVER;DSN=mydataDSN;Database=myData;UID=medb;PWD=abc123;Trusted_Connection=yes;"
gCnn.Open
Dim rst As ADODB.Recordset
Dim sql As String
Set rst = New ADODB.Recordset
rst.CursorLocation = adUseClient
sql = "SELECT * FROM tblQuoteLob WHERE (QuoteID = " & Me!QuoteID & ")"
rst.Open sql, gCnn, adOpenKeyset, adLockOptimistic
If rst.EOF And rst.BOF Then
'add a new record
rst.AddNew
rst!QuoteID = Me!QuoteID
rst.Update
End If
rst.Close
Set rst = Nothing
Any Ideas?