Re: [sqlite] C++ Sample Code

2011-05-21 Thread Amy and Steve
Don,

I think Simon answered your question.  To back up Simon's statements 
below, the C functions shown at ../quickstart.html are compiled nicely 
by any C++ compiler.  I use Codegear C++ Builder and the amalgemation 
compiles without a single error or warning (I am impressed).  SPEAKING 
of C++ compilers, the biggest trick is supplying a callback function to 
sqlite3_exec() WITHIN a class.  I know of one example found at 
www.bcbjournal.org.

Steve.

On 5/15/2011 10:08 AM, Simon Slavin wrote:
> On 15 May 2011, at 3:58pm, Don Ireland wrote:
>
>> I never said I need C++ not C. I asked for sample code for use in C++. If C 
>> code will work just fine then sample C code would be fine and dandy with me.
> See the end of
>
> http://www.sqlite.org/quickstart.html
>
> after that, Google on 'sqlite c sample code'.
>
> 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++ Sample Code

2011-05-15 Thread Don Ireland
There a BUNCH of SQLite objects shown when I look through the object browser.  
I was hoping to find samples for using those.

But I can figure out how to use the code from the link.

Don Ireland

-Original Message-
From: Simon Slavin <slav...@bigfraud.org>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Sun, 15 May 2011 10:08 AM
Subject: Re: [sqlite] C++ Sample Code


On 15 May 2011, at 3:58pm, Don Ireland wrote:

> I never said I need C++ not C. I asked for sample code for use in C++. If C 
> code will work just fine then sample C code would be fine and dandy with me.

See the end of

http://www.sqlite.org/quickstart.html

after that, Google on 'sqlite c sample code'.

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++ Sample Code

2011-05-15 Thread Simon Slavin

On 15 May 2011, at 3:58pm, Don Ireland wrote:

> I never said I need C++ not C. I asked for sample code for use in C++. If C 
> code will work just fine then sample C code would be fine and dandy with me.

See the end of

http://www.sqlite.org/quickstart.html

after that, Google on 'sqlite c sample code'.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] C++ Sample Code

2011-05-15 Thread Don Ireland
I never said I need C++ not C. I asked for sample code for use in C++. If C 
code will work just fine then sample C code would be fine and dandy with me.

I've already been reading through the docs you pointed me to.  But it's kinda 
hard to wrap my head around--they even start out warning that it's hard to read.

Don Ireland

-Original Message-
From: "Afriza N. Arief" <afriza@gmail.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Sun, 15 May 2011 5:10 AM
Subject: Re: [sqlite] C++ Sample Code

The official programming API is in C and Tcl.

If you want C++ API, you need to use 3rd party wrappers or write your own.

To use C API, go to "SQLite Programming Interfaces" section at
http://sqlite.org/docs.html
On May 15, 2011 5:39 PM, "Don Ireland" <sql...@donireland.com> wrote:
>
> Thanks for taking the time to respond.  But I'd prefer to learn to use
SQLite.  If I use one of these wrappers, I have to depend on someone to
maintain it anytime SQLite is updated.  And from what I can tell, the last
update to the wrapper code was I n 2007.
>

The official programming API is in C and Tcl.

If you want C++ API, you need to use 3rd party wrappers or write your own.

To use C or Tcl API, go to "SQLite Programming Interfaces" section at
http://sqlite.org/docs.html

If you want C++/CLI API, refer to Microsoft ADO.NET API or Entity Framework.

Regards

Afriza N. Arief
___
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++ Sample Code

2011-05-15 Thread Don Ireland
Not off topic, but i'm confused about why you explicitly need C++ for that."

I never said I need C++ not C. I asked for sample code for use in C++. If C 
code will work just fine then sample C code would be fine and dandy with me.


Don Ireland

-Original Message-
From: Stephan Beal <sgb...@googlemail.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Sun, 15 May 2011 5:12 AM
Subject: Re: [sqlite] C++ Sample Code

On Sun, May 15, 2011 at 11:39 AM, Don Ireland <sql...@donireland.com> wrote:

> Thanks for taking the time to respond.  But I'd prefer to learn to use
> SQLite.


Then use sqlite's API. Why require C++? sqlite's API can be used just fine
from C++ programs.


>  If I use one of these wrappers, I have to depend on someone to maintain it
> anytime SQLite is updated.  And from what I can tell, the last update to the
> wrapper code was I n 2007.
>

If it ain't broken, don't fix it :).


> Just as an example, I'm currently looking for a sample that explains
> iterating through selected data.

But next it could be a diff topic.
>

Not off topic, but i'm confused about why you explicitly need C++ for that.

Surprisingly (to me), despite sqlite3's being in every device on the planet
nowadays, it is remarkably difficult to find useful sample code. Here's one
i finally dug up which chows how to iterate over a result set:

http://www.sqlite.org/cvstrac/wiki?p=SimpleCode

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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++ Sample Code

2011-05-15 Thread Sylvain Pointeau
I wrote one wrapper, that can be compiled, like sqlite3, in your C++
program.
It doesn't rely on any third library except sqlite3.
The update of sqlite3 is just done by replacing the amalgamation files.

https://gitorious.org/sylisa-dblite/sylisa-dblite

It uses the syntax borrowed from soci++, very convenient for the code
readability.

best regards,
Sylvain
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] C++ Sample Code

2011-05-15 Thread Stephan Beal
On Sun, May 15, 2011 at 11:39 AM, Don Ireland  wrote:

> Thanks for taking the time to respond.  But I'd prefer to learn to use
> SQLite.


Then use sqlite's API. Why require C++? sqlite's API can be used just fine
from C++ programs.


>  If I use one of these wrappers, I have to depend on someone to maintain it
> anytime SQLite is updated.  And from what I can tell, the last update to the
> wrapper code was I n 2007.
>

If it ain't broken, don't fix it :).


> Just as an example, I'm currently looking for a sample that explains
> iterating through selected data.

But next it could be a diff topic.
>

Not off topic, but i'm confused about why you explicitly need C++ for that.

Surprisingly (to me), despite sqlite3's being in every device on the planet
nowadays, it is remarkably difficult to find useful sample code. Here's one
i finally dug up which chows how to iterate over a result set:

http://www.sqlite.org/cvstrac/wiki?p=SimpleCode

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] C++ Sample Code

2011-05-15 Thread Afriza N. Arief
The official programming API is in C and Tcl.

If you want C++ API, you need to use 3rd party wrappers or write your own.

To use C API, go to "SQLite Programming Interfaces" section at
http://sqlite.org/docs.html
On May 15, 2011 5:39 PM, "Don Ireland"  wrote:
>
> Thanks for taking the time to respond.  But I'd prefer to learn to use
SQLite.  If I use one of these wrappers, I have to depend on someone to
maintain it anytime SQLite is updated.  And from what I can tell, the last
update to the wrapper code was I n 2007.
>

The official programming API is in C and Tcl.

If you want C++ API, you need to use 3rd party wrappers or write your own.

To use C or Tcl API, go to "SQLite Programming Interfaces" section at
http://sqlite.org/docs.html

If you want C++/CLI API, refer to Microsoft ADO.NET API or Entity Framework.

Regards

Afriza N. Arief
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] C++ Sample Code

2011-05-15 Thread Don Ireland
Thanks for taking the time to respond.  But I'd prefer to learn to use SQLite.  
If I use one of these wrappers, I have to depend on someone to maintain it 
anytime SQLite is updated.  And from what I can tell, the last update to the 
wrapper code was I n 2007.

Just as an example, I'm currently looking for a sample that explains iterating 
through selected data.

But next it could be a diff topic.

Don Ireland

-Original Message-
From: Stephan Beal <sgb...@googlemail.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Sun, 15 May 2011 4:01 AM
Subject: Re: [sqlite] C++ Sample Code

On Sun, May 15, 2011 at 4:24 AM, Don Ireland <sql...@donireland.com> wrote:

> Can anyone suggest a good source for sample C++ code?  I really would
> rather not come here and ask for every little thing--I'd learn it better
> this way.
>

There are 3 different C++ wrappers here:

http://fossil.wanderinghorse.net/repos/sqlite-stuff/

<http://fossil.wanderinghorse.net/repos/sqlite-stuff/>two for "normal" C++
and one for WinCE (it might also work on other Windows versions).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
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++ Sample Code

2011-05-15 Thread Stephan Beal
On Sun, May 15, 2011 at 4:24 AM, Don Ireland  wrote:

> Can anyone suggest a good source for sample C++ code?  I really would
> rather not come here and ask for every little thing--I'd learn it better
> this way.
>

There are 3 different C++ wrappers here:

http://fossil.wanderinghorse.net/repos/sqlite-stuff/

two for "normal" C++
and one for WinCE (it might also work on other Windows versions).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users