Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Impromptu CreateFilterFor OLE Automation

Status
Not open for further replies.

Suedois

Programmer
Sep 25, 2001
14
0
0
CH
Hi,

I'm developping an VB application who add users and restrictions on some Impromptu's catalog.

Adding users and some basic restrictions work well. But when I tri to add a filter (.CreateFilterFor), I get the message "Run-time error '13' : type mismatch". I don't understant, cause I make exactly what is in Cognos documentation.

As everyone an idea ?

I use VB6 and Impromptu 6.

Thanks

Here is my code:

Set ImpNewUser = ImpUser.Add(sClassName)

With ImpNewUser
.databaseconnections(1).UserName = CStr(txtUser.Text)
.databaseconnections(1).PlainTextPassword = CStr(txtPassword.Text)
If Len(txtTextBlob.Text) <> 0 Then
.HasTextBlobLimit = True
.MaxTextBlobCharacters = CInt(txtTextBlob.Text)
End If
If Len(txtMaxRows.Text) <> 0 Then
.MaxRowsRetrieved = CInt(txtMaxRows.Text)
End If

If Len(txtMaxQuery.Text) <> 0 Then
.MaxQueryExecutionTime = CInt(txtMaxQuery.Text)
End If

.CrossProductPermission = cboCrossProduct.ListIndex

' Ajout d'un filtre
' here is the probleme :(
Set ImpFilter = .Createfilterfor(ImpDb.Tables(&quot;M05_V_ORGSHC_ANNEE&quot;).Columns(&quot;orgshc_ug&quot;))
End With
 
Hi,

Here is the answer:

The exemple in help add filter for a catalog who have no catalog level nor schema level.

For working with the Oracle database, you have to use the schemalevel

set ObjLevel = objcatImp.Database(1).SchemaLevels(1)

Now the .CreateFilterFor will work :

.CreateFilterFor(objlevel.Tables(&quot;TOTO&quot;).Columns(&quot;TITI&quot;)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top