Re: [sqlite] Bug: PRAGMA busy_timeout outputs the value, screws up html

2014-01-21 Thread david

Kees Nuyt  writes:

> 
> On Tue, 24 Dec 2013 22:55:32 -0500, dmitry babitsky
>  wrote:
> 
> >*bug description:*
> >Using PRAGMA busy_timeout outputs the value which in case of html output
> >screws up the display.
> >To be more precise, it creates an extra row/recordset with the timeout
> >value, which is what then shows on the html page.
> >
> >There should be a way to say "set the pragma, but don't output it".
> >It is especially important for -html mode which is designed for end-user
> >consumption.
> >What's more, it's very difficult to grep away as you can see.
> >
> >*To replicate:*
> >
> >echo "create table foo as select 1  as c;select * from foo;" |sqlite -
html
> >-header -cmd "PRAGMA busy_timeout =1000;" :memory:
> >*timeout*
> >**
> >*1000*
> >**
> >c
> >
> >1
> >
> 
> Although it would be nice to have that PRAGMA output suppressed, there is 
an easy workaround
> (oneliner wrapped by mail) :
> 
> printf ".output stderr\nPRAGMA busy_timeout =1000;\n.output stdout\ncreate 
table foo as select 1 as
> c;select * from foo;" |sqlite3 2>/dev/null -html -header :memory:
> 
> yields:
> 
> c
> 
> 1
> 
> 

Kees,
Thanks for the idea, however I cannot use it.
It works for you because you have 2>/dev/null
But this also discards every error message that sqlite may throw, which I 
prefer to receive. For that reason, my code has 2>&1, which nullifies your 
workaround.
Any other ideas short of across-the-newline grepping out unwanted output?



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


Re: [sqlite] Significant Performance Problem with System.Data.SQLite.

2014-01-21 Thread Joe Mistachkin

Ed Tenholder wrote:
>
> I have never used a profiling tool.  Have VS 2010 installed.
>

Depending on which edition of Visual Studio 2010 is installed, you may be
able
to simply use their managed code profiling tools.  Thankfully, these tools
are
fairly straightforward to use and produce nice results.

Other than that, I'm not sure which profiler I would recommend for managed
code.

--
Joe Mistachkin

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


[sqlite] Significant Performance Problem with System.Data.SQLite.

2014-01-21 Thread Ed Tenholder
I have never used a profiling tool.  Have VS 2010 installed.

A quick web search shows several available free tools.  What do you
recommend for VS 2010 and SQLite?



Are you able to run the application with profiling enabled to determine
which
SQL queries and/or System.Data.SQLite methods are running slowly?

This information, if available, would be extremely helpful in tracking down
the root cause of the slowdown you are observing.


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


Re: [sqlite] Sqlie from c#: encoding bug?

2014-01-21 Thread Johnny
Dear Pepijn,
thank you very much for your answer, you are saying a lot of right things.
I believe that your most important suggestion is to use the hex function.
I didn't know this sqlite command andI I will try it soon.

In the meantime I solved my problem Jand I wrote a post also here: 
 http://stackoverflow.com/questions/21219600/sqlite-encoding-from-net
If you are also a SO user and you want to reply there, I'll be happy to mark
this as answered.
case
Note that initially I started addind those encoding lines in c# ... And
finally I realised that 
the problem was not there :-)

I suspect that for the sqlite mailinglist it is offtopic adding a comment
about sqliteadmin showing text in ansi and not in unicode...
In any  case also the sqlite3 is showing text against windows codepage
cmd... :-)
Had I used the select hex, maybe I  would have easily understood that my
vanilla c# string insert was correctly writing 
a utf-8 sequence of c2 a0 to represent the non breaking space



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Sqlie-from-c-encoding-bug-tp73339p73371.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite error

2014-01-21 Thread d b
I didn't set any timeout value.

It was fine with delete/insert/update/select queries. Suddenly, started
giving sqlite error with error code 1.


On Tue, Jan 21, 2014 at 9:03 AM, d b  wrote:

> Hi all,
>
>   sqlite throws error code 1 while sqlite busy with read/write operations.
> what could be the reason. But, I could not reproduce this with test
> program. what is the best way to handle sqlite error. Is it like sqlite
> abort case?
>
> Thanks,
> d b
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite error

2014-01-21 Thread Simon Slavin

On 21 Jan 2014, at 5:03am, d b  wrote:

>  sqlite throws error code 1 while sqlite busy with read/write operations.
> what could be the reason. But, I could not reproduce this with test
> program. what is the best way to handle sqlite error. Is it like sqlite
> abort case?

I don't think SQLite can throw error code 1.  A program that uses it can, but 
not SQLite itself.  So what are you actually seeing ?  And are you setting an 
appropriate SQLite timeout value ?

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