Re: [sqlite] C# amalgamation hand holding requested

2012-01-24 Thread Roosevelt Anderson
.NET code is compiled to byte code that runs on the Common Language
Runtime (CLR) which is a virtual machine. Each .NET application
creates an instance of the CLR. This is getting outside of the scope
of this list. If you need more information I would research the
architecture of NET.

On Tue, Jan 24, 2012 at 11:41 AM, Black, Michael (IS)
<michael.bla...@ngc.com> wrote:
> And what's your reference for that?
> It can't load your DLL if an already-same-named DLL is loaded by some other
> app.  Or is there another reference page from Microsoft which contradicts
> the one I sent which explains that?  If the sqlite guys would put the
> version# in the DLL name that would help a LOT.
>
>
>
>
> Michael D. Black
>
> Senior Scientist
>
> Advanced Analytics Directorate
>
> Advanced GEOINT Solutions Operating Unit
>
> Northrop Grumman Information Systems
>
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
> behalf of Roosevelt Anderson [roosevelt.ander...@gmail.com]
> Sent: Tuesday, January 24, 2012 10:22 AM
> To: General Discussion of SQLite Database
> Subject: EXT :Re: [sqlite] C# amalgamation hand holding requested
>
> This is .NET development not regular Windows development. The .NET
> application most of the time will use the version of
> System.Data.SQLite.dll that is in the same directory as the executing
> application. The only time it will not use this version is if you load
> System.Data.SQLite.dll into the Global Assembly Cache which I do not
> recommend.
>
> On Tue, Jan 24, 2012 at 10:49 AM, Black, Michael (IS)
> <michael.bla...@ngc.com> wrote:
>> Yes --  you do need to worry.
>>
>> Plusyou apparently should rename the DLL so it doesn't collide with any 
>> others from what I can discern from this:
>>
>> http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx
>>
>>
>>
>> Michael D. Black
>>
>> Senior Scientist
>>
>> Advanced Analytics Directorate
>>
>> Advanced GEOINT Solutions Operating Unit
>>
>> Northrop Grumman Information Systems
>>
>> 
>> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
>> behalf of Don V Nielsen [donvniel...@gmail.com]
>> Sent: Tuesday, January 24, 2012 9:39 AM
>> To: General Discussion of SQLite Database
>> Subject: EXT :Re: [sqlite] C# amalgamation hand holding requested
>>
>> Ok.  So I am doing things correctly.  I am already doing things correctly.
>>  I am using the provided .NET dll.  I copy it to my local project.  And
>> when that project moves to production, it will be in the project's .bin
>> folder.  I should not have to worry about the dll hell associated with HP
>> and Quicken and what not.
>>
>> Thanks.  I was getting confused.
>>
>> dvn
>>
>>
>> On Mon, Jan 23, 2012 at 2:03 PM, Simon Slavin <slav...@bigfraud.org> wrote:
>>
>>>
>>> On 23 Jan 2012, at 7:39pm, Roosevelt Anderson wrote:
>>>
>>> > The C# compiler does not compile C. C# and VB.NET get compiled down to
>>> bytecode.
>>> >
>>> > On Mon, Jan 23, 2012 at 12:56 PM, Simon Slavin <slav...@bigfraud.org>
>>> wrote:
>>> >>
>>> >> On 23 Jan 2012, at 4:39pm, Roosevelt Anderson wrote:
>>> >>
>>> >>> You can't use the amalgamation directly in C# as the SQLite
>>> >>> amalgamation is in C.
>>> >>
>>> >> Can you not simply tell your compiler that '.c' files are C and not C#
>>> ?  That's what you do with Objective-C.  Or do C# compilers not compile C ?
>>>
>>> Ah.  So C# is not a superset of C.  That explains things.  Thanks.
>>>
>>> Simon.
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] C# amalgamation hand holding requested

2012-01-24 Thread Roosevelt Anderson
This is .NET development not regular Windows development. The .NET
application most of the time will use the version of
System.Data.SQLite.dll that is in the same directory as the executing
application. The only time it will not use this version is if you load
System.Data.SQLite.dll into the Global Assembly Cache which I do not
recommend.

On Tue, Jan 24, 2012 at 10:49 AM, Black, Michael (IS)
<michael.bla...@ngc.com> wrote:
> Yes --  you do need to worry.
>
> Plusyou apparently should rename the DLL so it doesn't collide with any 
> others from what I can discern from this:
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx
>
>
>
> Michael D. Black
>
> Senior Scientist
>
> Advanced Analytics Directorate
>
> Advanced GEOINT Solutions Operating Unit
>
> Northrop Grumman Information Systems
>
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
> behalf of Don V Nielsen [donvniel...@gmail.com]
> Sent: Tuesday, January 24, 2012 9:39 AM
> To: General Discussion of SQLite Database
> Subject: EXT :Re: [sqlite] C# amalgamation hand holding requested
>
> Ok.  So I am doing things correctly.  I am already doing things correctly.
>  I am using the provided .NET dll.  I copy it to my local project.  And
> when that project moves to production, it will be in the project's .bin
> folder.  I should not have to worry about the dll hell associated with HP
> and Quicken and what not.
>
> Thanks.  I was getting confused.
>
> dvn
>
>
> On Mon, Jan 23, 2012 at 2:03 PM, Simon Slavin <slav...@bigfraud.org> wrote:
>
>>
>> On 23 Jan 2012, at 7:39pm, Roosevelt Anderson wrote:
>>
>> > The C# compiler does not compile C. C# and VB.NET get compiled down to
>> bytecode.
>> >
>> > On Mon, Jan 23, 2012 at 12:56 PM, Simon Slavin <slav...@bigfraud.org>
>> wrote:
>> >>
>> >> On 23 Jan 2012, at 4:39pm, Roosevelt Anderson wrote:
>> >>
>> >>> You can't use the amalgamation directly in C# as the SQLite
>> >>> amalgamation is in C.
>> >>
>> >> Can you not simply tell your compiler that '.c' files are C and not C#
>> ?  That's what you do with Objective-C.  Or do C# compilers not compile C ?
>>
>> Ah.  So C# is not a superset of C.  That explains things.  Thanks.
>>
>> Simon.
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] C# amalgamation hand holding requested

2012-01-23 Thread Roosevelt Anderson
The C# compiler does not compile C. C# and VB.NET get compiled down to bytecode.

On Mon, Jan 23, 2012 at 12:56 PM, Simon Slavin <slav...@bigfraud.org> wrote:
>
> On 23 Jan 2012, at 4:39pm, Roosevelt Anderson wrote:
>
>> You can't use the amalgamation directly in C# as the SQLite
>> amalgamation is in C.
>
> Can you not simply tell your compiler that '.c' files are C and not C# ?  
> That's what you do with Objective-C.  Or do C# compilers not compile C ?
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] C# amalgamation hand holding requested

2012-01-23 Thread Roosevelt Anderson
You can't use the amalgamation directly in C# as the SQLite
amalgamation is in C. To use the amalgamation you'd have to compile
the code in a separate C/C++ project, create a wrapper class using
P/Invoke and then call it from your application. You should use the
.NET data provider found here
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
which has already done the work for you.

On Fri, Jan 20, 2012 at 10:42 AM, Don V Nielsen  wrote:
> I need help using the amalgamation in my projects.  I simply do not know
> what steps to take in VS to implement it.
>
> I have some fairly elaborate projects that I have been redeveloping to use
> sqlite instead of .net structure and memory functions.  One project is
> complete, but it uses the sqlite dll.  Recent conversations by users has
> convinced me that I would be better off using the amalgamation file
> instead.  However, I don't know what steps in VS to do to specify the
> source and header files so that it compiles into my application.
>
> Can someone walk through steps necessary for specifying properties,
> references, and source code.  Again, this is C# development.  I've really
> become self-aware just how little I know about VS in the terms of
> application development.  I've been flying blind for quite some time.  I'm
> just like a newbie.
>
> dvn
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Help with SQLite and VB2010 Express

2011-01-10 Thread Roosevelt Anderson
You really don't need to run the msi. You can download the binary
package and added the dlls as references and start using the
dataprovider. In the future, this sort of question should be asked in
the System.Data.SQLite forum.

On Mon, Jan 10, 2011 at 12:10 PM, Bob Keeland  wrote:
> I've been struggling with how to use SQLite with Visual Basic2010 Express. 
> VB2010 Express does not work with Microsoft Access (which I've used in the 
> past) and so I have to use SQL. I don't feel that I need the capabilities of 
> Microsoft SQL Server and so I've been looking at SQLite and MySQL. I've got 
> System.Data.SQLite (VB.NET - ADO.NET provider on how to connect to SQLite 
> within Visual Basic) from the forum and I've got "SQLite-1.0.66.0-setup" but 
> when I run it I get a message that says that it will switch the OleDB 
> connection in VB2010 to run SQLite instead of Access. Then, it gives me an 
> error message that it cannot read;
>   "c:\ . . . . \AppData\Local\Temp\tmpB3B6.tmp.msi"
>
> Does anyone know why I get this message? Do I need to buy Visual Studio 2010 
> Professional in order to do database work? Is the VB2010 Express just too 
> limited???
>
> BobK
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite for .NET Framework 4.0

2010-07-08 Thread Roosevelt Anderson
You should ask your question here http://sqlite.phxsoftware.com/forums/

On Thu, Jul 8, 2010 at 9:24 AM, Daniel  wrote:
> I forgot to say I have Visual Studio 2010 with .NET Framework 4.0 for
> programming in C#.
>
> In VS2008 it worked fine and after changing to Version 2010 it don't.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite and .Net 4.0 configuration

2010-04-16 Thread Roosevelt Anderson
These are questions about System.Data.SQlite data provider and should
be asked at their forum found here
http://sqlite.phxsoftware.com/forums/

On Thu, Apr 15, 2010 at 7:37 PM, Berryl  wrote:
> Hi Anyone & Everyone;
>
> Below is a message I posted on StackOverflow. I am guessing no response are 
> because noone there knows.
>
> Thanks for any help
> 
>
> 1) Which SQLite dll?? I *think* it is 
> [SQLite-1.0.65.1-vs2010rc-net4-setup.zip](http://sqlite.phxsoftware.com/forums/storage/29/9056/SQLite-1.0.65.1-vs2010rc-net4-setup.zip).
>  Yes?
>
> 2) I ran the installer so the dll is in the GAC but I usually find there are 
> less problems if I can just reference the dll stand alone. Is there any 
> reason it *needs* to be in the GAC, and if not, what's the best way to 
> uninstall it from the GAC (I can get to the GAC folder but it says I need 
> permission to delete the files; should I leave the SQLite Designer dll's 
> there?)?
>
> 3) x64. There is an x64 dll in the download. I had problems with SQLite in 
> the past though that I could only resolve by compiling to x86. Can I safely 
> reference the x64 dll and compile to Any CPU now?
>
> 4) what is the right NHib config? I have been using the one below, but since 
> the error I get says "Could not create the driver from 
> NHibernate.Driver.SQLite20Driver." that configuration is guilty until proven 
> innocent too?
>
> 5) could FNH be a problem too? I don't use the pre-configured fluent SQLite 
> method but FNH has to provide a reference to it for that to work, no?
>
> TIA & Cheers,
> Berryl
>
>    
>    ...
>        NHibernate.Dialect.SQLiteDialect
>         name="connection.driver_class">NHibernate.Driver.SQLite20Driver
>        Data 
> Source=:memory:;Version=3;New=True;
>    
>    
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite on Windows with Mono

2010-03-22 Thread Roosevelt Anderson
If you are doing .Net development on both linux and windows I would
recommend using the System.Data.SQLite ADO dataprovider found here
over http://sqlite.phxsoftware.com/ over the default dataprovider
found in Mono. This library will not only work on the Mono platform
but will also work in Visual Studio.

On Mon, Mar 22, 2010 at 6:48 AM, Francesco PIRANEO G.  wrote:
> Hi all,
> I normally develop my application on Ubuntu 9.10 and things goes very
> smoothly, but I develop with mono with the "cross platform philosophy"
> on my mind so I tried to partially port my application under windows.
>
> I had very hard time to find all necessary libraries and add-ins for
> mono to correctly use sqlite; on mono website I've found some reference
> (that I publish below) but the references for the "mono.data.sqlite" and
> "mono.data.sqliteclient" are still missing! I'm sure I forgot something so:
>
> 1. Is there any comprehensive document that explain how to install
> things that I need to use SQLite on win?
> 2. Where can I download what I need to use SQLite on mono for windows?
>
> Thank you very much for your precious help.
> Francesco
>
> Interesing but not exahaustive websites:
> http://www.mono-project.com/SQLite
> http://sqlite.phxsoftware.com/
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question about using SQLite3 on Windows Mobile 6+

2010-03-07 Thread Roosevelt Anderson
I'm guessing you are writing this in .NET. If so, you need to use the
sqlite ADO.NET provider found here:

http://sqlite.phxsoftware.com/

On Sun, Mar 7, 2010 at 7:33 PM, Anthony Papillion  wrote:
> Hello Everyone,
>
> I'm totally new to SQLite and am trying to use it in a new Windows Mobile
> application. I've downloaded the SQLite3.dll and went to my project and
> tried to add a reference to the dll. For some reason, when I try to add the
> reference, I am told "A reference to sqlite3.dll could not be added" with no
> further information.
>
> I've been searching Google for a while and can't find a resolution so I'm
> hoping someone can help me out.
>
> Thanks a lot!
> Anthony Papillion
> OpenEMR HQ, Inc.
> www.openemrhq.com
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sqlite from ASP?

2009-07-25 Thread Roosevelt Anderson
Try this...

http://sqlite.phxsoftware.com/

On Sat, Jul 25, 2009 at 11:50 AM, Paul Claessen wrote:
> Greetings,
>
>
>
> Does anyone have any (simple) examples on how to use sqlite from .ASP scripts 
> for me? Or C# code, for that matter?
>
>
>
> ~ Paul Claessen
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite (SQ3) Interfacing with SQL Server 2005 Standard Edition.

2009-06-17 Thread Roosevelt Anderson
I made a simple command line app that exports a MSSQL query to a sqlite
table. This might not be exactly what you need but it should be in the
ballpark. The app and the source can be found here:

http://www.proghack.net/?p=40


On Wed, Jun 17, 2009 at 5:25 AM, David Cawley
wrote:

> Users,
>
>
>
> I have a requirement to have two separate databases, MS SQL Server 2005
> Standard Edition and SQLite (SQ3) interface to avoid duplication of
> certain data.
>
>
>
> The preference of the project is to have the SQL Server 2005 database
> populated and then duplicate and insert data directly into SQLite
> Database. I am thinking the SLQ Server can duplicate data easily using a
> stored procedure.
>
>
>
> Each database is behind its own GUI where the information would be
> viewed.
>
>
>
> Has anybody done anything like this before?
>
>
>
> Please let me know, as I am currently not sure that this is at all
> feasible, whether the story is good or bad.
>
>
>
> Thanks.
>
>
>
> David.
>
>
>
>
> Reliance High-Tech Limited (registered number 2025063)
> is registered in England and Wales and has its registered office at
> Boundary House, Cricketfield Road, Uxbridge, Middlesex UB8 1QG.
>
> This e-mail is confidential and is intended solely for use by the
> individual to whom it is addressed.
> Access to this e-mail by anyone else is unauthorised. If you are not the
> intended recipient, please
> notify us immediately by returning this e-mail to sender or calling +44 (0)
> 20 8391 2200 and delete
> this e-mail and any copies of it from your computer system. Please be
> advised that if you have
> received this mail in error, any use, dissemination, forwarding, printing
> or copying of it is
> strictly prohibited.
>
> Any views or opinions expressed in this e-mail are solely those of the
> author and do not necessarily
> represent those of the company.
>
> Although we operate an active anti-virus policy, the company accepts no
> liability for any damage
> caused by any virus transmitted by this e-mail, including any attachments.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to create a Datatable [first steps of newbie]

2009-01-11 Thread Roosevelt Anderson
http://sqlite.phxsoftware.com/forums/p/532/532.aspx

On Sun, Jan 11, 2009 at 12:18 PM, Alessio Forconi <forco...@gmail.com> wrote:
> It means that the connection that I use in the code that I showed you is
> the same as that used in other parts of the program, only that we do not
> work, I get that bug that I told you.
>
> Thanks for your availability.
>
> Roosevelt Anderson ha scritto:
>> What does your connection string look like?
>>
>> On Fri, Jan 9, 2009 at 2:36 PM, Alessio Forconi <forco...@gmail.com> wrote:
>>
>>> Thanks for your suggestion, I do not think that is the problem because
>>> the connection is the one used with success in other parts of the
>>> program, you show the code that I wrote following your suggestions:
>>>
>>> string sqlString = "SELECT * FROM Proclamatori";
>>> conn = new SQLiteConnection(connString);
>>> try
>>> {
>>> conn.Open();
>>> SQLiteDataAdapter apt = new SQLiteDataAdapter(sqlString, conn);
>>> DataTable dtProclamatori = new DataTable();
>>> apt.Fill(dtProclamatori);
>>> }
>>> catch (SQLiteException ex)
>>> {
>>>  MessageBox.Show(ex.Message);
>>> }
>>> finally
>>> {
>>> conn.Close();
>>>  }
>>>
>>>
>>> I know that there are groups for microsoft c # but that does not seem
>>> like a software applications that are not microsoft: (
>>>
>>> Roosevelt Anderson ha scritto:
>>>
>>>> It should be "Data Source=database.db" not "DataSource=database.db". I
>>>> didn't realize this because of the line break in the email. This will
>>>> create a new, empty database named database.db in the directory where
>>>> your application is running.
>>>>
>>>> On Fri, Jan 9, 2009 at 7:32 AM, Alessio Forconi <forco...@gmail.com> wrote:
>>>>
>>>>
>>>>> Thanks...
>>>>>
>>>>> I get this error
>>>>>
>>>>> "Data Source cannot be empty. Use :memory: to open an in-memory database"
>>>>>
>>>>> but the connection is sattamante the same as that used in other parts of
>>>>> the program
>>>>>
>>>>> Roosevelt Anderson ha scritto:
>>>>>
>>>>>
>>>>>> If you trying to extract data from a sqlite database to a DataTable
>>>>>> here is how you do it using the .Net data provider:
>>>>>>
>>>>>>SQLiteConnection conn = new SQLiteConnection("Data
>>>>>> Source=database.db");
>>>>>> conn.Open();
>>>>>>   SQLiteDataAdapter apt = new SQLiteDataAdapter("select * from 
>>>>>> tbl", conn);
>>>>>> DataTable dt = new DataTable();
>>>>>> apt.Fill(dt);
>>>>>>   conn.Close();
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jan 8, 2009 at 11:28 AM, Alessio Forconi <forco...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hello everyone,
>>>>>>>
>>>>>>> I am making the first steps with the programming and I want to help
>>>>>>> create a DataTable from a database sqlite with C #.
>>>>>>>
>>>>>>> Can you give me an example of how do I create it without using a
>>>>>>> dataset?
>>>>>>>
>>>>>>> Thank you very much for your help.
>>>>>>> ___
>>>>>>> sqlite-users mailing list
>>>>>>> sqlite-users@sqlite.org
>>>>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ___
>>>>>> sqlite-users mailing list
>>>>>> sqlite-users@sqlite.org
>>>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ___
>>>>> sqlite-users mailing list
>>>>> sqlite-users@sqlite.org
>>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>>
>>>>>
>>>>>
>>>> ___
>>>> sqlite-users mailing list
>>>> sqlite-users@sqlite.org
>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>
>>>>
>>>>
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to create a Datatable [first steps of newbie]

2009-01-09 Thread Roosevelt Anderson
What does your connection string look like?

On Fri, Jan 9, 2009 at 2:36 PM, Alessio Forconi <forco...@gmail.com> wrote:
> Thanks for your suggestion, I do not think that is the problem because
> the connection is the one used with success in other parts of the
> program, you show the code that I wrote following your suggestions:
>
> string sqlString = "SELECT * FROM Proclamatori";
> conn = new SQLiteConnection(connString);
> try
> {
> conn.Open();
> SQLiteDataAdapter apt = new SQLiteDataAdapter(sqlString, conn);
> DataTable dtProclamatori = new DataTable();
> apt.Fill(dtProclamatori);
> }
> catch (SQLiteException ex)
> {
>  MessageBox.Show(ex.Message);
> }
> finally
> {
> conn.Close();
>  }
>
>
> I know that there are groups for microsoft c # but that does not seem
> like a software applications that are not microsoft: (
>
> Roosevelt Anderson ha scritto:
>> It should be "Data Source=database.db" not "DataSource=database.db". I
>> didn't realize this because of the line break in the email. This will
>> create a new, empty database named database.db in the directory where
>> your application is running.
>>
>> On Fri, Jan 9, 2009 at 7:32 AM, Alessio Forconi <forco...@gmail.com> wrote:
>>
>>> Thanks...
>>>
>>> I get this error
>>>
>>> "Data Source cannot be empty. Use :memory: to open an in-memory database"
>>>
>>> but the connection is sattamante the same as that used in other parts of
>>> the program
>>>
>>> Roosevelt Anderson ha scritto:
>>>
>>>> If you trying to extract data from a sqlite database to a DataTable
>>>> here is how you do it using the .Net data provider:
>>>>
>>>>SQLiteConnection conn = new SQLiteConnection("Data
>>>> Source=database.db");
>>>> conn.Open();
>>>>   SQLiteDataAdapter apt = new SQLiteDataAdapter("select * from 
>>>> tbl", conn);
>>>> DataTable dt = new DataTable();
>>>> apt.Fill(dt);
>>>>   conn.Close();
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jan 8, 2009 at 11:28 AM, Alessio Forconi <forco...@gmail.com> 
>>>> wrote:
>>>>
>>>>
>>>>> Hello everyone,
>>>>>
>>>>> I am making the first steps with the programming and I want to help
>>>>> create a DataTable from a database sqlite with C #.
>>>>>
>>>>> Can you give me an example of how do I create it without using a
>>>>> dataset?
>>>>>
>>>>> Thank you very much for your help.
>>>>> ___
>>>>> sqlite-users mailing list
>>>>> sqlite-users@sqlite.org
>>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>>
>>>>>
>>>>>
>>>> ___
>>>> sqlite-users mailing list
>>>> sqlite-users@sqlite.org
>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>
>>>>
>>>>
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to create a Datatable [first steps of newbie]

2009-01-09 Thread Roosevelt Anderson
It should be "Data Source=database.db" not "DataSource=database.db". I
didn't realize this because of the line break in the email. This will
create a new, empty database named database.db in the directory where
your application is running.

On Fri, Jan 9, 2009 at 7:32 AM, Alessio Forconi <forco...@gmail.com> wrote:
> Thanks...
>
> I get this error
>
> "Data Source cannot be empty. Use :memory: to open an in-memory database"
>
> but the connection is sattamante the same as that used in other parts of
> the program
>
> Roosevelt Anderson ha scritto:
>> If you trying to extract data from a sqlite database to a DataTable
>> here is how you do it using the .Net data provider:
>>
>>SQLiteConnection conn = new SQLiteConnection("Data
>> Source=database.db");
>> conn.Open();
>>   SQLiteDataAdapter apt = new SQLiteDataAdapter("select * from tbl", 
>> conn);
>> DataTable dt = new DataTable();
>> apt.Fill(dt);
>>   conn.Close();
>>
>>
>>
>>
>> On Thu, Jan 8, 2009 at 11:28 AM, Alessio Forconi <forco...@gmail.com> wrote:
>>
>>> Hello everyone,
>>>
>>> I am making the first steps with the programming and I want to help
>>> create a DataTable from a database sqlite with C #.
>>>
>>> Can you give me an example of how do I create it without using a
>>> dataset?
>>>
>>> Thank you very much for your help.
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to create a Datatable [first steps of newbie]

2009-01-08 Thread Roosevelt Anderson
If you trying to extract data from a sqlite database to a DataTable
here is how you do it using the .Net data provider:

   SQLiteConnection conn = new SQLiteConnection("Data
Source=database.db");
conn.Open();
SQLiteDataAdapter apt = new SQLiteDataAdapter("select * from tbl", 
conn);
DataTable dt = new DataTable();
apt.Fill(dt);
conn.Close();




On Thu, Jan 8, 2009 at 11:28 AM, Alessio Forconi  wrote:
> Hello everyone,
>
> I am making the first steps with the programming and I want to help
> create a DataTable from a database sqlite with C #.
>
> Can you give me an example of how do I create it without using a
> dataset?
>
> Thank you very much for your help.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Creating sqlite.dll and sqliteclient.dll for .net with sqlite version 3-3.6.7

2009-01-05 Thread Roosevelt Anderson
Here is the link to the .Net data provider for sqlite...

http://sqlite.phxsoftware.com/

On Mon, Jan 5, 2009 at 5:39 PM, Dao, Trien (STP)  wrote:
> I am new to sqlite development community.  I need to create or obtain 
> sqlite.dll and sqliteclient.dll for sqlite version 3-3.6.7.  My questions are:
>1) Where do I find the new versions of sqlite.dll and sqliteclient.dll
>2) or where do I get the .NET version source code and where do I find 
> instruction for creating .dll files.
>
> We are currently using sqlite version 2.8.13.  However I have a .NET 
> application that is a multi threads application, with each thread can insert 
> a data row to a sqlite database.  I receive an error from one the the thread 
> that tries to insert data
> {"Attempted to read or write protected memory. This is often an 
> indication that other memory is corrupt."}
>
> My hope is that the new sqlite version can resolve this problem.  Any 
> suggestion would be greatly appreciated.
>
> Trien
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Import Tool

2008-11-13 Thread Roosevelt Anderson
Here is a link to the application and source:

http://www.proghack.net/?p=40

On Wed, Nov 12, 2008 at 3:20 PM, Baskaran Selvaraj <
[EMAIL PROTECTED]> wrote:

>
> Thanks roosevelt. I will try to use the c# command.
>
> > Date: Wed, 12 Nov 2008 15:03:41 -0500> From:
> [EMAIL PROTECTED]> To: sqlite-users@sqlite.org> Subject: Re:
> [sqlite] SQLite Import Tool> > I wrote a simple c# command line program that
> will import data from> MSSQL into a sqlite database. You specify a query
> (for MSSQL), a> connection string, the location of the sqlite database file,
> and a> table in the sqlite database and the app dumps the results of the>
> query into the table. You could easily use it in a batch file to> accomplish
> what you need. If you want the app, I could send it to you.> > On Wed, Nov
> 12, 2008 at 9:45 AM, Baskaran Selvaraj> <[EMAIL PROTECTED]>
> wrote:> >> >> > Hi All,> > This is Baskaran and I am looking for a vendor
> tool to automate the import process.> > We have an application which is
> written to use SQLite database. Right now, I import the data> > into SQLite
> database from SQL Server 2005 manually. Looking for a vendor software, which
> can used> > to automate the process of importing the data from SQL Server
> 2005 to SQLite database> > on a daily basis> > .> > Thanks> > Baskaran
> Selvaraj, DBA> >> >
> _> > See how
> Windows(R) connects the people, information, and fun that are part of your
> life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> >
> ___> > sqlite-users mailing
> list> > sqlite-users@sqlite.org> >
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users> >>
> ___> sqlite-users mailing list>
> sqlite-users@sqlite.org>
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> _
> Windows Live Hotmail now works up to 70% faster.
>
> http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Roosevelt Anderson
I wrote a simple c# command line program that will import data from
MSSQL into a sqlite database. You specify a query (for MSSQL), a
connection string, the location of the sqlite database file, and a
table in the sqlite database and the app dumps the results of the
query into the table. You could easily use it in a batch file to
accomplish what you need. If you want the app, I could send it to you.

On Wed, Nov 12, 2008 at 9:45 AM, Baskaran Selvaraj
<[EMAIL PROTECTED]> wrote:
>
>
> Hi All,
> This is Baskaran and I am looking for a vendor tool to automate the import 
> process.
> We have an application which is written to use SQLite database. Right now, I 
> import the data
> into SQLite database from SQL Server 2005 manually. Looking for a vendor 
> software, which can used
> to automate the process of importing the data from SQL Server 2005 to SQLite 
> database
> on a daily basis
> .
> Thanks
> Baskaran Selvaraj, DBA
>
> _
> See how Windows(R) connects the people, information, and fun that are part of 
> your life
> http://clk.atdmt.com/MRT/go/119463819/direct/01/
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] New to SQlite

2008-09-25 Thread Roosevelt Anderson
If you are using the ADO.NET 2.0 provider from
http://sqlite.phxsoftware.com/, then it won't work with Visual Studio
2003. This is because Visual Studio 2003 uses .Net 1.1 not .Net 2.0.
If you wish to use the phxsoftware data provider try downloading
Visual Studio Express 2005 or 2008 from Microsoft, they are both free.

http://www.microsoft.com/express/product/default.aspx

On Thu, Sep 25, 2008 at 9:42 AM, Plopes <[EMAIL PROTECTED]> wrote:
> I am new to SQlite and just migrated to vb.net from vb6
>
> I cant find a step by step tutorial on how to add sqlite to vb.net
>
> i downloaded the sqlite wrapper but on the sqlite designer installation screen
> an option should show "Visual Studio 2003"
> i get a blank screen
>
> so i am not sure how to proceed
>
> is it because i have version 2003 of visual studio?
>
> Please help
>
> Thank you
>
> Paulo Lopes
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Table Adapter Update Question

2008-06-25 Thread Roosevelt Anderson
Try using this library

http://sqlite.phxsoftware.com/

It a complete ADO.NET 2 implementation and it should support the update.

On Wed, Jun 25, 2008 at 5:14 PM, Richard W. Kulp <[EMAIL PROTECTED]>
wrote:

> I am trying to convert a VB 2005 program from a SQLExpress database to
> SQLite 3. I have been successful up to the following line of code:
>
> Me.Dbo_UsersTableAdapter.Update(Me.TSEPWin5UserSQLiteDB.dbo_Users)
>
> It seems that the DboTableAdapter does not support the Update command.
>  What
> is the preferred way to update a dataset created from a SQLite db? I am
> using CoreLab's dotConnect SQLite data provider. Another consideration is
> that my ultimate goal is to move from Visual Studio to MonoDevelop.
>
> Thanks.
>
> Dick
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Roosevelt Anderson
Good point Kees. I forgot about the serialize(). I don't used it because I
use my sqlite db with PHP, .NET and VB6. But if the project is going to PHP
only serialize() is the way to go.

On Wed, Mar 12, 2008 at 2:38 PM, Kees Nuyt <[EMAIL PROTECTED]> wrote:

> On Wed, 12 Mar 2008 09:10:44 -0400, you wrote:
>
> >Here is a link to the PHP code to generate the base64 string and to
> convert
> >the string back to an image.
> >
> >http://fundisom.com/phparadise/php/image_handling/base64_image_encode
> >
>
> In PHP it might be better to serialize().
> That works for every value type.
> Just my 0.02
> --
>  (  Kees Nuyt
>  )
> c[_]
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Roosevelt Anderson
Here is a link to the PHP code to generate the base64 string and to convert
the string back to an image.

http://fundisom.com/phparadise/php/image_handling/base64_image_encode



On Wed, Mar 12, 2008 at 8:56 AM, <[EMAIL PROTECTED]> wrote:

> I am not actually dealing with images, but normal
> text and integer data.
> Got one reply now from RAC, so will see what comes from it.
>
> RBS
>
>
>
> > The easiest way to store an image would be to first convert the image to
> > base64 and store the base64 text to the database. Converting data to
> > base64
> > takes up about 33% more space than the original data.
> >
> > On Tue, Mar 11, 2008 at 6:22 PM, RB Smissaert <
> > [EMAIL PROTECTED]> wrote:
> >
> >> Funny you ask that as just 2 days ago I posted a little project
> >> on RAC to do exactly this. In my case it has to be called from
> >> VBA or VB. Unfortunately and surprisingly no takers yet.
> >>
> >> RBS
> >>
> >>
> >> -Original Message-
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On Behalf Of Robert L Cochran
> >> Sent: 11 March 2008 21:15
> >> To: General Discussion of SQLite Database
> >> Subject: [sqlite] PHP Code That Can Store and Retrieve Images
> >>
> >> Is there open source PHP code (PHP 5.x compatible) that can store and
> >> retrieve images from an SQLite 3.5.6 database?
> >>
> >> For SQLite version 3.5.x, I need to use the PHP PDO functions if I am
> >> using PHP 5.2.5, right?
> >>
> >> I want to show a group of people about 45 photos which I would like to
> >> store on an SQLite database and then retrieve.
> >>
> >> Thanks
> >>
> >> Bob Cochran
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users@sqlite.org
> >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >>
> >>
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users@sqlite.org
> >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >>
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Roosevelt Anderson
The easiest way to store an image would be to first convert the image to
base64 and store the base64 text to the database. Converting data to base64
takes up about 33% more space than the original data.

On Tue, Mar 11, 2008 at 6:22 PM, RB Smissaert <
[EMAIL PROTECTED]> wrote:

> Funny you ask that as just 2 days ago I posted a little project
> on RAC to do exactly this. In my case it has to be called from
> VBA or VB. Unfortunately and surprisingly no takers yet.
>
> RBS
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Robert L Cochran
> Sent: 11 March 2008 21:15
> To: General Discussion of SQLite Database
> Subject: [sqlite] PHP Code That Can Store and Retrieve Images
>
> Is there open source PHP code (PHP 5.x compatible) that can store and
> retrieve images from an SQLite 3.5.6 database?
>
> For SQLite version 3.5.x, I need to use the PHP PDO functions if I am
> using PHP 5.2.5, right?
>
> I want to show a group of people about 45 photos which I would like to
> store on an SQLite database and then retrieve.
>
> Thanks
>
> Bob Cochran
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling C program to use the shared library

2008-02-24 Thread Roosevelt Anderson
To use the dll you need to use the LoadLibrary windows function and define
pointers to each of the sqlite functions. Here is a short example to get you
started. For more on using DLLs try this MSDN link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/dynamic_link_library_functions.asp


#include 
#include 
#include 

using namespace std;

#define SQLITE_OK   0   /* Successful result */
#define SQLITE_ERROR1   /* SQL error or missing database */
#define SQLITE_INTERNAL 2   /* NOT USED. Internal logic error in SQLite
*/
#define SQLITE_PERM 3   /* Access permission denied */
#define SQLITE_ABORT4   /* Callback routine requested an abort */
#define SQLITE_BUSY 5   /* The database file is locked */
#define SQLITE_LOCKED   6   /* A table in the database is locked */
#define SQLITE_NOMEM7   /* A malloc() failed */
#define SQLITE_READONLY 8   /* Attempt to write a readonly database */
#define SQLITE_INTERRUPT9   /* Operation terminated by
sqlite3_interrupt()*/
#define SQLITE_IOERR   10   /* Some kind of disk I/O error occurred */
#define SQLITE_CORRUPT 11   /* The database disk image is malformed */
#define SQLITE_NOTFOUND12   /* NOT USED. Table or record not found */
#define SQLITE_FULL13   /* Insertion failed because database is full
*/
#define SQLITE_CANTOPEN14   /* Unable to open the database file */
#define SQLITE_PROTOCOL15   /* Database lock protocol error */
#define SQLITE_EMPTY   16   /* Database is empty */
#define SQLITE_SCHEMA  17   /* The database schema changed */
#define SQLITE_TOOBIG  18   /* NOT USED. Too much data for one row */
#define SQLITE_CONSTRAINT  19   /* Abort due to contraint violation */
#define SQLITE_MISMATCH20   /* Data type mismatch */
#define SQLITE_MISUSE  21   /* Library used incorrectly */
#define SQLITE_NOLFS   22   /* Uses OS features not supported on host */
#define SQLITE_AUTH23   /* Authorization denied */
#define SQLITE_FORMAT  24   /* Auxiliary database format error */
#define SQLITE_RANGE   25   /* 2nd parameter to sqlite3_bind out of
range */
#define SQLITE_NOTADB  26   /* File opened that is not a database file
*/
#define SQLITE_ROW 100  /* sqlite3_step() has another row ready */
#define SQLITE_DONE101  /* sqlite3_step() has finished executing */


typedef struct sqlite3 sqlite3;
typedef int (*sqlite_open)(const char*, sqlite3**);
typedef int (*sqlite_close)(sqlite3*);
typedef int (*sqlite_exec)(sqlite3*,char*, int
(*callback)(void*,int,char**,char**),void *, char**);

string filename = "sqlite3.dll";

int main(int argc, char *argv[])
{

HMODULE myDll;
myDll = LoadLibrary(filename.c_str());
if (myDll != NULL)
{
  char *zErrMsg = 0;
  sqlite3 *db;
  cout << "Loaded " << filename << endl;
  sqlite_open sqlite3_open;
  sqlite_close sqlite3_close;
  sqlite_exec sqlite3_exec;
  sqlite3_open =
(sqlite_open)GetProcAddress(myDll,"sqlite3_open");
  sqlite3_close =
(sqlite_close)GetProcAddress(myDll,"sqlite3_close");
  sqlite3_exec =
(sqlite_exec)GetProcAddress(myDll,"sqlite3_exec");
  int i = sqlite3_open("test.db",);
  cout << "Open Status : " << i << endl;
  i = sqlite3_exec(db, "Create Table test(a int, b int)", NULL,
0, NULL);
  i = sqlite3_close(db);
  cout << "Close Status : " << i << endl;
  FreeLibrary(myDll);
}
else
{
  cout << "Failed to Load " << filename << endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}




On Sun, Feb 24, 2008 at 8:48 PM, Fin Springs <[EMAIL PROTECTED]>
wrote:

>
> On Feb 23, 2008, at 9:15 PM, Sam Carleton scarleton-at-
> miltonstreet.com |sqlite| wrote:
>
> > How do I compile a C program to use the shared DLL rather then
> > statically link in SQLite?
> Good question; the DLL download only has the DEF file and the DLL, but
> you normally need an export LIB file to link against. You do an
> explicit LoadLibrary I suppose, and use GetProcAddress calls to get
> the function pointers.
>
> Alternatively, you could just use the amalgamation version: it's
> one .h and one .c, and you'll need the .h even if you do use the DLL
> (unless you want to extern everything). It will also make your
> debugging easier, since you'll be able to step into the sqlite code.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users