Start a new topic

Deleting a query

Any tips on deleting a query through the IOM API?

CQueryObject.Delete doesn't seem to exist.


Cool, I'll poke around in there :)
Wayne, there is some RE7 API documentation here:

C:\Program Files (x86)\Blackbaud\The Raisers Edge 7\Help\API.PDF

and here:

C:\Program Files (x86)\Blackbaud\The Raisers Edge 7\Help\reapi.chm

HTH!

Jeff
Wayne,

The BBREAPI library doesn't give you the ability to delete a query. You can however make use of the REQUEX library to delete queries.

Blackbaud.PIA.RE7.REQUEX.CQueryServer has the DeleteQNoUI and DeleteQ methods. They both accept the query ID as the parameter.

Because this isn't a referenced library in the IOM API, you will need to use late binding. Below is an example.

Dim o as Object = CreateObject("REQuEx7.CQeryServer")
o.Init(Import.SessionContext)
o.DeleteQNoUI(1)
o.CloseDown
o = Nothing
ugh, that's what I get for copy/pasting without verifying the code!

Sorry Nic.

P.S. it worked!
Hey Nic, are the COMs objects and methods for RE documented anywhere?
No real documentation is available. You can however drop any of the PIA files into a Visual Studio project's references and then use the Object Explorer to figure out what they do. Blackbaud only supports the BBREAPI library so anything you come up with from the other files is done so on your own.

Also, if your organization has the VBA module you can use the VBA object explorer to take a look at the COM objects. The PIA files are wrappers for the COM objects so you will see the same objects, just with different namespaces.
Nic, have I mentioned that you are my favorite person at Omatic? (Sorry Jeff!)
Getting this error:

Line 1: Error in custom code DelQuery: Cannot create ActiveX component. Line:0 [CImport_Process_02.3]
I typo'd the name of the class "CQeryServer". Try CQueryServer
Login or Signup to post a comment