Initialize Repository Command

LadyDi

Registered User.
Local time
Yesterday, 21:08
Joined
Mar 29, 2007
Messages
894
I was just wondering if anyone knew anything about the command initializerepository. I have been using vba to connect to DB2 tables on a server. To do that, I used the InitializeServer command (actually, my manager set that up - I have never used IntializeServer when writing vba from scratch). I don't understand exactly how the InitializeServer command works, because when you press F1 on that command, you get the "Keyword not found" message.

My company recently updated their server and went from using the IBM program QMF for Windows to using an IBM program called DataQuant which uses an "eclipse" server. Someone from IBM told us that in order to initialize the new software via vba, we need to use the InitializeRepository command. I tried adding the code that they suggested, but I get an error message stating "Object doesn't support this property or method". How can I get vba to recognize this command and get it to actually initialize my new server?

The code they told me to add is this:

Code:
[SIZE=3][FONT=Calibri]sResult = QMFWin.InitializeRepository("REPOSITORYCONN", 0, “REPCONUSER”, “REPCONPASS”)[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]    If sResult <> 0 Then[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]       iResponse = MsgBox(QMFWin.GetLastErrorString(), vbOKOnly, "Error: Repository Initialization")[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]        Exit Sub[/FONT][/SIZE]
[SIZE=3][FONT=Calibri]    End If[/FONT][/SIZE]

In case you are wondering why I just don't go back to the people who sent me this code, it is because they charge my company every time we ask a question. My manager would like me to figure this out on my own without having to pay a consultation fee.

Any assistance you can provide would be greatly appreciated.
 
My guess is that there is a library (vba - Tools Reference) that needs to be referenced.
for example: there is an old 2007 Teradata Meta Data Services Programmer Guide Release 12.00.00 that has a C++ object On Pager 47, they at lease provide the variables and property values for a COM object that is referenced. They happen to use the same name. Maybe, by chance this is what IBM re-packaged? Slim chance, but worth looking at.
So often, contractors don't provide this type of documentation. My theory is "we licensed the software, so give us the #$%@& documentation"
There is probably a DLL, COM, or OLE object that needs to be added to your project. Once it is referenced, the iunknown from the reference has the pointer to expose the properties, method, and events.
Once you find out what it is and have it referenced, in a code window use the F2 (object browser) to search and discover its properties, methods, and events.
It is much like setting a reference to Excel so automation can be used.
 

Users who are viewing this thread

Back
Top Bottom