www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is there anybody who used FireBird DB?

reply Suliman <evermind live.ru> writes:
For my regret I need way to work with FireBird. I have found only 
one driver for D https://github.com/jiorhub/fired

Before I did not work with C-bindigs and D. So I can't understand 
how to use this files.

Could anybody help and explain how to work with it?
Mar 15 2016
next sibling parent reply Kagamin <spam here.lot> writes:
The same as you would do it in C.
Mar 15 2016
parent reply Suliman <evermind live.ru> writes:
On Tuesday, 15 March 2016 at 15:01:09 UTC, Kagamin wrote:
 The same as you would do it in C.
I do not know C :( Please explain me what i should to do with this binding
Mar 15 2016
parent reply Kagamin <spam here.lot> writes:
On Tuesday, 15 March 2016 at 17:12:44 UTC, Suliman wrote:
 On Tuesday, 15 March 2016 at 15:01:09 UTC, Kagamin wrote:
 The same as you would do it in C.
I do not know C :( Please explain me what i should to do with this binding
C is mostly the same as low-level subset of D: primitive types, pointers, structs and functions. AFAIK all libraries are used in the same way, not sure how to explain that, do the same as with other libraries.
Mar 16 2016
parent reply Suliman <evermind live.ru> writes:
I have found next driver
http://www.ibpp.org/#what_is_ibpp

Here http://sourceforge.net/projects/ibpp is link to zip package 
that include two exe files and ibpp.lib ibpp.h
it's look like it's ass that need for binding. I tried to run 
htod.exe but got error:

D:\Project\2016>htod.exe ibpp.h
Fatal error: unable to open input file windows.h

 From where I should to get this file?
Mar 30 2016
parent Kagamin <spam here.lot> writes:
Mingw or windows platform SDK.
Mar 30 2016
prev sibling next sibling parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 03/15/2016 07:08 AM, Suliman wrote:
 For my regret I need way to work with FireBird. I have found only one
 driver for D https://github.com/jiorhub/fired

 Before I did not work with C-bindigs and D. So I can't understand how to
 use this files.

 Could anybody help and explain how to work with it?
I'm not familiar with fired or that module (e.g. whether its complete or not) but it seems like only the function declaration that are not commented-out in this extern(C) block are made available: https://github.com/jiorhub/fired/blob/master/ibase.d#L266 For example, in order to use the following function you would have to have arguments to pass to it: ISC_STATUS isc_attach_database(ref ISC_STATUS_ARRAY, short, const ISC_SCHAR*, isc_db_handle*, short, const ISC_SCHAR*); ISC_STATUS_ARRAY arr = /* I don't know how to set it up */; short s = /* What is this 'short' for? */ ISC_SCHAR c = /* What does this argument mean? */; // etc. And then you make the call: ISC_STATUS status = isc_attach_database(arr, s, &c, /* etc. */); You really have to know fired and apply that knowledge to this module similar to the call above. :-/ Ali
Mar 15 2016
prev sibling parent reply Kagamin <spam here.lot> writes:
Also there's ODBC driver 
http://www.firebirdsql.org/en/devel-odbc-driver/ - you can use 
it, phobos has ODBC bindings.
Mar 30 2016
parent reply Suliman <evermind live.ru> writes:
On Wednesday, 30 March 2016 at 18:31:35 UTC, Kagamin wrote:
 Also there's ODBC driver 
 http://www.firebirdsql.org/en/devel-odbc-driver/ - you can use 
 it, phobos has ODBC bindings.
Where I can get the latest version? There is not any package on http://code.dlang.org/ and searching on github show few project with this keyword
Mar 30 2016
next sibling parent Kagamin <spam here.lot> writes:
Latest version of what? ODBC bindings are in phobos: 
http://dlang.org/phobos/etc_c_odbc_sql.html
Mar 30 2016
prev sibling parent reply Kagamin <spam here.lot> writes:
You can also look here 
https://github.com/cruisercoder/dstddb/blob/master/src/std/data
ase/odbc/database.d for an example of accessing ODBC from D (only strings are
supported so far).
Mar 30 2016
parent reply Suliman <evermind live.ru> writes:
On Wednesday, 30 March 2016 at 20:23:13 UTC, Kagamin wrote:
 You can also look here 
 https://github.com/cruisercoder/dstddb/blob/master/src/std/data
ase/odbc/database.d for an example of accessing ODBC from D (only strings are
supported so far).
Does ita mean that I would not able to select blob/binary field?
Mar 30 2016
parent reply Kagamin <spam here.lot> writes:
AFAIK when you request a string, whatever value is there gets 
converted to string. Or you can just add code to extract blobs, 
that would be less effort than writing everything from scratch.
Mar 31 2016
parent Suliman <evermind live.ru> writes:
On Thursday, 31 March 2016 at 08:53:46 UTC, Kagamin wrote:
 AFAIK when you request a string, whatever value is there gets 
 converted to string. Or you can just add code to extract blobs, 
 that would be less effort than writing everything from scratch.
I have contact with it's developer. Hope for help.
Mar 31 2016