[AccessD] Determine if Object is a Table or View

John Ruff JRuff at SolutionsIQ.com
Tue Oct 2 09:39:56 CDT 2007


I'm not sure if the original message got thru, so I'm posting it one
more time.

 

I'm using ADOX in an Access2003 mdb to iterate through the tables in
SQL Server 2000. I only need to gather data on the tables and not any
of the views. Here is the snippit of code I use to capture the table
object.

 

Dim cat As ADOX.Catalog

Dim rst As ADODB.Recordset

Dim tbl As ADOX.Table

    

Set cat = New Catalog

    

cat.ActiveConnection = "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=SOLIQ;Data
Source=congo"

Set rst = New ADODB.Recordset

 

For Each tbl In cat.Tables

                ' I would like to determine if the object is a table
or a view here.

 

 

Question: How can I determine if the tbl is a table or view?

 

papparuff

 

John V. Ruff 

Applications Support Analyst

SolutionsIQ

www.SolutionsIQ.com <http://www.solutionsiq.com/> 

10785 Willows Road NE

Redmond, WA 98052

425.250.3484

 

 



More information about the AccessD mailing list