Re: [sqlite] I'm sure I'm missing something.

2012-01-29 Thread Matt Young
// The cmd string direct output to result // Execute the command, then open result and read #include #include #include void main() { FILE *f; char buff[100]; const char * query = "select 'hello Sqlite3';"; const char * cmd = "sqlite3 test.db < name > result"; f = fopen("name", "w+"); if(f==0)

Re: [sqlite] I'm sure I'm missing something.

2012-01-29 Thread Chris Peachment
The select statement needs an 's' on 'motorcycle' to match the table definition. Or you can remove the 's' in the create statement. On Sun, 2012-01-29 at 20:03 -0400, Chris Peachment wrote: > SqlText = "select description from motorcycle " > " where model like :model"; >

Re: [sqlite] I'm sure I'm missing something.

2012-01-29 Thread Chris Peachment
I don't usually do other people's homework but it's Sunday night so why not be generous? At the terminal command line type: sqlite3 motorcycles.db At the resulting sqlite3 command line type: create table motorcycles ( model text; description text ); insert into motorcycles values ('

Re: [sqlite] I'm sure I'm missing something.

2012-01-29 Thread Larry Brasfield
Bruce Steele wrote: I’m a very new “C” programmer working on a program < to look up information from a SQLite created data < base. The data base is made up of information on < models of Harley Davidson motorcycles. I want to < do a search of the data base using input from the < “user”. For insta

[sqlite] I'm sure I'm missing something.

2012-01-29 Thread Bruce Steele
I’m a very new “C” programmer working on a program to look up information from a SQLite created data base. The data base is made up of information on models of Harley Davidson motorcycles. I want to do a search of the data base using input from the “user”. For instance the user wants to know wha

Re: [sqlite] Database is Locked

2012-01-29 Thread Kees Nuyt
On Sun, 29 Jan 2012 17:11:35 +0200, Shahar Weinstein wrote: >hi, > >thanks for your intention. but it's a shared hosting. I do not have a >remote desktop access that allows me >to run any application I desire. and besides that there is no need to >monitor processes. Many of the sysinternal tools

Re: [sqlite] What is the definition/use/point with the xShm* procedures in sqlite3_io_methods, and what's the benefit of using WAL with those rather than the global file locking option?

2012-01-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 29/01/12 07:44, Mikael wrote: > Can you please clarify what the xShm* VFS operations are supposed to > do: xShmMap, xShmLock and SQLITE_SHM_NLOCK, xShmBarrier and xShmUnmap. Have you tried reading the source? Look for unixShmMap/winShmMap and that

Re: [sqlite] Database is Locked

2012-01-29 Thread Simon Slavin
On 29 Jan 2012, at 4:14pm, Shahar Weinstein wrote: > no, its an ordinary website. > the situation is simple. I'm trying to save into the database some data > taken from a web form with one simple, > update query. the database is being opened and then immidietly being closed. So you do execute sq

Re: [sqlite] Database is Locked

2012-01-29 Thread Shahar Weinstein
no, its an ordinary website. the situation is simple. I'm trying to save into the database some data taken from a web form with one simple, update query. the database is being opened and then immidietly being closed. as I mentioned before. the problem appears. and than stays for seconds,minutes or

Re: [sqlite] Database is Locked

2012-01-29 Thread Simon Slavin
On 29 Jan 2012, at 3:11pm, Shahar Weinstein wrote: > the sqlite database I'm using is failing to > serve one update from one process. > and this problem comes and goes, and when it comes, it stays for some time. Is this for a web-facing service ? In other words, someone looks up a page on a we

Re: [sqlite] What is the definition/use/point with the xShm* procedures in sqlite3_io_methods, and what's the benefit of using WAL with those rather than the global file locking option?

2012-01-29 Thread Mikael
Hi, thanks for the response. I'm still unclear though. Can you please clarify what the xShm* VFS operations are supposed to do: xShmMap, xShmLock and SQLITE_SHM_NLOCK, xShmBarrier and xShmUnmap. I'd suppose Sqlite uses the latter three as functional equivalent to mutexes to guarantee state/data co

Re: [sqlite] Database is Locked

2012-01-29 Thread Shahar Weinstein
hi, thanks for your intention. but it's a shared hosting. I do not have a remote desktop access that allows me to run any application I desire. and besides that there is no need to monitor processes. the situation is quite simple, the sqlite database I'm using is failing to serve one update from o

Re: [sqlite] Database is Locked

2012-01-29 Thread Black, Michael (IS)
Try this then: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems From: sqlite-users-boun...@sqlite.o

Re: [sqlite] Database is Locked

2012-01-29 Thread Shahar Weinstein
thanks for the reply. but, I'm using a shared hosting running Windows. so, no shell no fuser. Shahar. 2012/1/29 Black, Michael (IS) > Do you have shell access I hope? > > > > Check out "fuser" and see if you can find a process attached to it. > > > > Michael D. Black > > Senior Scientist > >

Re: [sqlite] Database is Locked

2012-01-29 Thread Black, Michael (IS)
Do you have shell access I hope? Check out "fuser" and see if you can find a process attached to it. Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems From: sqlit

Re: [sqlite] Database is Locked

2012-01-29 Thread Shahar Weinstein
thanks for the reply but its not a permission issue, since after few hours the problem dissapears and there is no problem to save data into the database. the problem comes, stays for few hours and than disappears. it's very strange since on my development machine it does not happen. Shahar. 20

Re: [sqlite] Database is Locked

2012-01-29 Thread Stephen C
Is the hosting company running linux or windows? You say .net so that indicates to me windows, but I've been wrong before. (Wife lets me know frequently. {smirk}) This still "smells" like a permission issue to me. I acknowledge that you're able to read/write/modify the web files then upload

Re: [sqlite] Database is Locked

2012-01-29 Thread Shahar Weinstein
thanks for your reply. since my situation IS one process that tries to write to the database, I'm trying to use the forums help. if the situation was multiple processes as you described I would move to mysql or MSaccess database which is quite stable for web applications. I've programmed few web pr

Re: [sqlite] Database is Locked

2012-01-29 Thread Jan Hudec
On Sun, Jan 29, 2012 at 12:57:21 +0200, Shahar Weinstein wrote: > I don't think that the TMP folder is the right direction but I'll check it > anyway with the hosting company. No, *NOT* *HOSTING* *COMPANY*. Your code. I agree it's probably not the right direction though. > besides that, I do kno

Re: [sqlite] Database is Locked

2012-01-29 Thread Shahar Weinstein
I don't think that the TMP folder is the right direction but I'll check it anyway with the hosting company. besides that, I do know that there is only one process running that tries to write to the database what makes my situation a sad joke. sqlite supposed to be a strong database that knows how t