System.Data.SQLite Help

Started by
3 comments, last by Promit 14 years, 9 months ago
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.
Chris Peterson
Advertisement
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.
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++?
Chris Peterson
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".
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.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement