[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

03/29/2009 at 08:47PM PDT, ID: 24276232
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

ADO Data Control Missing / VBA Sub cannot connect to database / User defined type not defined

Asked by OCM123 in VB Controls, Microsoft Excel Spreadsheet Software, SQL Server 2005

Tags: ADO Data Control / OCBC / Excel Stored Procedure / VBA Sub / SQL Server 2005 / ADODB.Connection / MSADODC / .OSX

Hello. I have just installed MS SQL 2005, the .NET Framework 3.5 with SP1, created "Database1" on server named OCM\SQLEXPRESS and copied the attached code below "Sub ConnectionExample4()" and saved it into my Excel file's Module1.

My objective here is to use a Function I have made in Excel to retrieve a single value into an Excel cell . As I understand it, the Function must first Connect my Excel to my SQL Server database called OCM\SQLEXPRESS.

When I run the SubConnectionExample4() I get the error "User defined type not defined" and Dim conn As ADODB.Connection is highlighted. Seems like a bunch of other folks have had the same issue. I looked at my list of components (Ctrl + T) in the project and found the ADO Data Control component is not there.

Looking this up I find that it is part of .Net Framework 3.5, which I have just installed again. The specific missing OSX file that drives the ADO appears to be MSADODC.OSX which I also downloaded, and copied/pasted into C:\Windows|System32 folder alongside all the other OSX files. Do I now have to "register" it somehow ?

If I run the Sub ConnectionExample4() again, I still have the same error.

So I am at a loss as to where / what I am doing wrong. I am running XP + Service Packs,and the SQL Server Express 2005, Server Management Studio Express 2005, Visual C# 2005 Studio Express and .Net Framework 3.5 + Service Pack  have all been downloaded in the last few days.

A couple of hints / pointers I have seen are :

1. ADO Data Control / MSADODC.OSX has to be "registered" - but I am not familiar with how to do this
2. ADO Data Control may/may not be an "official" part of the Express versions of these products.
3. My server name cannot be OCM\SQLEXPRESS even though that is what the server name shows when I connect to the database (which works fine, and I can run my queries in C# Express and Server Management Studio with no problems)

Experts - please have a look at the above and hopefully help me and some others out there - many thanks.

RW

[+][-]03/29/09 09:34 PM, ID: 24016017

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/30/09 05:42 AM, ID: 24018237

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/30/09 05:47 AM, ID: 24018278

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/30/09 09:17 AM, ID: 24020373

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/30/09 02:15 PM, ID: 24023428

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/30/09 03:35 PM, ID: 24024173

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/30/09 05:46 PM, ID: 24024863

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Controls, Microsoft Excel Spreadsheet Software, SQL Server 2005
Tags: ADO Data Control / OCBC / Excel Stored Procedure / VBA Sub / SQL Server 2005 / ADODB.Connection / MSADODC / .OSX
Sign Up Now!
Solution Provided By: webtubbs
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03/30/09 08:13 PM, ID: 24025460

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/30/09 08:24 PM, ID: 24025495

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/30/09 08:29 PM, ID: 24025511

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_FREE_TRIAL_20090127