Solved

OpenSchema

Posted on 2001-08-03
12
471 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
t-sql complement 8 31
SQL server 2008 SP4 29 33
how to eliminate duplicates in a string variable in t-sql? 30 42
Slow SQL query 12 21
Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

758 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

19 Experts available now in Live!

Get 1:1 Help Now