I'm trying to create a query on a Jet 4 database using ADOX. My code is as follows:
Dim ca As New Catalog
ca.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\Temp\Test.mdb"
Dim co As New Command
co.CommandType = adCmdText
co.CommandText = "SELECT * FROM TableName"
ca.Views.Append "TestView", co
That runs without errors, and I can see the query just created in the MSysObjects and MSysQueries system tables. I can even execute it from code. But it does not appear on the Access database window. The properties in the system tables are different from the properties of queries created using Access.
What should I do to view the query in the Access database window?