Jim Lawrence
accessd at shaw.ca
Thu Dec 22 16:13:42 CST 2005
Hi John: Here is a method for checking: Dim MyobjCmd As ADODB.Command Set MyobjCmd = New ADODB.Command With MyobjCmd .ActiveConnection = MyConnectionString .CommandText = "MyEmployeeHasRecords" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("@intEmployee", adInteger, adParamInput, , glEmployeeNumber) .Execute Msgbox "There are " & str(.RecordsAffected) & " records on employee number " & str(glEmployeeNumber) & " in the system." End With HTH Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: December 22, 2005 6:03 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Must see dbseechanges I'm getting this error when opening a recordset using dao and a SQL Server table: You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column. I am using the following code: Set mrst = mdb.OpenRecordset(strsql, , dbSeeChanges) Notice that I AM using dbSeeChanges. These are ODBC linked tables in the SQL Server database. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com