Topics Search

dbSeeChanges

dbSeeChanges
Views: 144
I'm getting an error : A new error has occured. Run-time error 3622

"You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column."

I've tried adding dbSeeChanges (in red below), but I then get an Invalid Argument Error.

Can anyone tell me where I'm going wrong. Thanks.

Dim rs As ADODB.Recordset
Lot = """" & Me.Lot.Value & """"
SQL = "Select * from dbo_WipDevStatus where Lot = " & Lot & ""
Set rs = CurrentDb.OpenRecordset(SQL, dbSeeChanges)
Sponsored Links:

More topics

 

using dbSeeChanges

Preview
I have had to upsize an Access 2003 BE to SQL Server 2005. This means for each table in SQL Server that has an IDENTITY field I will need to add the optional parameter dbSeeChanges to each recordset used.
What I would like to know is, does it matter if I use the dbSeeChanges option on tables that don't have an IDENTITY field?
Also can it be used on local access tables?

The reason I ask is that it is easier to change all OpenRecordset commands than just the ones that use the IDENTITY field.
 

dbSeeChanges

Preview
I have a form which acts as a search form to find records within the database.

The database was created in access but has since had the table upsized to SQL 2005. The Search Form was working but now I get the following error displayed.

You must see the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column.

The debugger takes me the the following lines of code.

Set db = CurrentDb
Set rcd = db.OpenRecordset("select " & _
"IT_SupportTable.LogNumber " & _
"FROM IT_SupportTable" & _
" WHERE " & strWhere & ";")

Can anyone help me with where I should be putting the dbSeeChanges
 

dbSeeChanges

Preview
I have a form which acts as a search form to find records within the database.

The database was created in access but has since had the table upsized to SQL 2005. The Search Form was working but now I get the following error displayed.

You must see the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column.

The debugger takes me the the following lines of code.

Set db = CurrentDb
Set rcd = db.OpenRecordset("select " & _
"IT_SupportTable.LogNumber " & _
"FROM IT_SupportTable" & _
" WHERE " & strWhere & ";")

Can anyone help me with where I should be putting the dbSeeChanges
 

You Must use dbseechanges option with openrecordset Error

Preview
I am trying to run queries in other databases by using the following code:

'Opening the Database Set db = DBEngine.Workspaces(0).OpenDatabase("C:\Test\Test12\Testdb.mdb") 'Running specified queries db.Execute "qry_try_This", dbFailOnError Set db = Nothing

But I keep getting the error of:
Run time error 3622
You must use dbseechanges option with openRecordset option when accessing a SQL server table that has an Identity column

I am by far a beginner using DAO, and am not sure what exactly is causing this error, or how to correct it
 

Error #3622 After Migrating my Database

Preview
I successfully (I think) migrated my Access 2007 db to MSSQL Server 2008R2 but I am getting error #3622 "You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column." when I try to run the following code:

Set rsCompany = dbs.OpenRecordset("SELECT * FROM [Company Information] WHERE CompanyDefaultLocation Like 'Yes'")

Do you know what is causing this? I get a similar error with the following lines of code:

Set rs = CurrentDb.OpenRecordset("SELECT * From Contacts WHERE ContactCompany =""" & Me.Client & """") and Set rsLoginAttempt = db.OpenRecordset("LoginAttempt")

I don't see a pattern to know what I need to change.

I do not get the error when I run the code:

Set rs = db.OpenRecordset("SELECT * FROM Employee WHERE EmployeeUserName =""" & EnteredUserName & """") and
Set rstProjectName = dbs.OpenRecordset("Project File")

What is the dbSeeChanges option that is referred to in the error message
 

error 3061

Preview
I have a form, in which, when the user enters the zipcode, it should obtain the relevant city, state and county from the table.

After entering the zipcode, it gives out an error 3061 and highlights as below:

Set rstAny = dbAny.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)

The fullcode is as below.

Private Sub txtZipCode_AfterUpdate()
Dim strSQL As String
Dim dbAny As DAO.Database
Dim rstAny As DAO.Recordset
strSQL = "SELECT Z.City, Z.StateCode, C.CountyCode, C.PrimaryPOPArea " & _
"FROM ZIPCodes As Z INNER JOIN ZipToCountyLink As C " & _
"ON Z.ZIPCode = C.ZIPCODE " & _
"WHERE Z.ZIPCode=" & Chr(34) & Me.txtZipCode & Chr(34) & _
" ORDER BY C.PrimaryPOPArea Asc"

Set dbAny = CurrentDb()
Set rstAny = dbAny.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)

If rstAny.RecordCount > 0 Then
rstAny.MoveLast
rstAny.MoveFirst

Me.txtCity = rstAny!City
Me.txtState = rstAny!State
 

View Select Query using DAO

Preview
I am trying to create a button on a form and have it run a select query and display the results using DAO. it debugs fine, just does not actually show me the query

Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("qry_Test", dbOpenSnapshot, dbSeeChanges)
 

ODBC Error 3146 on rs.update

Preview
Using MS Access, I have a form that is based on a table called Motion_Imagery. In the VBA of this code I want to take two fields on the form and add the data in those two fields to the last record that was added to table Online_Books. When I run my code I get the error when it gets to rs.update, here is my code:

Set db = CurrentDb()
Set rs = db.OpenRecordset("dbo_Filestream_Files", dbOpenDynaset, dbSeeChanges)

rs.MoveLast

rs.Edit
rs![Prefix_CTRL_NBR] = Me.Prefix_CTRL_NBR
rs![CTRL_ID] = Me.CTRL_NBR
 

Vba rs.update causing odbc error 3146

Preview
I am getting an error 3146 odbc on rs.update. I have a form (form1) based on table motion_imagery. In form1, using

VBA I'm trying to load two fields from form1 into table 2, File_Books.

Set db = CurrentDb()
Set rs = db.OpenRecordset("dbo_Filestream_Files", dbOpenDynaset, dbSeeChanges)

rs.MoveLast

rs.Edit
rs![Prefix_CTRL_NBR] = Me.Prefix_CTRL_NBR
rs![CTRL_ID] = Me.CTRL_NBR
 

Why isn't this working?

Preview
I have used this type of code many times before, but its simply not working now for some odd reason I can't figure out. I am using Access 2003 with a SQL database. The error I get is ODBC --call failed 3146
Any help would be appreciated. Here is the code:

Dim rsDxMg As Recordset Dim db As database Set db = CurrentDb Set rsDxMg = db.OpenRecordset("Select * FROM [Exam Info]", dbOpenDynaset, dbSeeChanges) With rsDxMg
.AddNew
!riop = "100"
.Update End With