Solved

OpenSchema

Posted on 2001-08-03
12
493 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
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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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 142

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 142

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
hyperlink data type in SQL 3 28
SQL Server 2012 r2 - Varible Table 3 24
Return 0 on SQL count 24 30
Sql server get data from a usp to use in a usp 5 16
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

777 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