Jeff wrote:
w/out getting into too many boring details, i have a sql server db and am using llblgen adapter model in a bunch of apps. This db happens to be for a SalesLogix database (slq 2k). So, SLX requires all transactions (CUD) to go through their own SLX OLEDB Provider. So, basically i am using an OleDbConnection and passing it a custom connection with this inside of it "Provider=SLXOLEDB.1;". So, the real question, i have been tracing in the DataAccessAdapter and found CreateConnection which returns an IDBConnection. What i have not been able to find yet is how is this used, where is it called from etc... and how can i create an overload or something that returns an OleDbConnection with my custom connection string. The problem i see is i need both, and only in certain cases to use the latter and i am not seeing how i can make this work inside of llblgen to use both of them based on a parameter or something. Most of my stuff so far has only been reading data so it has not been an issue.
The connection is used in the SqlServer DQE where an SqlCommand is created, together with SqlParameter objects (in the DatabaseSpecificCreator class).
now, what should be done is that you change in the DQE sourcecode the creation of SqlCommand into OleDbCommand, and the SqlParameter creation into OleDbParameter. This also requires that you convert SqlDbType enums to OleDbType enums with a switch statement.
This is a bit of a pain. As MS Access uses almost the same syntaxis for a lot of stuff, you could try to create the schema in an access db, generate the code from that db using the ms access driver, and use the SalesLogix database by modifying the connection string. The MS Access code uses OleDb, so that should work. MS Access has fewer types, so if you run into SqlServer specific types it might not work, but you could give it a try. You only need the schema for the tables you'd like to access in MS Access, no data.
fyi, slx requires this to synch remote databases and this is how they do it.
yeah, as if MS SqlServer doesn't contain any features for that... Wierd solution they chose...