D
Don
We are in the process of upgrading our database from an Access FE/BE to an
Access FE and MS SQL Server BE. The FE successfully links to the MS SQL
Server BE in that data on the forms is being correctly displayed. However,
I have now run into a problem with some new ADO code that is suppose to add
a record to one of the linked tables in the BE. The 'AddNew' command (see
code snippet below) throws the following error:
Run-time error '-2147467259 (80004005)':
Invalid Operation
Which I am assuming means I can not do the AddNew on the recordset.
However, the test for support of AddNew returns true. What I have turned up
in searches so far point to a permission problems. But I have (supposedly)
full permissions on the MS SQL Server.
Any suggestions will be greatly appreciated!!
Thanks!
Don
Dim cnnDB As ADODB.Connection 'DB Connection
Dim rstSource As ADODB.Recordset 'Details Recordset
Dim bnTest As Boolean
Set cnnDB = CurrentProject.Connection
Set rstSource = New ADODB.Recordset
'tblNotes is a linked table which exists on the MS SQL Server
rstSource.Open "tblNotes", _
cnnDB, adOpenDynamic, _
adLockPessimistic, adCmdTableDirect
bnTest = rstSource.Supports(adAddNew)
rstSource.AddNew
rstSource!LinkID = Me!txtLinkID
rstSource!DateOpened = Now()
rstSource!User = CurrentUser()
Access FE and MS SQL Server BE. The FE successfully links to the MS SQL
Server BE in that data on the forms is being correctly displayed. However,
I have now run into a problem with some new ADO code that is suppose to add
a record to one of the linked tables in the BE. The 'AddNew' command (see
code snippet below) throws the following error:
Run-time error '-2147467259 (80004005)':
Invalid Operation
Which I am assuming means I can not do the AddNew on the recordset.
However, the test for support of AddNew returns true. What I have turned up
in searches so far point to a permission problems. But I have (supposedly)
full permissions on the MS SQL Server.
Any suggestions will be greatly appreciated!!
Thanks!
Don
Dim cnnDB As ADODB.Connection 'DB Connection
Dim rstSource As ADODB.Recordset 'Details Recordset
Dim bnTest As Boolean
Set cnnDB = CurrentProject.Connection
Set rstSource = New ADODB.Recordset
'tblNotes is a linked table which exists on the MS SQL Server
rstSource.Open "tblNotes", _
cnnDB, adOpenDynamic, _
adLockPessimistic, adCmdTableDirect
bnTest = rstSource.Supports(adAddNew)
rstSource.AddNew
rstSource!LinkID = Me!txtLinkID
rstSource!DateOpened = Now()
rstSource!User = CurrentUser()