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
W
Wayne Pozzar
said
about 8 years ago
Nic, have I mentioned that you are my favorite person at Omatic? (Sorry Jeff!)
W
Wayne Pozzar
said
about 8 years ago
Getting this error:
Line 1: Error in custom code DelQuery: Cannot create ActiveX component. Line:0 [CImport_Process_02.3]
N
Nic Bourne
said
about 8 years ago
I typo'd the name of the class "CQeryServer". Try CQueryServer
W
Wayne Pozzar
said
about 8 years ago
ugh, that's what I get for copy/pasting without verifying the code!
Sorry Nic.
P.S. it worked!
W
Wayne Pozzar
said
about 8 years ago
Hey Nic, are the COMs objects and methods for RE documented anywhere?
N
Nic Bourne
said
about 8 years ago
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.
Wayne Pozzar
Any tips on deleting a query through the IOM API?
CQueryObject.Delete doesn't seem to exist.