Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Comment RE: Coding for Multiple Databases in C/C++ (Score 4, Informative) 54

afaik there is very little out there that is truly db agnostic

i have coded in Windoze using ODBC, it's not hard and there are some good books on the subject to help you through. i am not aware of what there is available across Linux platforms that is ODBC like

The key with ODBC is understanding the two-phase process in communicating with your DB. There are in fact two ODBC drivers, the one that extracts the commands required from the langauge you are coding in and t'other actually communicating that command to the DB engine.

i haven't looked at SQLAPI, but ODBC avoids embedded SQL statements and i suspect embedded SQL statements is what you want to go away from.

Your other problem is the features available from each DB may be very different. I has to work across MSSQL and Access and (initially) any other db. This 'any other db' was rapidly restricted to those that fit the SQL standards. (Note DB2 does not)

I can't this minute recall whether SQL92 has been superceded by SQL 97 (or whether i am getting confused between standards in my old age) but it is worth chasing the standards up so that you can identify standard and non-standard features especially in your existing code. Your existing code may not be agnostic

The way your db is treated in your existing code may / may not work for other db's in exactly the same way.

Good luck

Agnostic via standards?

HTH

Slashdot Top Deals

Your fault -- core dumped

Working...