# -2147467262, "No such Interface supported" & ADOX



## wango (Nov 14, 2001)

I really need help.

I do have an Access application that that I use to create reports as well as graphs. But bofore the graphs or reports are created, I have to do a lot of query populating as in the example below.

For example:

Private Function PopulateQry(theContract As String)

Dim txtSQL As String
Dim strSQL As String
'Dim rst As ADODB.Recordset
'Dim booATSGenericQueryExist As Boolean

'Set a reference for Microsoft ADO Ext. 2.1
'for DDL and security.
Dim cat As ADOX.Catalog
Dim cmd As ADODB.Command

On Error GoTo PopulateQryErr

' Test the sql statement first
'boolSQLGood = IsQueryGood
'If boolSQLGood Then

Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection


' contral to logging Invoices.
strSQL = "SELECT ContractInvoices.ContractNumber, ContractInvoices.BillPeriodEnd, " & _
"Sum(ContractInvoices.InvoiceValue) AS SumOfInvoiceValue " & _
"FROM contractInvoices GROUP BY ContractInvoices.ContractNumber, " & _
"ContractInvoices.BillPeriodEnd HAVING " & _
"(((ContractInvoices.ContractNumber)='" & theContract & "'));"

If TypeOfQuery("QryContractInvoices") = "View" Then
Set cmd = cat.Views("QryContractInvoices").Command
cmd.CommandText = strSQL
Set cat.Views("QryContractInvoices").Command = cmd
cat.Views.Refresh

ElseIf TypeOfQuery("QryContractInvoices") = "Procedure" Then
Set cmd = cat.Procedures("QryContractInvoices").Command
cmd.CommandText = strSQL
Set cat.Procedures("QryContractInvoices").Command = cmd
cat.Procedures.Refresh

End If

Set cat = Nothing
Set cmd = Nothing

'End If

Exit_This:
On Error GoTo 0
Exit Function

PopulateQryErr:

gblPrintMessage = "Error Number = " & Err.Number & " - " & Err.Description & "."
LogErrorMessage "PopulateQry()", gblPrintMessage, 3

Set cat = Nothing
Set cmd = Nothing

Resume Exit_This

End Function

When I run the application on my development machine and some other macines, the applicatiion run well. But on some machines, I do run into problems especially where I have to use ADOX. The error is 

Error: -2147467262 No such interface supported

Is it an MDAC issue, an JET issue, or waht is it?

Can someone help me please; I have run out of options.

Wango


----------



## nczman (Dec 12, 2000)

But I have had problems with running on other machines. That is one of the bad things about ado and adox. The probably do not have the latest and greatest ado files. They may be on version 2 where the machine that was used to write the VB was version 2.5.

That is where I would first check. Some one here or the Microsoft web site or someone in your IT may be able to help with the latest drivers.


----------



## wango (Nov 14, 2001)

hanks for your response.

Should I then get the greatest ADO files or the greatest ADOX files?

Wango


----------

