mtangoo / wxDatabase

wxWidgets library for connecting to major relational database
http://mtangoo.github.io/database/index.html
37 stars 17 forks source link

How to install wxDatabase with wxwidgets? #1

Closed chandan315 closed 9 years ago

chandan315 commented 9 years ago

I have installed wxWidgets 3.0.2 and Code Blocks 13.12 on my pc successfully. How should I install wxDatabase library on my pc? Thanks.

mtangoo commented 9 years ago

there are visual studio build files. am yet to get time to create solid build system. I plan to add CMake or Bakefile. which enviroment do you want to build?

chandan315 commented 9 years ago

I would like to use code blocks 13.12.

mtangoo commented 9 years ago

Does CodeBlocks have option to import VS or CodeLite projects? If so you can just import it. I want to add CMake Option but will try to make sure I have CB Project added

chandan315 commented 9 years ago

I don't know anything about code blocks as of yet. I am a newbie in wxwidgets. I just want to know how can I set wxDatabase files in my wxwidgets application that is created by CodeBlocks 13.12

mtangoo commented 9 years ago

There is option in file->Import menu. Select the VS Solution and go to wxDatabase/build/msw And import it.

mtangoo commented 9 years ago

Pls let me know if that works

chandan315 commented 9 years ago

I have successfully imported in code blocks and I see a project loaded. What do I have to do next? Build and run option? I have done a build and it gives me an error on "#include <wx/wx.h>"

mtangoo commented 9 years ago

build. Its a library so you just build it. Am looking at making CMake build

chandan315 commented 9 years ago

What do I have to do for the error wx.h no such file or directory?. Do I need to add the path to environment variables. I don't see any cmake option anywhere

mtangoo commented 9 years ago

wxDtabase depends on wxWidgets. Do you have any experience with wxWidgets? I suggest you try simple app. I don't use C::B so am of little help here. I use CodeLite and there is CodeLite project in the library. If you want download CL from codelite.org

CMake build will be added later (see #2 )

chandan315 commented 9 years ago

I am new to wxwidgets and codeblocks. I am stuck!!! Please help

mtangoo commented 9 years ago

Start here: http://codelite.org/LiteEditor/Documentation See Also my series on wxWidgets. Its better to understand wxWidgets before jumping into libraries

chandan315 commented 9 years ago

Is codelite free? I don't want to go thru the pain of installing another IDE. Codeblocks gave me enuff trouble.

mtangoo commented 9 years ago

Yes!

mtangoo commented 9 years ago

http://codelite.org/

chandan315 commented 9 years ago

The documentation doesn't show how to import wxwidgets library. It says page not available. And after that I need to set up wxDatabase. Can you help me setup wxwidgets library and wxDatabase in CodeLite?

mtangoo commented 9 years ago

Documentation for what?

chandan315 commented 9 years ago

I don't see any documentation for wxDatabase or any other data access library

mtangoo commented 9 years ago

If you are just starting with wxWidgets, its too much to start with such advanced concepts. Get the basics first. You don't find much documentation because of lack of interest of the community. I will write one soon, but I can't promise of anything specific date right now. if you can use CodeLite, there is already project file you can add in CL. Create New Workspace, and right click it to add existing project and then point to that specific project in wxDatabase

chandan315 commented 9 years ago

Gotcha...will try it.......Thanks for the patience buddy. I will try those steps and see if I succeed.

mtangoo commented 9 years ago

you are welcome :+1:

manyleaves commented 9 years ago

I've learnt quite a bit about msbuild in the past two years and only a couple of weeks ago I ported the msw project and solution files to Windows Desktop Express 2012. Although a Microsoft product this version is free!

wx_vc11.rar.txt

mtangoo commented 9 years ago

@manyleaves Should we go with Cmake or bakefile? Can you put your inputs on other issue I opened? BTW am happy to see you back

chandan315 commented 9 years ago

I am not able to get any database library installed with codeblocks

mtangoo commented 9 years ago

What have you learned so far and what do you have. Expect none of us to solve everything for you1

chandan315 commented 9 years ago

I have atleast been successful in installing wxWidgets3.0.2 I am trying to get wxSqlite3 installed with wxwidgets I am nearly there in completing it....

I would also like to use DatabaseLayer as it has an ODBC functionality for SQL Server... I want to use CodeBlocks as my IDE......I don't want to use Codelite. DatabaseLayer is what I need to setup

mtangoo commented 9 years ago

I would also like to use DatabaseLayer as it has an ODBC functionality for SQL Server... I want to use CodeBlocks as my IDE......I don't want to use Codelite.

Take the CodeLite Project and ask in C::B forum how to make one (and contribute back). Or wait until I have time to create a CMake build

manyleaves commented 9 years ago

Chandan

The reason I got involved with wxDatabase was because all my (many years) DB experience is with MS SQL Server and I wanted to access it directly from wxWidgets.

DatabaseLayer was an excellent start but abandoned some years ago. When Stefano decided to breath new life into it via wxDatabase I decided to do my bit to update the TDS side of things. (Stefano should really update the README because it doesn't make mention of the fact that TDS is still supported.) TDS is the protocol used internally by MS SQL Server and allows direct access rather than going via ODBC. As far as I know I've fixed up the few memory leaks and crashes that remained in Joseph's abandoned code. I've already used wxDatabase to access MS SQL Server databases for a couple of years in my own projects.

What remains to do, for now, is a cross-platform build.

Andrew

mtangoo commented 9 years ago

@manyleaves Sorry for not mentioning that. I'm going to update it. Please tell me what is, and is not supported (or you can just update it yourself if you have time to)

mtangoo commented 9 years ago

What remains to do, for now, is a cross-platform build.

And ... Solid documentation (API, Tutorials et al)

chandan315 commented 9 years ago

Do what you need to do....but please help me query the sql server database... Without sql server I will have to use wxsqlite3......

Just tell me how you used sql server and I will do the same thing for odbc data access.

manyleaves commented 9 years ago

@mtangoo do you still have the samples/database folder I would have uploaded with the vc10 source? The unit tests in there should answer all of @chandan315 's questions. I know I personally tested the following: TDS direct and TDS via ODBC SQLite direct and SQLite via ODBC MS Access via ODBC @chandan315 may be able to find a colleague with VS2010 installed, build and test the code and then work back from there to Code Blocks. @chandan315 are you on Windows or some other OS?

mtangoo commented 9 years ago

@manyleaves I will have to check it out, but I created CMake file and tested yesterday with MinGW and MySQL it seems to work fine. I will push it later today so that we start improving it. With CMake we will need no more VS files as it can generate automatically.

We can test that and once we are confident it works we can use it as template to add other databases.