Which Database?

I'm fairly comfortable writing Win32 API apps, but I've never written a single database application. All I want is basic add/delete records with relatively simply indexing capability. I want to write this app as a Win32 API only. No MFC, Forms, etc.

So would I be better off going SQL or ODBC, or is there a difference? Or should I do something else?
Last edited on
My favorite database technology Lamblion is ODBC. For fairly simple stuff I just write my own random access files using indexes and linked lists, kind of a roll my own so to speak, but for anything somewhat complex I like ODBC. Back in the 90s I used Visual Basic big time, and the main technologies there were DAO and later ADO (Data Access Objects and ActiveX Data Objects), and I liked them a lot - especially DAO.

When I abandoned Visual Basic shortly after .NET hit I really was lost in terms of database access. I didn't know what to do. Being an Api coder and not liking class frameworks that kind of wrap everything up for you in the hope of making things easier, I really didn't know which way to turn. Then I discovered the raw low level procedural C api for ODBC, and I put a real lot of work into learning that. Been using it for years now including on mission critical apps where I work, and I've no intents to give it up.

After I got to know it really well I wrote wrappers for most of the messy stuff, and that really helped. Here about 6 months ago I got the idea of wrapping it with a class, and that worked out really well. Here....

http://www.jose.it-berater.org/smfforum/index.php?board=378.0

is an example I posted that demos ODBC for connecting to Microsoft Access, Sql Server, and Microsoft Excel. The app creates a main form with a button on it for each of these choices, and when you click a button it creates the database, blows a few records in it, then dumps the data to a programitically created output screen. Might be useful to look at. If you do let me know how it works for you. Havn't tested it on anything beyond XP 32 bit yet.

That app - SqlDemo.exe, contains several thousand lines of code all told. With Visual C++ 9 (Visual Studio 2008) and compiler options set for small code, the exe comes in around 32k. I think that's really neat for an app that does all that. My favorite programming language for desktop Windows isn't C++ but rather PowerBASIC, but with PowerBASIC the app came in a good bit larger, around 50 or 60 k if my memory serves. The point is with the ODBC Api you can really end up with fast, tight code.
Last edited on
It sounds like you are highly motivated... so maybe You will not fear from reading the database APIs from the MSDN... (I read through some of them, and it is interesing - in my opinion)...
Okay, thanks guys. I'll give them both a good look.
Topic archived. No new replies allowed.