Please let me know if you have anyone that handles these on a commercial basis.

Scott Howard
Kivel & Howard LLP
P.O. Box 40044
Portland, Oregon. 97240-0044
T. 503-796-0909
F. 503-802-4757

DO NOT read, copy or disseminate this communication unless you are the intended 
addressee. This email communication contains confidential and/or privileged 
information intended only for the addressee. If you have received this 
communication in error, please call us immediately at 503-796-0909 and ask to 
speak to the sender of this message. Also, please email the sender and notify 
the sender immediately that you have received the communication in error.



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Wednesday, December 20, 2017 12:00 PM
To: [email protected]
Subject: PLUG Digest, Vol 159, Issue 50

Send PLUG mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.pdxlinux.org/mailman/listinfo/plug
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of PLUG digest..."


Today's Topics:

   1. Re: SQLITE 3 C... (Tomas Kuchta)


----------------------------------------------------------------------

Message: 1
Date: Tue, 19 Dec 2017 13:41:06 -0800
From: Tomas Kuchta <[email protected]>
To: "Portland Linux/Unix Group" <[email protected]>
Subject: Re: [PLUG] SQLITE 3 C...
Message-ID:
        <CAPnCT8gP0jd3PL3RMpH=7gihd2u1pke9nc12pm9856fc+ie...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

You either need to close and reopen the SQL DB or pass around the handle to it, 
so that you can access it outside the scope of a function - main in your case.

Tomas

On Dec 19, 2017 10:24 AM, "michael" <[email protected]> wrote:

> I have no understanding of what the callback function is for.
>
> I have converted a text file to a sqlite3 file successfully in C.  
> Problem is, I had to do all the sqlite3 stuff in main.  I want to 
> create the database and write out the file in a separate function.  
> Further, I want to read the database and update a local data structure 
> in a separate C function so that main can be short.
>
> Another problem, what is the callback function for?
> ...
> char * err_msg;
> char * sql = (char *)calloc(72,sizeof(char *)); sprintf(sql,("INSERT 
> INTO Steadyshot VALUES(%d,\"%s\",\"%s\");",ski 
> p_settings,token[0],token[1]); int return_code = 
> sqlite3_exec(db,sql,0,0,&err_msg);
> free(sql);
> ...
>
> Note in sqlite3_exec that the third or fourth argument can be used to 
> indicate a callback function.
>
> I don't want to store the contents of the sqlite3 database file in a 
> global data structure, but can I store it in a local data structure 
> from a callback function?
>
> My goal is to abandon having a text file and just store the settings 
> in a
> sqlite3 file.  This is
> the straightforward way to share settings between a C program and Apache.
>
> I could also use pointers on how to read the database in PHP from the 
> Apache side and where the database file should be on the Linux 
> filesystem.
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>


------------------------------

_______________________________________________
PLUG: http://pdxlinux.org
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug


End of PLUG Digest, Vol 159, Issue 50
*************************************
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to