Using ADOX

Using ADOX

Post by John Maserat » Thu, 25 Apr 2002 18:52:02



I have a project that reads a given SQL database and enumerates the tables
and then the records in them.

I needed to check which field in the table was set as the primary key.

For Each tbl In cat.Tables

            If tbl.Keys.Count > 1 Then
                'to set the displayed field for the tree control because of
relationships and foreign keys in tables
                         .... do something
            End If
                        ...do something
            i = i + 1
        End If
next tbl

this worked fine until recently.  imust have loaded some patches, probabaly
SQL sp1 & sp 2

anyhow now the tbl.keys.count doesn't ever change and this is confirmed from
the locals window.  I have played around with the keys on the table throught
the SQL MMC but nothing works.

Has anyone else experienced this and what was the solution, alternatively
what version of the msadox.dll should i use - i've got 2.6

thanks

john

 
 
 

1. Strange sorting behavior using OrderBy from code

I've come across a very strange sorting problem..

A table bound to a form displayed in continuous forms view.  One column is a
command button which invokes one line of code to set the OrderBy property.
When pressing the command button, no sort takes place on the form, hoever if
I right click and choose sort ascending on any column it sorts fine.  From
that point on I can click my command button on now it works.

Why is it that my form does not sort until after I tell access to do it for
me once.  The OrderByOn propoerty is not valid in an ADP project.  Is there
an equivalent property that I have to set before I can use the OrderBy
propoerty???

TIA

Scott M

2. Configuring JNDI DataSource in Tomcat 4.x

3. sp shell command using form with date parameter

4. Running DTS Task from VB!

5. How to update data bound form using stored procedure?

6. Is there a newsgroup for sqlserver 2000?

7. Importing text file using DTS mess up data

8. Need to transalte something from Access to SQL

9. Using functions in views and procedures

10. Using ACCESS 2000 to create SQL Server view and Store Procedures

11. Using the Access97 Network Others Client Computer Send Message..?

12. Problem with SQL query and forms using SQL Server

13. Is it possible to create a ADE file from ADP using VBScript???