AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Create an ODBC Driver

Ein Thema von mohfa · begonnen am 11. Feb 2007 · letzter Beitrag vom 19. Feb 2007
Antwort Antwort
mohfa

Registriert seit: 11. Feb 2007
97 Beiträge
 
Delphi 7 Enterprise
 
#1

Re: Create an ODBC Driver

  Alt 12. Feb 2007, 20:06
Zitat von shmia:
Do you know microsoft's ODBC documentation ?
http://msdn2.microsoft.com/en-us/library/ms709326.aspx
You need several weeks to fully understand how to write a ODBC driver.
You have to implement about 15 to 25 functions in your ODBC DLL.
yes sir , that's what i did the problem is with the DLL Exported Functions especiqlly with ConfigDriver and ConfigDSN functions.
so what i did :
i imlemented a unit named ODBCConst : where i declared all the Functions and this is a simple of the Unite :
Delphi-Quellcode:
function SQLAllocConnect(henv :Longint;var phdbc :Longint): Integer;
   stdcall;
function SQLAllocEnv(var phenv :Longint): Integer;
   stdcall;
function SQLAllocStmt(hdbc :Longint;var phstmt :Longint): Integer;
   stdcall;
function SQLBindCol(hstmt :Longint;icol :Word; fCType :Smallint;
   var rgbValue ;cbValueMax :Longint;var pcbValue): Integer;
   stdcall;
function SQLBindParameter(StatementHandle :Longint; ParameterNumber :Word;
   InputOutputType :Smallint; ValueType :Smallint;
   ParameterType :Smallint;
   ColumnSize :Longint; DecimalDigits :Smallint;
      ParameterValuePtr : Pointer;
   BufferLength :Longint;
      StrLen_or_IndPtr : Pointer
      ): Integer;
   stdcall;
function SQLConfigDriver(
  hwndParent: HWND;
  fRequest: WORD;
  lpszDriver: LPCSTR;
  lpszArgs: LPCSTR;
  lpszMsg: LPSTR;
  cbMsgMax: WORD;
  var pcbMsgOut: WORD): BOOL; stdcall;
 function ConfigDSN(
  hwndParent: HWND;
  fRequest: WORD;
  lpszDriver: LPCSTR;
  lpszAttributes: LPCSTR): BOOL; stdcall;
.....
ok as you see i have declared the functions SQLConfigDriver , and ConfigDSN
i export these 2 functions from the DLL File ( the ODBC Driver ), and i use a form to config the DSN the Driver is installed in the ODBC manager but the Result is so is there any thing wrong here
.

if you want i can send you my ODBC Driver and you can see or help . ,any thanks

if possible could you please send me an exe,ple of an ODBC Driver .

Regards MICHY
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:22 Uhr.
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