Solved

OpenSchema

Posted on 2001-08-03
12
480 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 69

Author Comment

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

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
 
LVL 6

Expert Comment

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

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 69

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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 69

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 69

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 69

Author Comment

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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
tempdb latch contention 12 49
T-SQL: Subtracting Amounts from "Among Rows" 3 43
Add total to a tablix with ReportItem values 15 39
SQL Select Statement 2 22
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now