ADO Library Problems

WebLOCH
01-12-2004, 10:34 AM
Hello to anyone that reads this,

I have recently been developing an application that uses Microsoft ActiveX Data Objects, or ADO for short. Now everyone here seems pretty clued up so I am pretty much in your hands.

I have been using a reference to MS ADO 2.0 and up until now the program has functioned consistently well on all tested windows operating systems (using an installshield installation I created for the dependancies).
But today a problem has occurred, two machines that could previously run the program successfully return a runtime error that states "Library Not Registered" before killing the program.

I have tracked it down to the ADO reference, but I am confused with several issues, I can reference MS ADO 2.0 to 2.7....

1. Which is actually most suitable to use ?
2. How can I force it to be installed on the target machine, is there a specific MSM I need?
3. Am I actually targeting the correct area at all?

Any help will be very much appreciated. Thanks for your time.

P.S. Assume I am a fairly skilled VB coder.

TheDutch IceMan
01-12-2004, 10:39 AM
Hello to anyone that reads this,

I have recently been developing an application that uses Microsoft ActiveX Data Objects, or ADO for short. Now everyone here seems pretty clued up so I am pretty much in your hands.

I have been using a reference to MS ADO 2.0 and up until now the program has functioned consistently well on all tested windows operating systems (using an installshield installation I created for the dependancies).
But today a problem has occurred, two machines that could previously run the program successfully return a runtime error that states "Library Not Registered" before killing the program.

I have tracked it down to the ADO reference, but I am confused with several issues, I can reference MS ADO 2.0 to 2.7....

1. Which is actually most suitable to use ?
2. How can I force it to be installed on the target machine, is there a specific MSM I need?
3. Am I actually targeting the correct area at all?

Any help will be very much appreciated. Thanks for your time.

P.S. Assume I am a fairly skilled VB coder.

There's on the Micr. site a distributable MDAC driver which you can use for that!

http://search.microsoft.com/search/results.aspx?st=b&na=88&View=en-us&qu=mdac

WebLOCH
01-12-2004, 10:42 AM
Alas I have scoured the MS sites for solutions but I have not found any, the Installation solution is currently installing all the versions of MDAC that are in use/available on the development machine and any other working machine, but the problem persists.

Do you have any further suggestions?

TheDutch IceMan
01-12-2004, 11:47 AM
Alas I have scoured the MS sites for solutions but I have not found any, the Installation solution is currently installing all the versions of MDAC that are in use/available on the development machine and any other working machine, but the problem persists.

Do you have any further suggestions?

How can you be sure it's in the ADO??

Tell us more which dependencies the programm has, what kind of operating system was on the target machines and office software, when the probs first occured, what kind of software it is, what's the difference is between the target machines and those 2 problemcases.. etc.... ;)

WebLOCH
01-16-2004, 03:45 AM
Well the problem only occurs when I try to execute code that has something to do with the ADO reference, for example, I declare a variable as an ADODB.recordset, then when I try to issue an SQL statment through it I get the automation error.

I think this is the problem, but otherwise the application runs fine on two Windows XP machines, both before and after hotfixing. It has run on several Windows 2000 machines, it has only begun to fail recently, with no clear indication as to why.
All installs since it did run correctly, have been totally unrelated to any kind of database drivers, for example : CloneCD.

Thanks for any help you can provide, im still going crazy!

WebLOCH
01-16-2004, 06:46 AM
After using the Component Checker and installing/uninstalling versions of MDAC I have come to the conclusion that you are right, and my problem is not exactly what I think it is, so if you are still interested/able to help me, please let me know what you need to know about the project.

Thanks again

TheDutch IceMan
01-16-2004, 07:49 AM
After using the Component Checker and installing/uninstalling versions of MDAC I have come to the conclusion that you are right, and my problem is not exactly what I think it is, so if you are still interested/able to help me, please let me know what you need to know about the project.

Thanks again

What I told you befor and perhaps some example code from your page where things go wrong! ;)

WebLOCH
01-16-2004, 08:11 AM
Here is the complete sub:

-------------code-------------

Private Sub cmdDone_Click()
If txtName.Text <> "" Then
With frmMain
If rstCategories.State <> 0 Then rstCategories.Close
strSQL = "SELECT * FROM Categories WHERE CatCode = '" & strCatCode & "'"
rstCategories.Open strSQL, cnnMain

rstCategories.Update "CatName", SQLFriendly(txtName.Text)
rstCategories.Update "CatDescription", StripHTML(edtDescription.DocumentHTML)
rstCategories.Update "CatPic", SQLFriendly(txtPicture.Text)
rstCategories.Update "BuyOnline", StringToBoolean(cmbOnline.Text)

rstCategories.UpdateBatch adAffectAllChapters
Call UpdateTree ' Refresh the treeview
End With

Unload Me
End If
End Sub

----------end code-----------


And this is the exact error:

------------error-------------

Automation Error:
Library Not Registered

-2147319779(8002801D)

----------end error-----------

vbFace
01-16-2004, 11:48 AM
I would use the latest ADO.

As for forcing installation, since you are using InstallShield, make it run MDAC.exe This is the name MS uses for all versions of ADO pre-.NET. The name may be slightly different, but MS never seemed to have the common sense to call it MDAC20, MDAC21, MDAC27 etc.

WebLOCH
01-16-2004, 08:29 PM
I've got it installing all versions used on the development machine, not just the first or latest, ive also tried using just the latest but to no great avail.

Otherwise I had 2.8 installed and in use, which I believe is the latest. Suggestions were helpful though, keep 'em coming.

WebLOCH
01-19-2004, 05:00 AM
Thanks to anyone that read this post, it has been a total waste of your time. In my arrogance I completely overlooked the fact that I parsed values from functions into .Update method. After some testing it has become apparent that the problem resides in one of the subs. Although it uses no external references so it should not cause this problem, it does, so thanks again for your time and effort!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum