Solved

OpenSchema

Posted on 2001-08-03
12
514 Views
Last Modified: 2010-08-05
I am building a small tool that will be used to compare 2 database to find differences. I want this
tool to work at least with SQL and Access databases.

For that topic I use a mixture of ADO and ADOX (to have the most detail possible).

My problem for now is that I can retreive the Description field for Access tables and columns but not
for SQL.

This is my code to get the description:
   ' ----- Retrieve the description from standard ADO since ADOX doesn't
   '       have it recorded.
   Set rsInfo = connSchema.OpenSchema(adSchemaTables, _
       Array(Empty, Empty, sTableName, "TABLE"))
   If Not (rsInfo.EOF) Then GetTableDesc = rsInfo!Description & ""


How can I retreive that?


Note that this is a cross-post from the VB-Databases topic (http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=vbdatabases&qid=20161951) because I didn't had good answers!
0
Comment
Question by:Éric Moreau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 18

Expert Comment

by:nigelrivett
ID: 6349940
Which versions of sql server are you targetting.
As AngelIII say's it's not available v7 and before.
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 6349977
SQL 2000.
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 6349981
I have created descriptions (in SQL 2000) for test purposes and I don't see them in my results. The same code is working for an Access DB.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:acampoma
ID: 6349986
execute sp_columns tablename
execute sp_Keys tablename
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 6350018
"execute sp_columns tablename"

Gives a bunch of details about columns but not the description.

"execute sp_Keys tablename"

This SP doesn't seems to exist?

I would really prefer (if possible) a ADO solution because I want the application to be portable.
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 6350030
I have found my descriptions into the sysProperties table but again I would really prefer (if possible) a ADO solution because I want the application to be portable.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6351639
which version of ADO are you using, I guess ADO 2.6...
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 6354308
Right. 2.6
0
 
LVL 2

Accepted Solution

by:
AccessHelpNet earned 200 total points
ID: 6370189
The description field in adSchemaTables is defined in the OLEDB specs as "optional" and I don't think any ADO provider for SQL server has ever populated it.

regards,

Dave Kawliche
http://AccessHelp.net
http://1ClickDB.com
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 6400589
Any objections in sending this question to PAQ?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6403277
No objections...
Sad enough, but there seems to be no generic answer here...
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 6415955
Seems that it does not exists.
0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question