Article ID: 129901
Article Last Modified on 10/11/2006
SQLGetSchema(ConnectionNum, TypeNum, QualifierText)Using a value of 3 for the TypeNum argument returns a list of owners in a database on the current connection. Owner lists can be generated only with the following ODBC database drivers:
Microsoft SQL Server, version 4.2x and later Oracle, versions 6.0 and 7.0 Sybase SQL Server (contact Sybase Corporation technical support for a list of supported versions)
Sub GetOwnerList()
' Open a communication channel to the database.
chan = SQLOpen("DSN=My SQL Server Database")
' Get Owner list for the MyDB database.
OwnerList = SQLGetSchema(chan, 3, "MyDB")
' Loop through the owner list and display the values.
For Each OwnerName In OwnerList
MsgBox OwnerName
Next
' Close the communication channel.
SQLClose chan
End Sub
sqlgetschema
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: XL5 XL7 XL97 disabled dimmed XL
Keywords: kbdtacode kbhowto kbprogramming KB129901