DatabaseLayer : Feature request

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
gururamnath
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

DatabaseLayer : Feature request

Post by gururamnath »

Hello,
I'm wondering if we can have the ability to use the db libraries directly (using their dll interface) instead of compiling a lib file from the sources ? This is similar to that of wxSqlite3's dynamic library. Since most of the libraries directly uses native api instead of any class libraries I think it will be easy to implement this.
What do you think about this ?
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com
jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder »

I'm not sure that I understand what you mean. Do you mean a way to get ahold of the database object for each backend (for example sqlite3 for SQLite and isc_db_handle for Firebird)?
gururamnath
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath »

jb_coder wrote:I'm not sure that I understand what you mean. Do you mean a way to get ahold of the database object for each backend (for example sqlite3 for SQLite and isc_db_handle for Firebird)?
Sorry for not being clear. There are 2 ways a we can use a dll. 1)Link a lib file that is compiled with special macros (STDCALL) specified from the source or 2)Write a small wrapper which directly maps the DLL interfaces in a header (using LoadLibrary functions). This mapped header can be used in the application directly without the need of the intermediate lib file.

Both these techniques are used by wxSQLITE. You can create a SQLite Lib file and link it with your application (this can be a static or dynamic) or you can directly use their DLL wrapper header and include the support for Sqlite directly. The second approach will require you to distribute the database runtime dll alone.

My request is: Can we have an option in DBLayer to directly map all the db's runtime DLL functions without using an intermediate lib file ? This will help people not to go through the hassle of compiling and maintaining an extra set of lib files and header files. Since vendors does not support all programming languages, most of the languages write a dll wrapper and use the dlls directly.

Please let me know if we can do the same thing to DBLayer. Of course this will be an optional along with the regular external lib based support.

-regards,
Guru Kathiresan
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com

Code snippets for wxWidgets - http://wxsnippets.com
Feneck
Earned a small fee
Earned a small fee
Posts: 11
Joined: Tue Sep 18, 2007 8:43 pm

Post by Feneck »

What is database layer ?
A layer around wxdb (wxODBC) source code or other things ?

Strange for me. I try to use wxODBC a there is not a lot of documentations... (some problems with var blob).
Feneck
Earned a small fee
Earned a small fee
Posts: 11
Joined: Tue Sep 18, 2007 8:43 pm

Post by Feneck »

Ahhhhrrg !!!
I read ... wxODBC is no more supported, I lost several week of work !
Can I use your librairy with SqlServer ? I think no :-(
And other one ?
I read :
http://forums.wxwidgets.org/viewtopic.php?t=17371

I need a database layer (free) that work with Sql Server.
I'm sad today ! Too much wok lost !
jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder »

Yes, the code works with SQL Server. You need to compile against the latest FreeTDS library. I've used it successfully to retrieve from a SQL Server, but I don't think that blob support is functional yet.
Feneck
Earned a small fee
Earned a small fee
Posts: 11
Joined: Tue Sep 18, 2007 8:43 pm

Post by Feneck »

Without blob, i cannot take this library ! I need it !
I have tried to compile wxCode... very complex with Visual Studio 6.0 !
What is FreeTDS library ?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN »

Feneck,
MS made their DB based on the protocol that is known as TDS. As you probably know this protocol comes from the Sybase and it's implementation of Sybase database.
FreeTDS is a project that tries to implement the TDS specifications on Linux and it is an open source. It has a great support, and 0.82 version (current stable) will be available which will support BLOB and SQL Server 2005.
If you are on Windows only you don't need it. All you need is link you app against odbc libraries from Windows (just look at the 2.8 project files), and include the appropriate headers.
Also, since wx is an open-source, you can just cut and paste the odbc layer code from 2.8 branch... or maybe even become an official maintainer of these classes :)

Thank you.
vtararin
Knows some wx things
Knows some wx things
Posts: 37
Joined: Thu May 24, 2007 4:43 pm
Location: Ukraine
Contact:

Post by vtararin »

Feneck wrote:wxODBC is no more supported
Try to use DatabaseLayer with ODBC. It works at most properly with MS SQLServer.
Feneck
Earned a small fee
Earned a small fee
Posts: 11
Joined: Tue Sep 18, 2007 8:43 pm

Post by Feneck »

I have finished my project.
No more time to lost, the team doesn't care about portability, so i have used ADODB.
jb_coder
Super wx Problem Solver
Super wx Problem Solver
Posts: 267
Joined: Mon Oct 18, 2004 10:55 am

Post by jb_coder »

I've committed the code to source control to dynamically load the libraries for MySQL, Firebird, PostgreSQL, and ODBC. One potential problem with this is that your code may be subject to the GPL if you include the MySQL backend.
Post Reply