Create a query

J

JM

Hi,

I am using the following code to create a query:


Dim catCurr As New ADOX.Catalog
Dim cmdCurr As New ADODB.Command
Dim flag As Integer
catCurr.ActiveConnection = CurrentProject.Connection
cmdCurr.CommandText = strSql
catCurr.Views.Append strQry, cmdCurr

The problem is that the query is "virtual" do not show in access and it
dissapear once I close access.

How can I "Save" the query?
 
D

david epsom dot com dot au

Saved queries need to have a NAME, and be in the
same SQL version as the database.

(david)
 
¹

¹Ú¹®¼ö

JM said:
Hi,

I am using the following code to create a query:


Dim catCurr As New ADOX.Catalog
Dim cmdCurr As New ADODB.Command
Dim flag As Integer
catCurr.ActiveConnection = CurrentProject.Connection
cmdCurr.CommandText = strSql
catCurr.Views.Append strQry, cmdCurr

The problem is that the query is "virtual" do not show in access and it
dissapear once I close access.

How can I "Save" the query?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top