|
-
December 22nd, 2002, 04:00 PM
#1
-2147467262, "No such Interface supported" & ADOX
I really need help.
I do have an Access application that that I use to create reports as well as graphs. But before the graphs or reports are created, I have to do a lot of query populating (using VBA) 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
-
December 23rd, 2002, 08:05 AM
#2
Sounds like to me that the ADOX components are not installed. Check that and that the OS is the same version.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|