Home » U++ Library support » U++ SQL » How to access a firebird database ?
|
|
|
Re: How to access a firebird database ? [message #8361 is a reply to message #8360] |
Mon, 05 March 2007 10:39 |
|
jibe wrote on Mon, 05 March 2007 04:35 |
If somebody is interrested, please post here or send me a private message.
|
We all are intrested Anyway, you can access firebird database through oledb interface which is supported by upp. I use it with MS SQL Server 2005 and it works great. I'm pretty sure Firebird has oledb drivers.
|
|
|
|
|
|
|
|
Re: How to access a firebird database ? [message #9072 is a reply to message #8305] |
Mon, 16 April 2007 18:36 |
|
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
Hi,
Seems long and not so easy to understand how all that works... And Firebird is more complete than MySQL and SQLite, with transactions, stored procedures, triggers and so on. So, I have also to look at Oracle implementation to see how to make a good interface...
Unfortunately, when several packages are documented, all those regarding SQL and databases are not ! Is it possible to have something, even not complete ? At least, the list of classes with their hierarchy ? And/Or some more explanations about what you try to do with databases in UPP ? I was thinking, as unodgs, that your goal was to have a database-independant interface. But I agree with Mirek that it seems difficult because of the many differences between RDBMS... So, I don't understand very well yet what must do the interface ?
In others words, I don't understand yet how to get started to do that ! Some more advices, if possible, will be welcome !
PS : I'm downloading undog's interface for PostGreSQL. Maybe it will help me to understand... I'll see tomorrow
|
|
|
Re: How to access a firebird database ? [message #9077 is a reply to message #9072] |
Mon, 16 April 2007 19:47 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
jibe wrote on Mon, 16 April 2007 12:36 | Hi,
Seems long and not so easy to understand how all that works... And Firebird is more complete than MySQL and SQLite, with transactions, stored procedures, triggers and so on. So, I have also to look at Oracle implementation to see how to make a good interface...
Unfortunately, when several packages are documented, all those regarding SQL and databases are not !
|
Sorry about that, we are not there yet.... (logically, documenting Core and GUI was priority).
Quote: |
And/Or some more explanations about what you try to do with databases in UPP ?
|
I guess SQL related examples/reference are quite self-explanatory.
Mirek
|
|
|
Re: How to access a firebird database ? [message #9096 is a reply to message #9077] |
Tue, 17 April 2007 09:28 |
|
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
luzr wrote on Mon, 16 April 2007 19:47 | Sorry about that, we are not there yet.... (logically, documenting Core and GUI was priority).
|
Sure ! I wanted just to know if you already began something about it... Too bad !
luzr wrote on Mon, 16 April 2007 19:47 | I guess SQL related examples/reference are quite self-explanatory.
|
Yes, it's great help. But database specific, when I worried, reading the topic about postgres, if your goal was to do something common...
If I well understand, it seems difficult and not (yet) done, but somehow still in your ideas and to be studied when all databases will be implemented ?
Well, if it's not now, I think that I have not so much to care, and do something specific when needed...
|
|
|
Re: How to access a firebird database ? [message #10058 is a reply to message #8305] |
Mon, 18 June 2007 16:52 |
|
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
Hi,
Still trying to make this plugin for Firebird, but as I have few time to do that and study UPP, it's not yet working... I think I'll ask here some basic questions rather than trying by myself to discover though the code how it works, or I'll never finish... Sorry for that...
1) I'm afraid I did my FirebirdSHema.h the wrong way... Please, could you explain what must be the C++ types, Database types etc. in this code :
#define INT(x) COLUMN("integer", int, x, 0, 0)
#define INT_ARRAY(x, items) COLUMN_ARRAY("integer", int, x, 0, 0, items)
#define INT_(x) COLUMN_("integer", int, x, 0, 0)
#define INT_ARRAY_(x, items) COLUMN_ARRAY_("integer", int, x, 0, 0, items)
Seems that I have some difficulties to find the right syntax, as some types don't work properly... What is INT, "integer" and int ?
2) What do you call a dialect ? Seems it is (an arbitrary number related to) the database engine ?
ASSERT(dialect == ORACLE || dialect == SQLITE3 || dialect == MY_SQL || dialect == MSSQL ||
dialect == POSTGRESS || dialect == FIREBIRD || dialect == DB2);
In Firebird, there is 2 dialects (dialect 1 and dialect 3). How can I manage it ? But first, must I consider these 2 dialects ? dialect 1 is just to have a compatibility with an old version of Interbase. Maybe we could just ignore this one ? Firebird user's opinion is welcome about that as well as UPP developper's !
|
|
|
|
Re: How to access a firebird database ? [message #10070 is a reply to message #8305] |
Mon, 18 June 2007 21:58 |
|
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
Ok, thanks.
It's the way I did finally, but I have a problem with numeric values... For integers, they are 32 bits in Firebird (-2.147.483.648 to 2.147.483.647). If I use int C++ type, I always obtain 1, when I have different values in my table (created and verified with FlameRobin). If I try to use long (what is the limit for int in UPP ? 16 or 32 bits ?), I obtain this error :
database.sch:2: error: no match for call to ‘(Upp::FieldOperator) (Upp::String, long int&)’
What happens ? Am I blind that I can't see where is the problem ? Strings are working well, but no numeric values (int, doubles etc.). Not tried yet with date/time...
|
|
|
|
|
|
|
Re: How to access a firebird database ? [message #10486 is a reply to message #8305] |
Wed, 11 July 2007 23:33 |
|
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
Hi,
Sorry that I did not come here for some time...
I abandonned this : as I said, I have very few time. I think effectively that it's easy to do, but my problem is that I was not able to take enough time to learn UPP and how its libraries are working. But effectively, I think that knowing that it's possible to do the job in 2 or 3 days, at least for basical functions. Maybe a little more difficult to implement correctly all kinds of transactions, Stored procs, triggers and so on...
sorbelli wrote on Sun, 24 June 2007 10:03 | I also want to link to firebird, i thing to create a module,
if you want i can help you, i'm also a newbie of upp but
senior c/c++ programmer.
|
I'll contact you by PM.
sorbelli wrote on Sun, 24 June 2007 10:03 | do you use IBPP libray or direct call firebird function ?
|
Yes, I used IBPP : why should we re-invent the wheel ?
I'm still very interrested with this project, but unfortunately I'll have almost no time until next year... I'll see with sorbelli if we can cooperate.
|
|
|
Goto Forum:
Current Time: Mon May 06 01:24:48 CEST 2024
Total time taken to generate the page: 0.03458 seconds
|