Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: "Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Aug 2005 18:36:03 +0100
When I attempted to reproduce the problem before, I mistakenly used a table
that didn't have any text or ntext fields. When I use a table that does, I
can reproduce the error ...
Set db = CurrentDb
Set rstd = db.OpenRecordset("SELECT * FROM dbo_Employees", ,
dbSeeChanges)
Debug.Print rstd.Fields(0).Value
rstd.Close
This causes the 'must use dbSeeChanges' error, even though I am already
using it. However, explicitly specifying dbOpenDynaset did fix the problem
for me ...
Set db = CurrentDb
Set rstd = db.OpenRecordset("SELECT * FROM dbo_Employees", _
dbOpenDynaset, dbSeeChanges)
Debug.Print rstd.Fields(0).Value
rstd.Close
The above ran without error. I tested both with the SQL statement as above,
and using the table name, with the same result.
--
Brendan Reynolds (MVP)
"Kyle O'Bryan via AccessMonster.com" <forum@xxxxxxxxxxxxxxxxx> wrote in
message news:52896DF9AA1D6@xxxxxxxxxxxxxxxxxxxx
> Already tried setting options manually, same thing. Also, they're linked
> tables so it doesn't o0pen a Table-Type Recordset, it opens a Dynaset.
>
> Tim Ferguson wrote:
>>> I have tried opening a recordset with a SQL statement and I still get
>>> the
>>> same error telling me to supply the dbSeeChanges constant in the options
>>> argument when opening a table with an Identity,
>>>
>>> set rst = CurrentDb.OpenRecordset("ParentTable",,dbSeeChanges)
>>
>>I've never met this error message but I never leave the options blank
>>either. And I never ever ever open table-type dynasets.
>>
>>Try setting all the argements correctly and see if that gets rid of the
>>error message.
>>
>>Best wishes
>>
>>Tim F
>
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200508/1
.
- Follow-Ups:
- Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: Kyle O'Bryan via AccessMonster.com
- Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: Kyle O'Bryan via AccessMonster.com
- Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- References:
- Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: Kyle O via AccessMonster.com
- Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: Tim Ferguson
- Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: Kyle O'Bryan via AccessMonster.com
- Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: Tim Ferguson
- Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- From: Kyle O'Bryan via AccessMonster.com
- Adding records to a SQL 2000 table with an identity field, in Access 2003
- Prev by Date: Re: Database Unknown userdefined type in Access 2000 - BCP
- Next by Date: Re: NotInList event of a ComboBox
- Previous by thread: Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- Next by thread: Re: Adding records to a SQL 2000 table with an identity field, in Access 2003
- Index(es):
Relevant Pages
|