Delphi-PRAXiS
Seite 2 von 3     12 3      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Create an ODBC Driver (https://www.delphipraxis.net/86253-create-odbc-driver.html)

mohfa 15. Feb 2007 16:52

Re: Create an ODBC Driver
 
please is there any news .


regards

marabu 15. Feb 2007 21:11

Re: Create an ODBC Driver
 
Hi Michy, welcome to Delphi-PRAXiS.

You already have studied the Microsoft Documentation for ODBC, I understand. You also have implemented the required functions, but your first test failed. How do you test? Do you make good use of the Microsoft ODBC Test Program?

A fully implemented v3 ODBC Driver is by no means a small project. Perhaps you should try to isolate small problem areas to attract more helpers. As soon as you focus on some detail, even members without explicit knowledge about ODBC drivers might be able to proof read your code.

If you don't trust your own translation of the C header files you could give Dr. Bob's HEADCONV utility a try.

Kind Regards

marabu

mohfa 16. Feb 2007 06:52

Re: Create an ODBC Driver
 
I hope if someone can provide me with a Simple DLL ( ODBC Driver ) with it's source code , and especially the declarations of exported Functions .

Michy

Reinhard Kern 16. Feb 2007 12:54

Re: Create an ODBC Driver
 
Zitat:

Zitat von mohfa
I hope if someone can provide me with a Simple DLL ( ODBC Driver ) with it's source code , and especially the declarations of exported Functions .

Michy

Hello,

if you expect to get a sample source with a ODBC driver written in Delphi - i believe that such a driver does not exist. Most programmers (including myself) will study MS documentation and header files and so on and come to the conclusion, that it is senseless to convert all this stuff to Pascal, while the job could be done directly in C/C++. Maybe you do not believe this, but this does not change the reality.

To be exact: i am sure, that it is possible to write ODBC drivers in Delphi, and i am equally sure, that it is absolutely senseless. And i am sure that i am not alone with this opinion.

SY Reinhard

mohfa 16. Feb 2007 13:04

Re: Create an ODBC Driver
 
OK thank you Reinhard Kern , let's suppose it's - a Little bit-impossible to build my DBMS ODBC Driver using Delphi so what shoud i do :
Should i convert all My DBMS Pas Files into C++ or what ?
is it so hard to build ( i mean my DBMS ODBC Driver )it with C++ ?
-- i have succedded in Translating ( Conversion ) of SQL.H , and the ODBC wraper into Pas file as you can see in my SImple Unite .
could you please expliane me more especially about the 1st question ,

many thanks

michy

mkinzler 16. Feb 2007 13:21

Re: Create an ODBC Driver
 
Not in the whole . He pointed out that you should implement the ODBC-Driver in c/c++.

mohfa 16. Feb 2007 14:43

Re: Create an ODBC Driver
 
Zitat:

Zitat von mkinzler
Not in the whole . He pointed out that you should implement the ODBC-Driver in c/c++.

Believe me and sorry of that , all what i want to know is : should i convert all my DBMS pas Files into C , C++ or what , or is there any other issue or matter that i must understand .
Could you explaine me what are pointing on :roll:

if it's a matter of ODBC needed File like Sql.H ... we can translate them into Pas files ,
my problem is in synchronising between the exported Function in the DLL file and the other Units .

marabu 16. Feb 2007 16:52

Re: Create an ODBC Driver
 
Hi mohfa,

you want to know if you can implement your ODBC driver using Delphi instead of C(++)? So rest assured and have a look at this implementation done by Gerrit Moeller: GM Interbase ODBC Driver.

I'm not sure what your other problems are, but maybe they are gone after you had a peek at the code.

Regards

Reinhard Kern 17. Feb 2007 16:13

Re: Create an ODBC Driver
 
Zitat:

Zitat von mohfa
...
Should i convert all My DBMS Pas Files into C++ or what ?
...

Hello, maybe i do not understand your problem at all. From the time on when there appeared programmable objects like the first microprocessors i used mixed language programming, C and Assembler, Delphi + Assembler + C, or whatever ist necessary. We all use today Delphi + C/C++, since Win32 API is written in C/C++ and it is definded in C/C++. It is really impossible to write a single language software, so mixed language cannot be a problem at all!

Of course you need not to port your software to C/C++ - you just use it from your driver written in C/C++. To give a simple example: there is surely a function to read a record from the database, and surely the ODBC driver needs this function at a certain point. The functionality of "ReadRecord" remains defined by Pascal if you have decided so in the past. Your newly created driver just calls this function - it does not really matter if from a Delphi or a C environment; between DLLs the language is not important and for direct calls you need some knowhow about calling conventions.

But, as i said, maybe i dont understand anything.

SY Reinhard

mohfa 19. Feb 2007 09:31

Re: Create an ODBC Driver
 
hello again .
i want to know where should i declare my Dataset in mean i which Unite is it in : OdbcInst , OdbcConst


Regards


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:12 Uhr.
Seite 2 von 3     12 3      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz