 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri May 04, 2007 6:43 pm Post subject: DBXExports/DBXDynalinkExport Documentation/Source availabili |
|
|
Codegear,
I would love to create a new dbexpress 4 dynalink driver for delphi
2007. Delphi 2007 was purchased thinking that dbexpress 4 would come
with source code. It has most of the code, and thanks for that, but
the code given only really allows me to develop a dbxdirect driver
(inherit from DBXCommon types). To develop a dbxdynalink driver as you
recommend in your documentation, I require DBXExports or
DBXDynalinkExport documentation or at least the interface my DLL will
be required to implement (and maybe some small documentation for each
method).
Is such code/documentation available for DBX driver writers?
Thanks
Dave |
|
| Back to top |
|
 |
Steve Shaughnessy Guest
|
Posted: Sat May 05, 2007 5:02 am Post subject: Re: DBXExports/DBXDynalinkExport Documentation/Source availa |
|
|
There is source code documentation for the DbxCommon unit.
The DbxDynalink unit provides a mapping from DbxCommon to DbxDynalinkExport
flat exports.
So there is an indirect way to intuit what needs to be done.
However I agree that the flat export interface should be documented.
I can work on creating source code documentation for the flat exports.
Are you implmenting your driver in Delphi or c/c++?
What database are you writting the driver for?
Thanks,
-Steve
<dpershouse (AT) gmail (DOT) com> wrote in message
news:1178286181.397900.133250 (AT) p77g2000hsh (DOT) googlegroups.com...
| Quote: | Codegear,
I would love to create a new dbexpress 4 dynalink driver for delphi
2007. Delphi 2007 was purchased thinking that dbexpress 4 would come
with source code. It has most of the code, and thanks for that, but
the code given only really allows me to develop a dbxdirect driver
(inherit from DBXCommon types). To develop a dbxdynalink driver as you
recommend in your documentation, I require DBXExports or
DBXDynalinkExport documentation or at least the interface my DLL will
be required to implement (and maybe some small documentation for each
method).
Is such code/documentation available for DBX driver writers?
Thanks
Dave
|
|
|
| Back to top |
|
 |
HalfNelson Guest
|
Posted: Sun May 06, 2007 8:11 am Post subject: Re: DBXExports/DBXDynalinkExport Documentation/Source availa |
|
|
On May 5, 10:02 am, "Steve Shaughnessy" <sshaughne...@b.com> wrote:
| Quote: | There is source code documentation for the DbxCommon unit.
The DbxDynalink unit provides a mapping from DbxCommon to DbxDynalinkExport
flat exports.
So there is an indirect way to intuit what needs to be done.
However I agree that the flat export interface should be documented.
I can work on creating source code documentation for the flat exports.
Are you implmenting your driver in Delphi or c/c++?
What database are you writting the driver for?
Thanks,
-Steve
dpersho...@gmail.com> wrote in message
news:1178286181.397900.133250 (AT) p77g2000hsh (DOT) googlegroups.com...
Codegear,
I would love to create a new dbexpress 4 dynalink driver for delphi
2007. Delphi 2007 was purchased thinking that dbexpress 4 would come
with source code. It has most of the code, and thanks for that, but
the code given only really allows me to develop a dbxdirect driver
(inherit from DBXCommon types). To develop a dbxdynalink driver as you
recommend in your documentation, I require DBXExports or
DBXDynalinkExport documentation or at least the interface my DLL will
be required to implement (and maybe some small documentation for each
method).
Is such code/documentation available for DBX driver writers?
Thanks
Dave- Hide quoted text -
- Show quoted text -
|
Steve,
Thanks for you reply,
yeah, i thought about reversing it from the dynalink implementation,
but thought i'd ask for the interface and documentation to save me
playing guessing games and reconstructing something that you surely
have on site somewhere .
I am interested in developing either a
Firebird or Postgresql driver (probably firebird unless someone beats
me to it)
and maybe an oledb driver, although your current ADO implementation is
leaps and bounds above the one in D7. Good work on that.
I'll be writing it in the best language available. Delphi or is it
"delphi object pascal" since delphi now means more than just a syntax.
Thanks
David. |
|
| Back to top |
|
 |
Peter Sawatzki Guest
|
Posted: Sun May 06, 2007 2:38 pm Post subject: Re: DBXExports/DBXDynalinkExport Documentation/Source availa |
|
|
Dave,
the code below should get you startet. It contains the Delphi
definitions I manually derived from looking at dbxdynalink. You'll
probably want to modify the Dbx*Handle definitions to replace
TDBXHandle with your own class names.
Peter
type
// TWideStringArray = array of WideString;
TDBXHandle = Pointer;
TDBXCommonHandle = TDBXHandle;
TDBXTransactionHandle = TDBXHandle;
TDBXDriverHandle = TDBXHandle;
TDBXConnectionHandle = TDBXHandle;
TDBXCommandHandle = TDBXHandle;
TDBXMetaDataHandle = TDBXHandle;
TDBXRowHandle = TDBXHandle;
TDBXReaderHandle = TDBXHandle;
TDBXWritableRowHandle = TDBXHandle;
DBXCallbackHandle = TDBXHandle;
TInt32 = LongInt;
TDBXErrorCode = TInt32;
TDBXByteArray = PByte;
TDBXWideString = PWideChar;
TDBXAnsiString = PChar;
TDBXWideStringVar = PWideChar;
TDBXAnsiStringVar = PChar;
TDBXWideStringBuilder = PWideChar;
TDBXAnsiStringBuilder = PChar;
TDBXDate = TInt32;
TDBXTime = TInt32;
TDBXDateTime = TInt32;
TSQLTimeStamp = TInt32;
TDBXParameterDirection = TInt32;
DBXTraceCallback = function(Handle: DBXCallbackHandle;
TraceCategory: TInt32; TraceMessage: TDBXWideString): CBRType; stdcall;
function DBXLoader_GetDriver (Count: TInt32; Names,
Values: TWideStringArray; ErrorMessage: TDBXWideStringBuilder; out
pDriver: TDBXDriverHandle): TDBXErrorCode; stdcall;
function DBXDriver_CreateConnection (Handle: TDBXDriverHandle;
out pConn: TDBXConnectionHandle): TDBXErrorCode; stdcall;
function DBXDriver_GetVersion (Handle: TDBXDriverHandle;
Version: TDBXWideStringBuilder; MaxLength: TInt32): TDBXErrorCode;
stdcall;
function DBXBase_GetErrorMessageLength (Handle: TDBXCommonHandle;
LastErrorCode: TDBXErrorCode; out ErrorLen: TInt32): TDBXErrorCode;
stdcall;
function DBXBase_GetErrorMessage (Handle: TDBXCommonHandle;
LastErrorCode: TDBXErrorCode; ErrorMessage: TDBXWideStringBuilder):
TDBXErrorCode; stdcall;
function DBXBase_Close (Handle: TDBXCommonHandle):
TDBXErrorCode; stdcall;
function DBXConnection_Connect (Handle:
TDBXConnectionHandle; Count: TInt32; Names, Values: TWideStringArray):
TDBXErrorCode; stdcall;
function DBXConnection_Disconnect (Handle:
TDBXConnectionHandle): TDBXErrorCode; stdcall;
function DBXConnection_SetCallbackEvent (Handle:
TDBXConnectionHandle; CallbackHandle: DBXCallbackHandle; CallbackEvent:
DBXTraceCallback): TDBXErrorCode; stdcall;
function DBXConnection_CreateCommand (Handle:
TDBXConnectionHandle; const CommandType: TDBXWideString; out pCommand:
TDBXCommandHandle): TDBXErrorCode; stdcall;
function DBXConnection_GetMetaData (Handle:
TDBXConnectionHandle; out pMetaData: TDBXMetaDataHandle):
TDBXErrorCode; stdcall;
function DBXConnection_BeginTransaction (Handle:
TDBXConnectionHandle; out TransactionHandle: TDBXTransactionHandle;
IsolationLevel: TInt32): TDBXErrorCode; stdcall;
function DBXConnection_Commit (Handle:
TDBXConnectionHandle; TransactionHandle: TDBXTransactionHandle):
TDBXErrorCode; stdcall;
function DBXConnection_Rollback (Handle:
TDBXConnectionHandle; TransactionHandle: TDBXTransactionHandle):
TDBXErrorCode; stdcall;
function DBXConnection_GetIsolation (Handle:
TDBXConnectionHandle; out IsolationLevel: TInt32): TDBXErrorCode;
stdcall;
function DBXCommand_CreateParameterRow (Handle: TDBXCommandHandle;
out Parameters: TDBXRowHandle): TDBXErrorCode; stdcall;
function DBXCommand_Prepare (Handle: TDBXCommandHandle;
const SQL: TDBXWideString; Count: TInt32): TDBXErrorCode; stdcall;
function DBXCommand_Execute (Handle: TDBXCommandHandle;
out Reader: TDBXReaderHandle): TDBXErrorCode; stdcall;
function DBXCommand_ExecuteImmediate (Handle: TDBXCommandHandle;
const SQL: TDBXWideString; out Reader: TDBXReaderHandle):
TDBXErrorCode; stdcall;
function DBXCommand_GetNextReader (Handle: TDBXCommandHandle;
out Reader: TDBXReaderHandle): TDBXErrorCode; stdcall;
function DBXCommand_GetRowsAffected (Handle: TDBXCommandHandle;
out Rows: Int64): TDBXErrorCode; stdcall;
function DBXCommand_SetMaxBlobSize (Handle: TDBXCommandHandle;
MaxBlobSize: Int64): TDBXErrorCode; stdcall;
function DBXCommand_SetRowSetSize (Handle: TDBXCommandHandle;
RowSetSize: Int64): TDBXErrorCode; stdcall;
function DBXParameterRow_SetParameterType(Handle:
TDBXRowHandle;Ordinal: TInt32; const Name: TDBXWideString;
ChildPosition: TInt32; ParamDirection: TDBXParameterDirection; DBXType:
TInt32; DBXSubType: TInt32; Size: Int64; Precision: Int64; Scale:
TInt32): TDBXErrorCode; stdcall;
function DBXReader_GetColumnCount (Handle: TDBXReaderHandle;
out ColumnCount: TInt32): TDBXErrorCode; stdcall;
function DBXReader_GetColumnMetadata (Handle: TDBXReaderHandle;
Ordinal: TInt32; Name: TDBXWideStringBuilder; out ColumnType: TInt32;
out ColumnSubType: TInt32; out Length: TInt32; out precision: TInt32;
out scale: TInt32; out flags: TInt32): TDBXErrorCode; stdcall;
function DBXReader_Next (Handle: TDBXReaderHandle):
TDBXErrorCode; stdcall;
function DBXRow_GetString (Handle: TDBXRowHandle;
Ordinal: TInt32; Value: TDBXAnsiStringBuilder; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetWideString (Handle: TDBXRowHandle;
Ordinal: TInt32; Value: TDBXWideStringBuilder; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetBoolean (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: LongBool; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetInt16 (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: SmallInt; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetInt32 (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: LongInt; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetInt64 (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: Int64; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetDouble (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: double; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetBcd (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: TBcd; out IsNull: LongBool): TDBXErrorCode;
stdcall;
function DBXRow_GetTimeStamp (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: TSQLTimeStamp; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetTime (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: TDBXTime; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetDate (Handle: TDBXRowHandle;
Ordinal: TInt32; out Value: TDBXDate; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetBytes (Handle: TDBXRowHandle;
Ordinal: TInt32; Offset: Int64; Value: array of byte; ValueOffset,
Length: Int64; out ReturnLength: Int64; out IsNull: LongBool):
TDBXErrorCode; stdcall;
function DBXRow_GetFixedBytes (Handle: TDBXRowHandle;
Ordinal: TInt32; var Value: array of byte; ValueOffset: TInt32; out
IsNull: LongBool): TDBXErrorCode; stdcall;
function DBXRow_GetByteLength (Handle: TDBXRowHandle;
Ordinal: TInt32; out Length: Int64; out IsNull: LongBool):
TDBXErrorCode; stdcall;
//function DBXRow_GetBinary (Handle: TDBXRowHandle;
Ordinal: TInt32; Value: TPointer; out IsNull: LongBool): TDBXErrorCode;
stdcall;
function DBXWritableRow_SetNull (Handle:
TDBXWritableRowHandle; Ordinal: TInt32): TDBXErrorCode; stdcall;
function DBXWritableRow_SetString (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; const Value: TDBXAnsiString;
Length: Int64): TDBXErrorCode; stdcall;
function DBXWritableRow_SetWideString (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; const Value: TDBXWideString;
Length: Int64): TDBXErrorCode; stdcall;
function DBXWritableRow_SetBoolean (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: LongBool):
TDBXErrorCode; stdcall;
function DBXWritableRow_SetInt16 (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: SmallInt):
TDBXErrorCode; stdcall;
function DBXWritableRow_SetInt32 (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: LongInt): TDBXErrorCode;
stdcall;
function DBXWritableRow_SetInt64 (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: Int64): TDBXErrorCode;
stdcall;
function DBXWritableRow_SetDouble (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: double): TDBXErrorCode;
stdcall;
function DBXWritableRow_SetBcd (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: TBcd): TDBXErrorCode;
stdcall;
function DBXWritableRow_SetTimeStamp (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; var Value: TSQLTimeStamp):
TDBXErrorCode; stdcall;
function DBXWritableRow_SetTime (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: TDBXTime):
TDBXErrorCode; stdcall;
function DBXWritableRow_SetDate (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: TDBXDate):
TDBXErrorCode; stdcall;
//function DBXWritableRow_SetBinary (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; Value: TPointer; Length:
Int64): TDBXErrorCode; stdcall;
function DBXWritableRow_SetBytes (Handle:
TDBXWritableRowHandle; Ordinal: TInt32; BlobOffset: Int64; Value:
TBytes; LastIndex: TInt32;{dummy to simulate native "open array"}
ValueOffset: Int64; Length: Int64): TDBXErrorCode; stdcall;
dpershouse (AT) gmail (DOT) com wrote:
| Quote: | Codegear,
I would love to create a new dbexpress 4 dynalink driver for delphi
2007. Delphi 2007 was purchased thinking that dbexpress 4 would come
with source code. It has most of the code, and thanks for that, but
the code given only really allows me to develop a dbxdirect driver
(inherit from DBXCommon types). To develop a dbxdynalink driver as you
recommend in your documentation, I require DBXExports or
DBXDynalinkExport documentation or at least the interface my DLL will
be required to implement (and maybe some small documentation for each
method).
Is such code/documentation available for DBX driver writers?
Thanks
Dave
|
-- |
|
| Back to top |
|
 |
HalfNelson Guest
|
Posted: Mon May 07, 2007 5:10 pm Post subject: Re: DBXExports/DBXDynalinkExport Documentation/Source availa |
|
|
On May 6, 7:38 pm, "Peter Sawatzki" <p...@sawatzki.de> wrote:
Thanks Peter, its a good start :)
-Dave |
|
| 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
|
|