ADOX Append View Problem

K

Kev

Can anyone help me with this:
I am trying to create a view via ADOX with the following
code:

Dim cnnMfd As New ADODB.Connection
Dim catMfd As New ADOX.Catalog
Dim cmdMfd As New ADODB.Command

cnnMfd.Open CurrentProject.AccessConnection
Set catMfd.ActiveConnection = cnnMfd
cmdMfd.CommandText = strSQL
catMfd.Views.Append "qryDataDump", cmdMfd

I have set references to both the ActiveX Data Objects
2.7 Library and the ADO Ext. 2.7 for DDL and Security
Library.

My problem is when I run it I get a Runtime Error (-
2147467262(80004002)) stating "No such Interface
Supported" when running the last line of code.

Any ideas?

Thanks in Advance,

Kev
 

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