Sign in to follow this  
chrpeter

System.Data.SQLite Help

Recommended Posts

Here's the deal, I am implementing an SQLite database into my VS2008 Windows Forms C++ appointment keeper and I am not finding any resources for C++. All of the tutorials seem to be focused on C#. Could someone post a few System.Data.SQLite for C++ windows forms tutorials? I originally created all my database code for a non clr application, thinking that I could just add in the code when I was ready. Didn't work :). Thanks. PS. if you do not know any tutorials show me an example windows forms C++ program with some SQLite code. Just need a few examples to get started. Thanks.

Share this post


Link to post
Share on other sites
Is there any reason you want to use C++/CLI instead of C#? C++/CLI really is an abomination of nature and the only reason to use is to bridge between C++ and C# (for example, the SlimDX project is a good use of C++/CLI)

In any case, if you already know C++/CLI, then I don't see what would be so difficult about translating C# examples to C++/CLI.

Finally, if you've already got code for accessing sqlite from native C++, why don't you just use the native sqlite as well? I saw your last post on this topic, and you just had to turn off CLR compilation on that one file if you want to include it in your project.

Share this post


Link to post
Share on other sites
I tried the native code but the problem is that turning CLR off stops windows forms from compiling unknown namespace etc. Is it possible to turn CLR off and still use windows forms with C++?

Share this post


Link to post
Share on other sites
You can turn CLR support off for just that file. Right-click the file in solution explorer and change "Compile with Command Language Runtime support" to "No Common Language Runtime support".

Share this post


Link to post
Share on other sites
Choose native, or choose managed. Don't screw around in this netherworld that exists in between, especially when you don't know what you're doing. It's a total waste of time. Either commit yourself fully to native C++ and use something like wxWidgets for the interface, or completely make the jump to C#.

I'm firmly of the opinion that C++/CLI is only appropriate for those who are not only doing special interop stuff, but are experts in BOTH C++ and managed code. No one else should be anywhere near that stuff.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this