473,385 Members | 1,483 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,385 software developers and data experts.

ADO not registered anymore

Hi,

I'm using a piece of code I found at mvps. And uptil now it has worked
perfectly. It resets the autonumber of a table to a specified number.

code:-----------------------------------------------------------------------
-------
Function ChangeSeed(strTbl As String, strCol As String, LngSeed As Long) As
Boolean
'You must pass the following variables to this function.
'strTbl = Table containing autonumber field
'strCol = Name of the autonumber field
'LngSeed = Long Integer value you want to use for the next AutoNumber

Dim cnn As ADODB.Connection
Dim cat As New ADOX.Catalog
Dim col As ADOX.Column

'Set connection and catalog to current database
Set cnn = CurrentProject.Connection
cat.ActiveConnection = cnn
Set col = cat.Tables(strTbl).Columns(strCol)
' sorry missed these when typing original post
col.Properties("Seed") = LngSeed
cat.Tables(strTbl).Columns.Refresh
If col.Properties("Seed") = LngSeed Then
ChangeSeed = True
Else
ChangeSeed = False
End If
Set col = Nothing
Set cat = Nothing
Set cnn = Nothing
End Function
----------------------------------------------------------------------------
--
However, I think it's after a W2K (sp4) update, I now get the message that
says "class not registered". In debugging mode it fails on the first line
"Set cnn = CurrentProject.Connection".

Also all other ADO properties, MSJET stuff don't work. The references are in
place however.

Are there any solutions?

Thanx
Nov 12 '05 #1
0 1210

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

Similar topics

7
by: Arnaud Migeon | last post by:
My PC went under many security patch last week Yet, I can't use my local IIS ASP web site. When starting the page, I get the folowing error: HTTP 500 => from IIS log file i have Login.ASP, Line 6,...
1
by: Alejandra Parra | last post by:
The application used to work fine, but today, in this code: CType(Me.AxSSTab1, System.ComponentModel.ISupportInitialize).EndInit() ..Net shows the next error: An unhandled exception of type...
4
by: Scott Dillard | last post by:
I have recently been provided with a new laptop. The old one ran Win 2000 with Access 2000 and the new one runs Win XP with Access 2000. When I try to run some of my modules in my old databases on...
1
by: Cristina Malavasi | last post by:
Hi a have a COM dll made in C++ (I don't have the source code) I used tlbimp to create a managed .NET assembly dll... I reference this dll and import it with "using myDll" then I make an object...
3
by: rua17 | last post by:
I add tow Com libraries to my project, I can see their content with intellisense, but when I instantiate a class contained in the library: PDDirectLib.PDDatabaseQuery pDbQuery = new...
1
by: Phre2d | last post by:
We are attempting to move a large development project into the .NET age over time. We have a large number of ATL-based COM objects in this project. Following the "Journal Poster" example provided...
1
by: Jim | last post by:
Have fully operational software package developed on VB.NET that worked until Jan 1 2003, with early stage deployments on Oct 10, Oct 23, Nov 11, Dec 12 and Dec 30. When attempted final...
0
by: Nonee | last post by:
Anyone, anyone? : ) Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. ...
6
by: JeffDotNet | last post by:
Writing to a registered source in the Application event log I have an asp.net framework 2.0 app that I created on a winxp machine and now I am deploying it to IIS6 on a win server2003 machine. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.