473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Access 2007 ADP: incompatible ADO code

The code below works in Access 2000, not in Access 2007.
ADO returns that it supports AddNew, but when I call that method it gives me
an error: "Object or provider is not capable of performing requested
operation". That seems a contradiction.
The exact same code in the exact same ADP running on A2000 works fine.
rs.Update on existing records works fine.

Insights, anyone?

Sub TestAddNew()
Dim rs As ADODB.Recordset

Set rs = New ADODB.Recordset
rs.Open "exec SelectCandidatesForReportScoring @intExamID=4115,
@intCandidateExamID=-1, @intExamTestTypeID=1", CurrentProject.Connection,
adOpenKeyset, adLockOptimistic

'This produces expected rows
'Debug.Print rs.GetString

'This says it supports AddNew
Debug.Print "Supports AddNew: " & rs.Supports(adAddNew)

'This fails with above error.
rs.AddNew
'TODO: Fill out required fields.
rs.Update

rs.Close
End Sub

-Tom.
Sep 17 '07 #1
2 3817
Hi Tom,

I had a strange error like this working with an Access 97 Database and
some ADO code that I was taking the other way (from 2k back to 97). I
found that the MDAC version installed on the machine was corrupt /
broken. I re-installed the latest MDAC and the issue seemed to go
away. I did also have to remake the references again too but since
then I have had no issues with it.

I dont know if this will help or not, but it probably cant do any
harm :-)

Cheers

The Frog

Sep 18 '07 #2
Hi Tom,

Which server version are you running?
To me it looks like if the thrown error would be somewhere located in the
provider engine. Are you using SQL Native Client? In this case I'd first try to
install SQL2005 SP2 and experiment with this package:
http://www.microsoft.com/downloads/d...1-9e8b9d835cdc
Another attempt would be not to use currentproject.connection but to create a
new one and test if the same error occurs. Maybe there are some connection
settings that affect this behaviour?

Sascha

"Tom van Stiphout" <tv******************@kinetik-it.comschrieb im Newsbeitrag
news:13*************@corp.supernews.com...
The code below works in Access 2000, not in Access 2007.
ADO returns that it supports AddNew, but when I call that method it gives me
an error: "Object or provider is not capable of performing requested
operation". That seems a contradiction.
The exact same code in the exact same ADP running on A2000 works fine.
rs.Update on existing records works fine.

Insights, anyone?

Sub TestAddNew()
Dim rs As ADODB.Recordset

Set rs = New ADODB.Recordset
rs.Open "exec SelectCandidatesForReportScoring @intExamID=4115,
@intCandidateExamID=-1, @intExamTestTypeID=1", CurrentProject.Connection,
adOpenKeyset, adLockOptimistic

'This produces expected rows
'Debug.Print rs.GetString

'This says it supports AddNew
Debug.Print "Supports AddNew: " & rs.Supports(adAddNew)

'This fails with above error.
rs.AddNew
'TODO: Fill out required fields.
rs.Update

rs.Close
End Sub

-Tom.


Sep 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: David C. Barber | last post by:
I've upsized an Access 2000 MDB to an ADP and changed the tables from a linked Access Backend to SQL Server. Now I'm told I can't use DAO any more and need to convert to ADO. While I've used ADO...
6
by: Donald Grove | last post by:
I do programming in Access 2000 and 2003. I don't have a copy of 2003 myself, though. I have read about the adp software that comes with Access 2003, that converts an application to an access...
49
by: Allen Browne | last post by:
If you are looking for opinon on what's useful in Access 2007, there's a new article at: http://allenbrowne.com/Access2007.html Covers what's good (useful features), what's mixed (good and bad),...
17
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
1
by: ishwarjoshi | last post by:
I am in the process of upgrading an old Access ADP/SQL 2000 App to Access 2007 ADP/SQL 2005. There are a lot of buttons in the Access form which are calling Access Macros, the Macros call...
1
by: Access | last post by:
I have a database in a .adp file. If I work on it using Access 2003 it will crash when I am changing a form or report. If I go to a backup and recreate the same series of changes it will crash...
2
by: Carla Hepker | last post by:
I have several in-house applications that I have developed over the years using vba in Access Data Projects. When we converted the SQL server over to 2005, some of the sorts no longer functioned...
1
by: Ted Kennedy | last post by:
I have an Access Data Project (.adp) connecting to a SQL Server 2005 DB over the internet. The project has been running in Access 2003 for a couple of years, and performance has been very good....
2
by: Access | last post by:
Anyone else experiencing corruption problems using Access 2003 to edit .adp files? I've been experiencing corruption problems with a particular database. I've tried copying all the objects into a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.