Solved

OpenSchema

Posted on 2001-08-03
12
503 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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.

821 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