Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
sourcename
When using
hXO = XOInstance (sourcename, sourcetype, loginID, password, timeout, options, scope)
In the past I have created the Sourcename by using Client / Service Workspace. Is it possible to create sourcename of type ODBC programmatically?
hXO = XOInstance (sourcename, sourcetype, loginID, password, timeout, options, scope)
In the past I have created the Sourcename by using Client / Service Workspace. Is it possible to create sourcename of type ODBC programmatically?
Comments
One way to do this is to create an entry in SYSREPOSDATASOURCES programmatically. You will probably want to use the Repository function to do this as I am sure that XOInstance will use the Repository to get access to this record.
The other way to do this is to switch over to ADO and using the COM functions: OleGetProperty, OlePutProperty, and OleCallMethod. That will allow you to do everything dynamically without needing to store anything within the OI system tables.
Moving to ADO seems like it might be a lot of work. What advantages would ADO have? Is it faster?
I cannot tell you if performance is faster. I think all of this goes through the same API sooner or later. ADO is just more flexible and is the solution Microsoft is promoting again after they came to realize that OLE DB is not a viable alternative.
ADO is also what the SQL Connector is based on. This eliminates the need to have ODBC connections defined for each workstation. The ODBC drivers need to be installed, of course, but you do not have to worry about going to each one and configuring it.
Does this mean I can not simply create the SYSREPOSDATASOURCES record?
Well Carl has the advantage of seeing the internal code so he would know better than me. However, my comments come from multiple conversations with Bob Carten, who is using ADO to create the OpenInsight SQL Connector. Here is a comment he sent me on 01/15/2010: