DatabaseLayer : Feature request

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

DatabaseLayer : Feature request

Post by gururamnath » Tue Sep 04, 2007 9:27 pm

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 » Thu Sep 06, 2007 1:20 pm

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
Moderator
Moderator
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath » Thu Sep 06, 2007 7:23 pm

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 » Wed Jan 30, 2008 10:18 am

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 » Wed Jan 30, 2008 10:57 am

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 » Thu Jan 31, 2008 11:20 am

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 » Thu Jan 31, 2008 6:05 pm

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: 3462
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN » Mon Mar 31, 2008 7:08 pm

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 » Mon Apr 28, 2008 5:41 pm

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 » Tue Apr 29, 2008 4:40 am

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 » Mon Mar 09, 2009 9:40 am

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