View previous topic :: View next topic |
Author |
Message |
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Sun Jun 20, 2004 5:26 pm Post subject: (OT) odbc32.lib |
|
|
Just a bit OT: where can I found info about odbc32.lib and the sql headers (sql.h, sqltypes.h, etc.)? BTW, those files aren't found in the DMC distro, the ones found in VC6 and .NET don't even work there (weird errors), so I had to use the ones in DB2 Personal Edition
Anyway, any ideas? Uh, and what about platform-independent database development? Anyone? TIA. |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Jun 20, 2004 5:53 pm Post subject: odbc32.lib |
|
|
Carlos wrote: | Just a bit OT: where can I found info about odbc32.lib and the sql headers (sql.h, sqltypes.h, etc.)? | I don't see how this is off topic.
In a recent newgroup post, it was suggested to run at the command line: Code: | implib -s odbc32.dll |
In other news, I've tried to port the sql.h & sqltypes.h files to D (and I make progress), but I'm not sure how valuable ODBC is in today's world. If you like, I'll make my old ODBC efforts available but (I should warn you), they're stale and probably flawed.
If it doesn't have to use ODBC, you might check out DatabaseBindings at Wiki4D. In particular SQLite might be an option (I think it's very platform independent and completely free). |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Sun Jun 20, 2004 6:28 pm Post subject: |
|
|
Then I guess we were duplicating efforts. The thing is that I've never worked so low-level when it comes to DB programming, so it's really new to me. What I really wanted was generic access to any DBMS, but I didn't know odbc32.dll existed, but since it was mentioned then I started to play a bit with it. Then I found sql.h and the like, but I keep getting an AV when freeing the environment handle, so there must be something wrong.
Anyway, if ODBC is kinda old, then what is the way for today's standards? Because, again, I'd like to (eventually) use the same code for accesing SQL Server, Oracle, DB2, MySql, PostgreSQL, etc. Java does that with JDBC, and each DBMS installs their appropiate libraries for other languages, but how are they used?
Every now and then I find myself using a DBMS (academic use, so I have to go through any/all of them), and I always have to discard D because I don't know how to do that. Now I don't want to discard it anymore.
(I hope it wasn't too much rambling.) |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Jun 20, 2004 7:47 pm Post subject: |
|
|
There's a lot of duplication of efforts around here. In this case, my ODBC stuff never worked quite right, so I was hesistant to release it (and now it's bit-rotted, too).
For your needs, ODBC is probably your best bet. It sounds like you might be close to success if you're getting stuff to compile.
I'll e-mail you a few files that I've worked on. They're incomplete, but they may be able to give you a hint at what the problem is.
I've long had an interest in getting ADO (newer Microsoft COM-based database technology) to work with D, but that would be even harder to accomplish than ODBC. |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Sun Jun 20, 2004 7:56 pm Post subject: |
|
|
I'm going step by step and checking everything to compile and work sort of ok. I'm having trouble with SQLGetDiagRec (also AV), but other than that and what I already said, it seems to be fine.
Thanks for your help. |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Jun 20, 2004 7:59 pm Post subject: |
|
|
Carlos, I tried to e-mail you, but apparently it was an old or invalid address because it bounced right back. So, I uploaded my flawed files to D Lab. I think you're already a member there (if not, it costs you nothing to join). The file is called odbc_exp.zip and it's in Files/unfinished. |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Jun 20, 2004 8:03 pm Post subject: |
|
|
Carlos wrote: | I'm having trouble with SQLGetDiagRec (also AV) ... | I'm not familiar with that function. It sounds like you've already made more progress than I ever did. |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Sun Jun 20, 2004 9:38 pm Post subject: |
|
|
jcc7 wrote: | Carlos, I tried to e-mail you, but apparently it was an old or invalid address because it bounced right back. So, I uploaded my flawed files to D Lab. I think you're already a member there (if not, it costs you nothing to join). The file is called odbc_exp.zip and it's in Files/unfinished. |
Odd. Really odd.
But now that the files are available, I'll take a look to them. Thanks. |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Tue Jun 22, 2004 8:46 pm Post subject: |
|
|
Thanks for the files, Justin, but I need 2 other modules: jcc7.procyon.win, jcc7.procyon.ole. |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Tue Jun 22, 2004 9:23 pm Post subject: |
|
|
I guess I should warn you again that this code hasn't been compiled in a while. I'm sure the compiler will complain about at least some of it.
Anyways, for what it's worth, I uploaded win_ole.zip and jcc7_win32_com.zip to the unfinished folder at D Lab. |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
|
Back to top |
|
|
sean
Joined: 24 Jun 2004 Posts: 609 Location: Bay Area, CA
|
Posted: Thu Aug 26, 2004 5:34 pm Post subject: |
|
|
Hrm... I wrote an ODBC wrapper in C++ a long time ago. If I find the time I'll brush the dust off and attempt a rewrite in D. One of the biggest problems with using ODBC is that the documentation is scattered, contradictory, and often just plain wrong. It took some trial and error before I got everything sorted out. |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Thu Aug 26, 2004 5:57 pm Post subject: |
|
|
sean wrote: | Hrm... I wrote an ODBC wrapper in C++ a long time ago. If I find the time I'll brush the dust off and attempt a rewrite in D. One of the biggest problems with using ODBC is that the documentation is scattered, contradictory, and often just plain wrong. It took some trial and error before I got everything sorted out. | Cool. SpottedTiger's headers seem to work fine, but there can always be more documentation and examples, of course. I don't recall whether he wrapped anything in objects or not.
In my employment, I work a with ADO (ActiveX Data Objects) using VBA. A while back, I tried to port the ADO header to D. I spent a lot of effort with it, but in the end I didn't know what I was doing. I think I'll try again sometime with the assistance of the Core32 project. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|