Re: [sqlite] Question about C# with SQLite

2016-07-04 Thread dandl
Did you mean: SQLite.Intero.dll or SQLite.Interop.dll? Did you put it in the right place? Also consider the question of 32 vs 64 bit. Did you try Stack Overflow? There are lots of hits over there. Regards David M Bennett FACS Andl - A New Database Language - andl.org > -Original

Re: [sqlite] Question about C# with SQLite

2016-07-04 Thread J Decker
if it was built with debug mode; probably the debug runtime doesn't exist there. Otherwise it's because the visual studio runtime required isn't available. On Mon, Jul 4, 2016 at 6:52 AM, Shouwei Li wrote: > Hi there, > > I have a project developed with .net 2015 and C#. I

[sqlite] Question about C# with SQLite

2016-07-04 Thread Shouwei Li
Hi there, I have a project developed with .net 2015 and C#. I use SQLite as the server-less database. It works very well in my workstation. But it can not run on other PC. The error indicates: Unable to load DLL "SQLite.Intero.dll": The specified module could not be found. I already attach this

Re: [sqlite] Different error messages for the same syntax error

2016-07-04 Thread R Smith
Please ignore the previous reply, I see your concern is not the error message but indeed the difference in messages for what seems to be a similar error (knowingly so). On 2016/07/04 8:21 PM, gwenn wrote: Hello, SQLite version 3.13.0 2016-05-18 10:57:30 sqlite> create table test (name text

Re: [sqlite] Different error messages for the same syntax error

2016-07-04 Thread R Smith
On 2016/07/04 8:21 PM, gwenn wrote: Hello, SQLite version 3.13.0 2016-05-18 10:57:30 sqlite> create table test (name text default ''); sqlite> insert into test values (); Error: near ")": syntax error sqlite> insert into test values (''), (); Error: no tables specified The documentation is

Re: [sqlite] Different error messages for the same syntax error

2016-07-04 Thread Stephen Chrzanowski
insert into table test defaults; On Mon, Jul 4, 2016 at 2:21 PM, gwenn wrote: > Hello, > > SQLite version 3.13.0 2016-05-18 10:57:30 > sqlite> create table test (name text default ''); > sqlite> insert into test values (); > Error: near ")": syntax error > sqlite> insert

[sqlite] Different error messages for the same syntax error

2016-07-04 Thread gwenn
Hello, SQLite version 3.13.0 2016-05-18 10:57:30 sqlite> create table test (name text default ''); sqlite> insert into test values (); Error: near ")": syntax error sqlite> insert into test values (''), (); Error: no tables specified Maybe the parser rule is too permissive: values(A) ::=

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Dominique Devienne
On Mon, Jul 4, 2016 at 1:18 PM, R Smith wrote: > On 2016/07/04 1:13 PM, Dominique Devienne wrote: > >> On Mon, Jul 4, 2016 at 12:08 PM, Hick Gunter wrote: >> >>> A simple UPDATE set = where will >>> translate into about 40 instructions; adding your

Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-04 Thread Simon Slavin
On 4 Jul 2016, at 12:07pm, R Smith wrote: > I prefer how Lazarus/Delphi does it (wrt the Pascal variant options as > opposed to C++) where a string is a record with first the encoding, the > length and then the actual bytes given. What Ryan said. Note that

Re: [sqlite] retrieve by name or index

2016-07-04 Thread R Smith
On 2016/07/04 12:22 PM, Jim Wang wrote: hi,all There is a table include id,string1,string2 and so on. So I want to get the value of string1 from a record, there are two methods: 1. get by the name of the string2 2. get by the index of the string2, the index is 2 which

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread R Smith
On 2016/07/04 1:13 PM, Dominique Devienne wrote: On Mon, Jul 4, 2016 at 12:08 PM, Hick Gunter wrote: A simple UPDATE set = where will translate into about 40 instructions; adding your trigger adds an additional estimated 400 instructions of trigger program. But the

Re: [sqlite] retrieve by name or index

2016-07-04 Thread Simon Slavin
On 4 Jul 2016, at 11:22am, Jim Wang <2004wqg2...@163.com> wrote: >There is a table include id,string1,string2 and so on. >So I want to get the value of string1 from a record, there are two methods: >1. get by the name of the string2 >2. get by the index of the string2, the

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Dominique Devienne
On Mon, Jul 4, 2016 at 12:08 PM, Hick Gunter wrote: > Creating a trigger causes SQLite to insert a row into the sqlite_master > table which contains the text you supply for the trigger. No code is > generated at this time. You can verify this by creating a trigger that >

Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-04 Thread R Smith
On 2016/07/04 10:22 AM, Rob Golsteijn wrote: @Clemens, It is indeed documented that the behaviour is undefined when using a bind_text variant. I missed that part of documentation. Hi Rob, The behaviour is undefined in ALL instances where you pass null characters through C strings

Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-04 Thread Clemens Ladisch
Rob Golsteijn wrote: > It is indeed documented that the behaviour is undefined when using a > bind_text variant. No. The documentation says: | The result of expressions involving strings with embedded NULs is undefined. Using a bind_text variant is just one of the ways to construct a string

[sqlite] retrieve by name or index

2016-07-04 Thread Jim Wang
hi,all There is a table include id,string1,string2 and so on. So I want to get the value of string1 from a record, there are two methods: 1. get by the name of the string2 2. get by the index of the string2, the index is 2 which one is faster?

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Hick Gunter
Creating a trigger causes SQLite to insert a row into the sqlite_master table which contains the text you supply for the trigger. No code is generated at this time. You can verify this by creating a trigger that references undefined fields. It willl succeed. But entering a statement that

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Hamish Symington
Hi there, > How many times are you preparing the update statement? Maybe you are just > measuring the effort required to prepare 55000 UPDATE statements. OK, this sounds plausible. But given the trigger doesn’t even fire, why does the statement need to be prepared? Is it not prepared just

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Dominique Devienne
On Mon, Jul 4, 2016 at 10:26 AM, Hamish Symington < ham...@lightbluesoftware.com> wrote: > [...] If I remove all of the UPDATE rows from this trigger, and make no > other changes, the test takes approximately 12 seconds. > I don’t understand why removing code from the body of a trigger which >

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Hick Gunter
How many times are you preparing the update statement? Maybe you are just measuring the effort required to prepare 55000 UPDATE statements. What is the purpose of counting all the rows of several tables before firing the trigger? If you are attempting to avoid running UPDATE on an empty table,

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Hamish Symington
Hi there, > > It's known that triggers aren't SQLite most remarkable strength, even if I > never encountered a situation where their relative slowness significantly > exceeds their usefulness. > In your situation I believe your coumpond triggering condition needs > parenthesis. Your

Re: [sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Jean-Christophe Deschamps
At 10:26 04/07/2016, you wrote: Hello, I have a curious situation involving a trigger, which I’m at a loss to explain. I’m wondering if someone who knows more about the insides of SQLite can tell me more about why it’s happening. I’m running SQLite 3.8.7. The trigger code is at

[sqlite] Trigger slowness even when it's not fired

2016-07-04 Thread Hamish Symington
Hello, I have a curious situation involving a trigger, which I’m at a loss to explain. I’m wondering if someone who knows more about the insides of SQLite can tell me more about why it’s happening. I’m running SQLite 3.8.7. The trigger code is at the bottom of this email. It’s a

Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-04 Thread Rob Golsteijn
@Clemens, It is indeed documented that the behaviour is undefined when using a bind_text variant. I missed that part of documentation. On the other, as shown in my test queries, it is possible to construct strings with embedded nuls in sql itself, not using the C api (so technically, not