Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Jay A. Kreibich
On Thu, Jul 05, 2012 at 09:03:54AM -0400, Pavel Ivanov scratched on the wall:
> So this feature shouldn't work for you. From my first message:
> 
> > But this possibility was
> > introduced in SQLite 3.7.13. So your asp.net provider should be
> > compiled with the latest version of SQLite, otherwise it won't work.


  Also, not to state the obvious, but you can only share a :memory:
  database across connections that originate from the same process.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
Thank you so much Pavel. I will try with the new version.




 From: Pavel Ivanov <paiva...@gmail.com>
To: T Ü <shocking_blue2...@yahoo.com> 
Cc: General Discussion of SQLite Database <sqlite-users@sqlite.org> 
Sent: Thursday, July 5, 2012 4:03 PM
Subject: Re: [sqlite] Multiple connections to in-memory database
 
So this feature shouldn't work for you. From my first message:

> But this possibility was
> introduced in SQLite 3.7.13. So your asp.net provider should be
> compiled with the latest version of SQLite, otherwise it won't work.


Pavel


On Thu, Jul 5, 2012 at 8:56 AM, T Ü <shocking_blue2...@yahoo.com> wrote:
> It returns 3.6.23.1
>
> 
> From: Pavel Ivanov <paiva...@gmail.com>
> To: T Ü <shocking_blue2...@yahoo.com>
> Cc: General Discussion of SQLite Database <sqlite-users@sqlite.org>
> Sent: Thursday, July 5, 2012 3:40 PM
>
> Subject: Re: [sqlite] Multiple connections to in-memory database
>
> On Thu, Jul 5, 2012 at 8:37 AM, T Ü <shocking_blue2...@yahoo.com> wrote:
>> By trying I found out that SQLiteConnection("Data
>> Source=:memory:;cache=shared"); worked.
>> In a single aspx.page at cs code, first I open an in-memory database
>> connection
>>        SQLiteConnection conn = new SQLiteConnection ( "Data
>> Source=:memory:;cache=shared" );
>>        conn.Open();
>> than create table and insert some data
>> then without closing that connection open another connection in the
>> sameway,
>> but when I try to select the rows of the table that I created in the
>> previous table, I get no such table error.
>> What am I doing wrong???
>
> Please execute "SELECT sqlite_version()" in your cs code and tell us
> the result of it.
>
> Pavel
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Pavel Ivanov
So this feature shouldn't work for you. From my first message:

> But this possibility was
> introduced in SQLite 3.7.13. So your asp.net provider should be
> compiled with the latest version of SQLite, otherwise it won't work.


Pavel


On Thu, Jul 5, 2012 at 8:56 AM, T Ü <shocking_blue2...@yahoo.com> wrote:
> It returns 3.6.23.1
>
> 
> From: Pavel Ivanov <paiva...@gmail.com>
> To: T Ü <shocking_blue2...@yahoo.com>
> Cc: General Discussion of SQLite Database <sqlite-users@sqlite.org>
> Sent: Thursday, July 5, 2012 3:40 PM
>
> Subject: Re: [sqlite] Multiple connections to in-memory database
>
> On Thu, Jul 5, 2012 at 8:37 AM, T Ü <shocking_blue2...@yahoo.com> wrote:
>> By trying I found out that SQLiteConnection("Data
>> Source=:memory:;cache=shared"); worked.
>> In a single aspx.page at cs code, first I open an in-memory database
>> connection
>>SQLiteConnection conn = new SQLiteConnection ( "Data
>> Source=:memory:;cache=shared" );
>>conn.Open();
>> than create table and insert some data
>> then without closing that connection open another connection in the
>> sameway,
>> but when I try to select the rows of the table that I created in the
>> previous table, I get no such table error.
>> What am I doing wrong???
>
> Please execute "SELECT sqlite_version()" in your cs code and tell us
> the result of it.
>
> Pavel
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
It returns 3.6.23.1




 From: Pavel Ivanov <paiva...@gmail.com>
To: T Ü <shocking_blue2...@yahoo.com> 
Cc: General Discussion of SQLite Database <sqlite-users@sqlite.org> 
Sent: Thursday, July 5, 2012 3:40 PM
Subject: Re: [sqlite] Multiple connections to in-memory database
 
On Thu, Jul 5, 2012 at 8:37 AM, T Ü <shocking_blue2...@yahoo.com> wrote:
> By trying I found out that SQLiteConnection("Data
> Source=:memory:;cache=shared"); worked.
> In a single aspx.page at cs code, first I open an in-memory database
> connection
>         SQLiteConnection conn = new SQLiteConnection ( "Data
> Source=:memory:;cache=shared" );
>         conn.Open();
> than create table and insert some data
> then without closing that connection open another connection in the sameway,
> but when I try to select the rows of the table that I created in the
> previous table, I get no such table error.
> What am I doing wrong???

Please execute "SELECT sqlite_version()" in your cs code and tell us
the result of it.

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


Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Pavel Ivanov
On Thu, Jul 5, 2012 at 8:37 AM, T Ü  wrote:
> By trying I found out that SQLiteConnection("Data
> Source=:memory:;cache=shared"); worked.
> In a single aspx.page at cs code, first I open an in-memory database
> connection
> SQLiteConnection conn = new SQLiteConnection ( "Data
> Source=:memory:;cache=shared" );
> conn.Open();
> than create table and insert some data
> then without closing that connection open another connection in the sameway,
> but when I try to select the rows of the table that I created in the
> previous table, I get no such table error.
> What am I doing wrong???

Please execute "SELECT sqlite_version()" in your cs code and tell us
the result of it.

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


Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
By trying I found out that SQLiteConnection("Data 
Source=:memory:;cache=shared"); worked.
In a single aspx.page at cs code, first I open an in-memory database connection 

        SQLiteConnection conn = new SQLiteConnection ( "Data 
Source=:memory:;cache=shared" );
    conn.Open();

than create table and insert some data
then without closing that connection open another connection in the sameway, 
but when I try to select the rows of the table that I created in the previous 
table, I get no such table error.
What am I doing wrong???

 

 From: Pavel Ivanov <paiva...@gmail.com>
To: T Ü <shocking_blue2...@yahoo.com>; General Discussion of SQLite Database 
<sqlite-users@sqlite.org> 
Sent: Thursday, July 5, 2012 3:21 PM
Subject: Re: [sqlite] Multiple connections to in-memory database
 
On Thu, Jul 5, 2012 at 7:46 AM, T Ü <shocking_blue2...@yahoo.com> wrote:
> I have an asp.net application.
> I open a sqlite in-memory connection with SQLiteConnection conn = new 
> SQLiteConnection ( "Data Source=:memory:" ); command.
> I read that by using cache=shared parameter, I can make that in-memory 
> database reachable from other connections.
>
> 1.What is the way of applying cache=shared parameter in this type of 
> connection? SQLiteConnection conn = new SQLiteConnection ( "Data 
> Source=:memory:?cache=shared" ); is not working?

I think you should write SQLiteConnection("Data
Source=file::memory:?cache=shared"). But this possibility was
introduced in SQLite 3.7.13. So your asp.net provider should be
compiled with the latest version of SQLite, otherwise it won't work.

> 2.What is the way of creating a new connection for accessing the previously 
> opened in-memory database?

You should create new connection the same way as previously opened
one, i.e. SQLiteConnection("Data Source=file::memory:?cache=shared").


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


Re: [sqlite] Multiple connections to in-memory database

2012-07-05 Thread Pavel Ivanov
On Thu, Jul 5, 2012 at 7:46 AM, T Ü  wrote:
> I have an asp.net application.
> I open a sqlite in-memory connection with SQLiteConnection conn = new 
> SQLiteConnection ( "Data Source=:memory:" ); command.
> I read that by using cache=shared parameter, I can make that in-memory 
> database reachable from other connections.
>
> 1.What is the way of applying cache=shared parameter in this type of 
> connection? SQLiteConnection conn = new SQLiteConnection ( "Data 
> Source=:memory:?cache=shared" ); is not working?

I think you should write SQLiteConnection("Data
Source=file::memory:?cache=shared"). But this possibility was
introduced in SQLite 3.7.13. So your asp.net provider should be
compiled with the latest version of SQLite, otherwise it won't work.

> 2.What is the way of creating a new connection for accessing the previously 
> opened in-memory database?

You should create new connection the same way as previously opened
one, i.e. SQLiteConnection("Data Source=file::memory:?cache=shared").


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


[sqlite] Multiple connections to in-memory database

2012-07-05 Thread T Ü
I have an asp.net application.
I open a sqlite in-memory connection with SQLiteConnection conn = new 
SQLiteConnection ( "Data Source=:memory:" ); command.
I read that by using cache=shared parameter, I can make that in-memory database 
reachable from other connections.

1.What is the way of applying cache=shared parameter in this type of 
connection? SQLiteConnection conn = new SQLiteConnection ( "Data 
Source=:memory:?cache=shared" ); is not working?

2.What is the way of creating a new connection for accessing the previously 
opened in-memory database?

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