[sqlite] MyJSQLView Version 7.08 Released

2016-09-11 Thread dmp
MyJSQLView Version 7.08 Released

The MyJSQLView project is pleased to release v7.08 to the public. The
release marks a complete code review and cleanup. Updated libraries have
also been included with this release along with the Table Field Profiler
plugin. There have been many fixes in this release that stabilizes the
application.

Dana M. Proctor
MyJSQLView Project Manager
http://myjsqlview.com

MyJSQLView provides an easy to use Java based user interface front-end
for viewing, adding, editing, or deleting entries in several mainstream
databases. A query frame allows the building of complex SQL statements
and a SQL Query Bucket for saving such. The application allows easy
sorting, searching, and import/export of table data. A plug-in framework
has allowed the inclusion of tools to visually build queries, profile and
plot data for analysis.

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


Re: [sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread Darren Duncan
You can also access that value within your Perl code, in a DBMS-agnostic 
fashion, with the appropriate DBI routine:


http://search.cpan.org/dist/DBI/DBI.pm#last_insert_id

-- Darren Duncan

On 2016-09-11 2:59 PM, mikeegg1 wrote:

I forgot I could use it inside the shell. Thanks.


On Sep 11, 2016, at 16:58, Simon Slavin  wrote:
On 11 Sep 2016, at 10:53pm, mikeegg1  wrote:


Thanks. I thought not. I’m doing this from PERL on a Mac and don’t know if I 
can fully access last_row_id().


It's not a C function, it's a function you can use inside SQL commands.  There 
shouldn't be a problem with it.

INSERT INTO myTable VALUES ('Hastings',17);
UPDATE anotherTable SET theRowId = last_row_id() WHERE placeName = 'Hastings';


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


Re: [sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread mikeegg1
I forgot I could use it inside the shell. Thanks.

Mike

> On Sep 11, 2016, at 16:58, Simon Slavin  wrote:
> 
> 
> On 11 Sep 2016, at 10:53pm, mikeegg1  wrote:
> 
>> Thanks. I thought not. I’m doing this from PERL on a Mac and don’t know if I 
>> can fully access last_row_id().
> 
> It's not a C function, it's a function you can use inside SQL commands.  
> There shouldn't be a problem with it.
> 
> INSERT INTO myTable VALUES ('Hastings',17);
> UPDATE anotherTable SET theRowId = last_row_id() WHERE placeName = 'Hastings';
> 
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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


Re: [sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread Simon Slavin

On 11 Sep 2016, at 10:53pm, mikeegg1  wrote:

> Thanks. I thought not. I’m doing this from PERL on a Mac and don’t know if I 
> can fully access last_row_id().

It's not a C function, it's a function you can use inside SQL commands.  There 
shouldn't be a problem with it.

INSERT INTO myTable VALUES ('Hastings',17);
UPDATE anotherTable SET theRowId = last_row_id() WHERE placeName = 'Hastings';

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


Re: [sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread mikeegg1
Thanks. I thought not. I’m doing this from PERL on a Mac and don’t know if I 
can fully access last_row_id(). :)

Mike

> On Sep 11, 2016, at 16:52, Simon Slavin  wrote:
> 
> 
> On 11 Sep 2016, at 10:48pm, mikeegg1  wrote:
> 
>> I think Oracle (a long distant memory) has variables like @variable or 
>> @@variable where you can do something like '@variable = select rowid from 
>> table where field = 4' and then later do 'insert into othertable (field2) 
>> value(@variable)’. Does this make sense?
> 
> Yes.  I understand how variables could be useful.  But SQLite doesn't have 
> variables the user can assign.
> 
>> I’m wanting to in the shell select lastrowid then update a bunch of inserted 
>> rows in a different table with the previously inserted lastrowid.
> 
> See the function "last_insert_rowid()" on the page
> 
> 
> 
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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


Re: [sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread Simon Slavin

On 11 Sep 2016, at 10:48pm, mikeegg1  wrote:

> I think Oracle (a long distant memory) has variables like @variable or 
> @@variable where you can do something like '@variable = select rowid from 
> table where field = 4' and then later do 'insert into othertable (field2) 
> value(@variable)’. Does this make sense?

Yes.  I understand how variables could be useful.  But SQLite doesn't have 
variables the user can assign.

> I’m wanting to in the shell select lastrowid then update a bunch of inserted 
> rows in a different table with the previously inserted lastrowid.

See the function "last_insert_rowid()" on the page



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


[sqlite] Does sqlite3 have variables like Oracle?

2016-09-11 Thread mikeegg1
I think Oracle (a long distant memory) has variables like @variable or 
@@variable where you can do something like '@variable = select rowid from table 
where field = 4' and then later do 'insert into othertable (field2) 
value(@variable)’. Does this make sense? I’m wanting to in the shell select 
lastrowid then update a bunch of inserted rows in a different table with the 
previously inserted lastrowid.

I don’t have an example at the moment of what I’m trying to do. I’m generating 
a bunch of statements into a file that I will then ‘sqlite3 data.sqlite3 < 
data.sql’. I’m using the value of -14 (just a number) as a place holder in a 
bunch of insert statements then at the end of each group I do an update to the 
actual rowid.

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


Re: [sqlite] Frequent database corruptions on Windows 10

2016-09-11 Thread William Drago

On 9/10/2016 1:16 PM, Olivier Mascia wrote:

Le 10 sept. 2016 à 11:21, Alexander Täschner 
 a écrit :

since upgrading to Windows 10 I have trouble with several different C#
programs I wrote, that uses System.Data.SQLite to access sqlite
database files

...

The programs are using multiple threads sharing one SQLiteConnection
per process. I use lock statements to prevent the different threads from
accessing this connection object and all derived SQLiteCommand
objects simultaneously.

One connection per process, shared between threads is calling for needless 
complications (your efforts to prevent different threads from using this 
connection object simultaneously, for instance).

I would first refactor this a little bit, in order for each thread to use their 
own connection, not sharing any of these, nor any of the descendant objects 
from those connections. It is very simple to do and you will get rid of all 
that code to handle mutual exclusion.  In essence, you program each thread as 
if they were a distinct process (regarding SQLite).   It *might% fix your 
problem or help you find where it exactly is.  And if you're using WAL mode, it 
will bring you some level of true read-concurrency.


In your current model, you should make sure that SQLite library is set for:

   sqlite3_config(SQLITE_CONFIG_SERIALIZED);// SQLite enforces a mutual 
exclusion of threads


And in the 'each thread has its own connection(s)' model which I suggest, you 
could downgrade that to:

   sqlite3_config(SQLITE_CONFIG_MULTITHREAD);   // SQLite does NO attempt to 
isolate threads (because you do
// by giving a distinct 
connection to each and every thread)

I don't know what the default it with System.Data.SQLite.


Default is Serialized for SQLite and System.Data.SQLite, and 
it's probably best to leave it at that even when each thread 
has it's own connection. More info: 
https://sqlite.org/threadsafe.html


I'd do as Olivier suggests and refactor the code a little. 
Welcome to Windows 10 ;)


-Bill

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


Re: [sqlite] sqlite - Delete large table in sqlite

2016-09-11 Thread Lev
On Sat, 10 Sep 2016 13:31:51 +0100
Simon Slavin  wrote:

> You do it after opening a connection to the database.  Probably the
> first thing you do after sqlite3_open().

Thanks!

-- 
73 de HA5OGL
Op.: Levente
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users