Re: [sqlite] System.Data.SQLite: Commit and Rollback set Connection tonull

2013-01-09 Thread RizThon
> The Connection property is not guaranteed by the MSDN documentation to
> remain valid after a call to Commit or Rollback.  It's really an internal
> implementation detail.
>
>
> http://msdn.microsoft.com/en-us/library/system.data.idbtransaction.connection.aspx
>
Indeed, I already checked MSDN about that. It just didn't sound logical to
me that Connection is set to null after doing a Commit or Rollback, but
indeed the current implementation uses that fact. So I guess I'll have to
use the following code instead
DbConnection connection = transaction.Connection;
transaction.Rollback();
connection.Close();

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


Re: [sqlite] sqlite version of android 4.0.3

2013-01-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/01/13 16:23, sqlitekyounoii wrote:
> I want to know sqlite version of android 4.0.3

My 4.0 device is 4.0.4 but I doubt they changed it.  The version number is
3.7.4 and the source id is 2011-02-23 14:33:31
8609a15dfad23a7c5311b52617d5c4818c0b8d1e.

Roger

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlDuIA0ACgkQmOOfHg372QS9yACfZFFwvjkqUhcDB0zXRiRzv8NK
LTsAn2nTH/sVr8BAHHogRixfXUfeQkVQ
=+1Ku
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite version of android 4.0.3

2013-01-09 Thread Yongil Jang
~Android gingerbread: 3.6.22
Honeycomb~ICS: 3.7.4
Jellybean~:3.7.11
On Jan 10, 2013 9:23 AM, "sqlitekyounoii" 
wrote:

> I want to know sqlite version of android 4.0.3
>
> It's bundle, so version is not know.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite: Commit and Rollback set Connection tonull

2013-01-09 Thread Joe Mistachkin

RizThon wrote:
>
> I don't know if it's the right mailing list to talk about
> System.Data.SQLite.dll.
>

Yes, this is the right place.

> 
> DbTransaction has a property Connection that corresponds to the connection
> used by the transaction. I don't understand why calling Commit or Rollback
> on the transaction automatically sets that property to null. 
> 

Yes, because it's making sure that nobody can accidentally "use" the
transaction
after that point.

> 
> I'm using an abstraction layer to be able to target different databases,
> and at least "MySQL Connector .Net" has a more normal behaviour (at least
> to me) as it doesn't change the Connection property.
> 

The Connection property is not guaranteed by the MSDN documentation to
remain
valid after a call to Commit or Rollback.  It's really an internal
implementation
detail.

http://msdn.microsoft.com/en-us/library/system.data.idbtransaction.connectio
n.aspx

--
Joe Mistachkin

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


Re: [sqlite] compiling tools for winrt

2013-01-09 Thread Joe Mistachkin

E. Timothy Uy wrote:
> 
> Hi, in xcompiling tools for winrt I get the errors below. I suspect this
> because I am using the vcvars for cross compiling winrt. Is there a way to
> make this work? 
> 

In order to build for WinRT, extra options are required on the NMAKE command
line.  Here is an example:

nmake /f Makefile.msc sqlite3.dll FOR_WINRT=1

--
Joe Mistachkin

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


[sqlite] System.Data.SQLite: Commit and Rollback set Connection to null

2013-01-09 Thread RizThon
Hi,

I don't know if it's the right mailing list to talk about
System.Data.SQLite.dll.

DbTransaction has a property Connection that corresponds to the connection
used by the transaction. I don't understand why calling Commit or Rollback
on the transaction automatically sets that property to null. (Current
DbTransaction code:
http://system.data.sqlite.org/index.html/artifact/67e66c1357d3d9ba4427165afa39b5cabc28741c).

I noticed that behaviour because I did something like:
if (error)
{
transaction.Rollback();
transaction.Connection.Close(); // NullReferenceException as Connection
was set to null by Rollback().
}

I'm using an abstraction layer to be able to target different databases,
and at least "MySQL Connector .Net" has a more normal behaviour (at least
to me) as it doesn't change the Connection property.

Any thoughts on this?

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


Re: [sqlite] Change in behavior between 1.0.79.0 and1.0.83.0 in System.Data.SQLite

2013-01-09 Thread Joe Mistachkin

Michael Russell wrote:
>
> I did do a check-out after you made the above suggestion to me.  I did the
> fossil checkout / build, but I still have the same problem.
>

Is there any way you can determine which System.Data.SQLite objects are
being
held open by the Entity Framework?

--
Joe Mistachkin

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


Re: [sqlite] sqlite version of android 4.0.3

2013-01-09 Thread Simon Slavin

On 10 Jan 2013, at 12:23am, sqlitekyounoii  wrote:

> I want to know sqlite version of android 4.0.3
> 
> It's bundle, so version is not know.

On whatever platform you're interested in, execute the SQL command

SELECT sqlite_version()

See this page for details:



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


[sqlite] sqlite version of android 4.0.3

2013-01-09 Thread sqlitekyounoii
I want to know sqlite version of android 4.0.3

It's bundle, so version is not know.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling tools for winrt

2013-01-09 Thread E. Timothy Uy
Thanks Dimiter. I ended up making this change in Makefile.msc

165 165 !IFNDEF NSDKLIBPATH
166 -NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
166 +NSDKLIBPATH = $(WINDOWSSDKDIR)\Lib\win8\um\x86
167 167 !ENDIF


On Wed, Jan 9, 2013 at 4:07 PM, Dimiter 'malkia' Stanev wrote:

> This looks like general compile problem.
>
> The imported functions below are found in kernel32.dll (kernel32.lib
> import library). But I'm not sure whether under WinRT kernel32.dll is still
> used (it might be).
>
> If you can either add kernel32.lib to your link flags, or with pragma
>
> #ifdef _MSC_VER
> #pragma comment(lib, "kernel32.lib")
> #endif
>
>
> On 1/9/2013 3:04 PM, E. Timothy Uy wrote:
>
>> Hi, in xcompiling tools for winrt I get the errors below. I suspect this
>> because I am using the vcvars for cross compiling winrt. Is there a way to
>> make this work?
>>
>> MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
>> __imp__IsDebuggerPresent@0 referenced in function
>> ___raise_securityfailure
>> MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
>> _IsProcessorFeaturePresent@4 referenced in function ___report_gsfailure
>> MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol
>> __imp__EncodePointer@4 referenced in function _pre_c_init
>> MSVCRT.lib(atonexit.obj) : error LNK2001: unresolved external symbol
>> __imp__EncodePointer@4
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__**QueryPerformanceCounter@4 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__GetCurrentProcessId@0 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__GetCurrentThreadId@0 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__**GetSystemTimeAsFileTime@4 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(atonexit.obj) : error LNK2019: unresolved external symbol
>> __imp__DecodePointer@4 referenced in function __onexit
>> mkkeywordhash.exe : fatal error LNK1120: 8 unresolved externals
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>> Studio
>> 11.0\VC\bin\cl.exe"' : return code '0x2'
>> Stop.
>>
>>  __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling tools for winrt

2013-01-09 Thread Dimiter 'malkia' Stanev

This looks like general compile problem.

The imported functions below are found in kernel32.dll (kernel32.lib 
import library). But I'm not sure whether under WinRT kernel32.dll is 
still used (it might be).


If you can either add kernel32.lib to your link flags, or with pragma

#ifdef _MSC_VER
#pragma comment(lib, "kernel32.lib")
#endif

On 1/9/2013 3:04 PM, E. Timothy Uy wrote:

Hi, in xcompiling tools for winrt I get the errors below. I suspect this
because I am using the vcvars for cross compiling winrt. Is there a way to
make this work?

MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
__imp__IsDebuggerPresent@0 referenced in function ___raise_securityfailure
MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
_IsProcessorFeaturePresent@4 referenced in function ___report_gsfailure
MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol
__imp__EncodePointer@4 referenced in function _pre_c_init
MSVCRT.lib(atonexit.obj) : error LNK2001: unresolved external symbol
__imp__EncodePointer@4
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__QueryPerformanceCounter@4 referenced in function
___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetCurrentProcessId@0 referenced in function ___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetCurrentThreadId@0 referenced in function ___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetSystemTimeAsFileTime@4 referenced in function
___security_init_cookie
MSVCRT.lib(atonexit.obj) : error LNK2019: unresolved external symbol
__imp__DecodePointer@4 referenced in function __onexit
mkkeywordhash.exe : fatal error LNK1120: 8 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\bin\cl.exe"' : return code '0x2'
Stop.


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


Re: [sqlite] (Lemon) (Patch) adding a -f option to Lemon to emit function prototypes

2013-01-09 Thread Tiago Rodrigues
I see; well, that's unfortunate.  At any rate, parsing lempar.c will
probably be much more complex than the code I have now, which solves a
simple (but common) case.  Maybe I'll look into parsing lempar.c, but since
this solves my use case, I probably won't be in a hurry to do it.  I
apologise to everyone this doesn't help, then.

Cheers,

  -Tiago


On Mon, Jan 7, 2013 at 9:13 PM, Richard Hipp  wrote:

> On Mon, Jan 7, 2013 at 4:18 PM, Tiago Rodrigues  wrote:
>
> > Oops, Dominique alerted me to the fact that the patch I included was
> > stripped by the listserver...  I'm including it inline, then.
> >
>
>
> This patch does not work in the general case.  I don't doubt that it works
> for your use case, but in general it does not.  The reason:  The function
> prototypes depend on the "lempar.c" template file.  Some applications (ex:
> SQLite) change the lempar.c parser template in ways that could change the
> function signatures.  (The function signatures for SQLite are unchanged,
> but that doesn't exclude the possibility that they might in the future.)
>
> For this to really work in general, I suppose you would have to somehow
> extract the function signatures from the lempar.c template file.  Or maybe
> have a separate lempar.h template that contains the header.  Or something.
>
>
>
> >
> > (Begin patch)
> >
> > --- lemon.c2013-01-04 20:39:20 +
> > +++ lemon-new.c2013-01-04 23:09:59 +
> > @@ -109,7 +109,7 @@
> >  void Reprint(struct lemon *);
> >  void ReportOutput(struct lemon *);
> >  void ReportTable(struct lemon *, int);
> > -void ReportHeader(struct lemon *);
> > +void ReportHeader(struct lemon *, int);
> >  void CompressTables(struct lemon *);
> >  void ResortStates(struct lemon *);
> >
> > @@ -1393,11 +1393,13 @@
> >static int mhflag = 0;
> >static int nolinenosflag = 0;
> >static int noResort = 0;
> > +  static int fpflag = 0;
> >static struct s_options options[] = {
> >  {OPT_FLAG, "b", (char*), "Print only the basis in
> report."},
> >  {OPT_FLAG, "c", (char*), "Don't compress the action
> table."},
> >  {OPT_FSTR, "D", (char*)handle_D_option, "Define an %ifdef macro."},
> >  {OPT_FSTR, "T", (char*)handle_T_option, "Specify a template file."},
> > +{OPT_FLAG, "f", (char*), "Generate function prototypes in
> > header."},
> >  {OPT_FLAG, "g", (char*), "Print grammar without actions."},
> >  {OPT_FLAG, "m", (char*), "Output a makeheaders compatible
> > file."},
> >  {OPT_FLAG, "l", (char*), "Do not print #line
> > statements."},
> > @@ -1502,7 +1504,7 @@
> >  /* Produce a header file for use by the scanner.  (This step is
> >  ** omitted if the "-m" option is used because makeheaders will
> >  ** generate the file for us.) */
> > -if( !mhflag ) ReportHeader();
> > +if( !mhflag ) ReportHeader(, fpflag);
> >}
> >if( statistics ){
> >  printf("Parser statistics: %d terminals, %d nonterminals, %d
> rules\n",
> > @@ -4009,16 +4011,20 @@
> >  }
> >
> >  /* Generate a header file for the parser */
> > -void ReportHeader(struct lemon *lemp)
> > +void ReportHeader(struct lemon *lemp, int fpflag)
> >  {
> >FILE *out, *in;
> > +  const char *name;
> >const char *prefix;
> >char line[LINESIZE];
> >char pattern[LINESIZE];
> >int i;
> > +  int protok = 1;
> >
> >if( lemp->tokenprefix ) prefix = lemp->tokenprefix;
> >elseprefix = "";
> > +  if( lemp->name ) name = lemp->name;
> > +  else name = "Parse";
> >in = file_open(lemp,".h","rb");
> >if( in ){
> >  int nextChar;
> > @@ -4026,9 +4032,24 @@
> >sprintf(pattern,"#define %s%-30s
> > %2d\n",prefix,lemp->symbols[i]->name,i);
> >if( strcmp(line,pattern) ) break;
> >  }
> > +if( fpflag ){
> > +sprintf(pattern,"void *%sAlloc(void *(*)(size_t));\n",name);
> > +if( !fgets(line,LINESIZE,in) || strcmp(line,pattern) ){ protok =
> > 0; goto after; }
> > +
> > +if( lemp->arg ){
> > +sprintf(pattern,"void %s(void
> > *,int,%s,%s);\n",name,lemp->tokentype,lemp->arg);
> > +}else{
> > +sprintf(pattern,"void %s(void
> > *,int,%s);\n",name,lemp->tokentype);
> > +}
> > +if( !fgets(line,LINESIZE,in) || strcmp(line,pattern) ){ protok =
> > 0; goto after; }
> > +
> > +sprintf(pattern,"void *%sFree(void *,void (*)(void
> *));\n",name);
> > +if( !fgets(line,LINESIZE,in) || strcmp(line,pattern) ){ protok =
> > 0; goto after; }
> > +}
> > +after:
> >  nextChar = fgetc(in);
> >  fclose(in);
> > -if( i==lemp->nterminal && nextChar==EOF ){
> > +if( i==lemp->nterminal && protok && nextChar==EOF ){
> >/* No change in the file.  Don't rewrite it. */
> >return;
> >  }
> > @@ -4038,6 +4059,16 @@
> >  for(i=1; interminal; i++){
> >fprintf(out,"#define %s%-30s
> > %2d\n",prefix,lemp->symbols[i]->name,i);
> >  }
> > +

Re: [sqlite] Lock Database temporarily.

2013-01-09 Thread Christopher Vance
It sounds to me like your question has nothing to do with SQLite and
everything to do with the operating system your app is (not) running
on.

What facilities does your OS have to stop anything or anybody writing
a file? How do you propose to relax these facilities to enable your
app to write the file? How do you propose to do this without enabling
anything or anybody else writing the file while your app *is* running.

-- Christopher

On 9 January 2013 15:31, sants87  wrote:
> Simon,
>
> To answer your question, I want to stop modification when my app is not
> running/alive.
>
>
>
> --
> View this message in context: 
> http://sqlite.1065341.n5.nabble.com/Lock-Database-temporarily-tp66434p66454.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



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


[sqlite] compiling tools for winrt

2013-01-09 Thread E. Timothy Uy
Hi, in xcompiling tools for winrt I get the errors below. I suspect this
because I am using the vcvars for cross compiling winrt. Is there a way to
make this work?

MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
__imp__IsDebuggerPresent@0 referenced in function ___raise_securityfailure
MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
_IsProcessorFeaturePresent@4 referenced in function ___report_gsfailure
MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol
__imp__EncodePointer@4 referenced in function _pre_c_init
MSVCRT.lib(atonexit.obj) : error LNK2001: unresolved external symbol
__imp__EncodePointer@4
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__QueryPerformanceCounter@4 referenced in function
___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetCurrentProcessId@0 referenced in function ___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetCurrentThreadId@0 referenced in function ___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetSystemTimeAsFileTime@4 referenced in function
___security_init_cookie
MSVCRT.lib(atonexit.obj) : error LNK2019: unresolved external symbol
__imp__DecodePointer@4 referenced in function __onexit
mkkeywordhash.exe : fatal error LNK1120: 8 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\bin\cl.exe"' : return code '0x2'
Stop.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Change in behavior between 1.0.79.0 and1.0.83.0 in System.Data.SQLite

2013-01-09 Thread Michael Russell
I did do a check-out after you made the above suggestion to me.  I did the
fossil checkout / build, but I still have the same problem.

--
Michael Russell
MTI Film, LLC
michael.russ...@mtifilm.com
http://www.mtifilm.com/
Providence, RI 02906 USA
+1 (401) 831-1315


On Wed, Jan 9, 2013 at 2:54 PM, Joe Mistachkin wrote:

>
> Larry Brasfield wrote:
> >
> > I don't know about data adapter usage, but I am seeing the same behavior
> > with Entity Framework version 5.  I have scrupulously disposed of
> > everything my code has gotten.  I have also overridden the
> > DbContext.Dispose(bool disposing) method and can see that the base
> > (DbContext) is in fact disposing the connection it has.
> >
>
> Maybe there is some internal object that the Entity Framework is holding
> onto?  I'm not sure how it works internally.
>
> >
> > I do not see such a change anywhere in recent check-ins listed at
> >   http://www.sqlite.org/src/timeline?r=trunk
> > .  Is there a build somewhere?  I would be happy to try it.
> >
>
> The check-in I mentioned is here:
>
> https://system.data.sqlite.org/index.html/info/42d873a6d8
>
> I'm doing the release build for 1.0.84.0 right now; however, it will not
> be ready until later in the day.
>
> --
> Joe Mistachkin
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Change in behavior between 1.0.79.0 and1.0.83.0 in System.Data.SQLite

2013-01-09 Thread Joe Mistachkin

Larry Brasfield wrote:
> 
> I don't know about data adapter usage, but I am seeing the same behavior 
> with Entity Framework version 5.  I have scrupulously disposed of 
> everything my code has gotten.  I have also overridden the 
> DbContext.Dispose(bool disposing) method and can see that the base 
> (DbContext) is in fact disposing the connection it has.
> 

Maybe there is some internal object that the Entity Framework is holding
onto?  I'm not sure how it works internally.

>
> I do not see such a change anywhere in recent check-ins listed at
>   http://www.sqlite.org/src/timeline?r=trunk
> .  Is there a build somewhere?  I would be happy to try it.
>

The check-in I mentioned is here:

https://system.data.sqlite.org/index.html/info/42d873a6d8

I'm doing the release build for 1.0.84.0 right now; however, it will not
be ready until later in the day.

--
Joe Mistachkin

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


Re: [sqlite] Change in behavior between 1.0.79.0 and1.0.83.0 in System.Data.SQLite

2013-01-09 Thread Larry Brasfield

Joe Mistachkin wrote:

Does the Entity Framework make use of data adapters?  If so, I just checked
in a fix to dispose the internal commands managed by the SQLiteDataAdapter
class (i.e. because the base class DbDataAdapter apparently does not
explicitly dispose them).


I don't know about data adapter usage, but I am seeing the same behavior 
with Entity Framework version 5.  I have scrupulously disposed of 
everything my code has gotten.  I have also overridden the 
DbContext.Dispose(bool disposing) method and can see that the base 
(DbContext) is in fact disposing the connection it has.



Could you please try the latest trunk code and let us know if that clears
the issue you are seeing?


I do not see such a change anywhere in recent check-ins listed at
  http://www.sqlite.org/src/timeline?r=trunk
.  Is there a build somewhere?  I would be happy to try it.

Cheers,
--
Larry Brasfield

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


Re: [sqlite] Change in behavior between 1.0.79.0 and1.0.83.0 in System.Data.SQLite

2013-01-09 Thread Joe Mistachkin

Does the Entity Framework make use of data adapters?  If so, I just checked
in a fix to dispose the internal commands managed by the SQLiteDataAdapter
class (i.e. because the base class DbDataAdapter apparently does not
explicitly
dispose them).

Could you please try the latest trunk code and let us know if that clears
the
issue you are seeing?

--
Joe Mistachkin

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


Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0inSystem.Data.SQLite

2013-01-09 Thread Michael Russell
Everything that can be disposed of should be getting done automatically by
the using:

using (var testEntities = new TestEntities(connectionString))
{
Assert.AreEqual(1, testEntities.Users.Count(), "Must
be one user");
var firstOrDefault = testEntities.Users.FirstOrDefault();
if (firstOrDefault != null)
{
Assert.AreEqual("1234", firstOrDefault.Id, "ID mismatch");
}
}

but I still cannot delete the file after the using.
--
Michael Russell
MTI Film, LLC
michael.russ...@mtifilm.com
http://www.mtifilm.com/
Providence, RI 02906 USA
+1 (401) 831-1315


On Wed, Jan 9, 2013 at 12:06 PM, Joe Mistachkin wrote:

>
> Michael Russell wrote:
> >
> > One further follow-up.  I tested all the other versions in between.  The
> > break happened between 1.0.81.0 and 1.0.82.0
> >
>
> The switch to using sqlite3_close_v2 happened in that time frame; however,
> the root cause of the issue you are seeing is that one or more
> System.Data.SQLite objects have not been disposed and it's holding the
> database connection and it's associated file(s) open.
>
> --
> Joe Mistachkin
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread ajm

>
>  Mensaje original 
> De: Pavel Ivanov 
> Para:   a...@zator.com, General Discussion of SQLite Database 
> 
> Fecha:  Wed, 09 Jan 2013 16:08:51 +0100
> Asunto:  Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.75 version and 
> later
>
> 
> Did you type error message by hand (please don't do that) or you indeed 
> forgot the "g" at the end of db name?

I'm sorry:

The error message is Ok; the original sentence is really without the "g"; I've 
added it only for clarity purpose (the content of the "original" -attached- 
table is used to populate the "foreing" one).

Regards.

--
Adolfo J. Millan.


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


Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0inSystem.Data.SQLite

2013-01-09 Thread Joe Mistachkin

Michael Russell wrote:
>
> One further follow-up.  I tested all the other versions in between.  The
> break happened between 1.0.81.0 and 1.0.82.0
> 

The switch to using sqlite3_close_v2 happened in that time frame; however,
the root cause of the issue you are seeing is that one or more
System.Data.SQLite objects have not been disposed and it's holding the
database connection and it's associated file(s) open.

--
Joe Mistachkin

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


Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0 inSystem.Data.SQLite

2013-01-09 Thread Michael Russell
One further follow-up.  I tested all the other versions in between.  The
break happened between 1.0.81.0 and 1.0.82.0

--
Michael Russell
MTI Film, LLC
michael.russ...@mtifilm.com
http://www.mtifilm.com/
Providence, RI 02906 USA
+1 (401) 831-1315


On Wed, Jan 9, 2013 at 10:47 AM, Michael Russell <
michael.russ...@mtifilm.com> wrote:

> I have narrowed this down and to just the System.Data.SQLite.DLL.  I have
> a test project in VS2010 with .NET 4.0.  If I only change the
> System.Data.SQLite.DLL from 1.0.79.0 to 1.0.83.0 I get the failure that the
> file is open.  I am not changing any other components or DLL's.
>
>
> --
> Michael Russell
> MTI Film, LLC
> michael.russ...@mtifilm.com
> http://www.mtifilm.com/
> Providence, RI 02906 USA
> +1 (401) 831-1315
>
>
> On Tue, Jan 8, 2013 at 2:12 PM, Joe Mistachkin wrote:
>
>>
>> Michael Russell wrote:
>> >
>> > The File.Delete() fails with the same issue as above
>> (System.IO.Exception:
>> > The process cannot access the file...because it is being used by another
>> > process.)
>> >
>>
>> My guess would be that the Entity Framework is somehow holding the
>> underlying
>> connection open.  I'm not sure if there is a way to force it to close the
>> connection and/or dispose of the other System.Data.SQLite resources it's
>> using.
>>
>> --
>> Joe Mistachkin
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Change in behavior between 1.0.79.0 and 1.0.83.0 inSystem.Data.SQLite

2013-01-09 Thread Michael Russell
I have narrowed this down and to just the System.Data.SQLite.DLL.  I have a
test project in VS2010 with .NET 4.0.  If I only change the
System.Data.SQLite.DLL from 1.0.79.0 to 1.0.83.0 I get the failure that the
file is open.  I am not changing any other components or DLL's.

--
Michael Russell
MTI Film, LLC
michael.russ...@mtifilm.com
http://www.mtifilm.com/
Providence, RI 02906 USA
+1 (401) 831-1315


On Tue, Jan 8, 2013 at 2:12 PM, Joe Mistachkin wrote:

>
> Michael Russell wrote:
> >
> > The File.Delete() fails with the same issue as above
> (System.IO.Exception:
> > The process cannot access the file...because it is being used by another
> > process.)
> >
>
> My guess would be that the Entity Framework is somehow holding the
> underlying
> connection open.  I'm not sure if there is a way to force it to close the
> connection and/or dispose of the other System.Data.SQLite resources it's
> using.
>
> --
> Joe Mistachkin
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread Pavel Ivanov
On Wed, Jan 9, 2013 at 6:06 AM,  wrote:

>
> >
> >  Mensaje original 
> > De: Clemens Ladisch 
> > Para:  sqlite-users@sqlite.org
> > Fecha:  Wed, 09 Jan 2013 14:25:31 +0100
> > Asunto:  Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version
> andlater
> >
> >
> >
> >a...@zator.com wrote:
> >>int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM
> dbOrig.usr", -1, , 0);
> >
> > if (resp != SQLITE_OK)
> > printf("error message: %s\n", sqlite3_errmsg(dbPtr));
> >
> >
> >Regards,
> >Clemens
>
> error message: no such table: dbOri.usr


Did you type error message by hand (please don't do that) or you indeed
forgot the "g" at the end of db name?


>
>
sqlite> .tables
> AgEfHolder AgPdIDtBlockcoco   ftsm_segments
> AgEfIDt AgVtHolder FreqUseemail  ftsm_stat
> AgEfKlv AgVtIDt Usr   ftsm   lnk
> AgEfemer   AgVtPreatm ftsm_content   prm
> AgPdHolder AgVtos blb ftsm_segdir
>
>
> Regards
> Adolfo J. Millan
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread ajm

>
>  Mensaje original 
> De: Clemens Ladisch 
> Para:  sqlite-users@sqlite.org
> Fecha:  Wed, 09 Jan 2013 14:25:31 +0100
> Asunto:  Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version 
> andlater
>
> 
>
>a...@zator.com wrote:
>>int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM 
>> dbOrig.usr", -1, , 0);
>
> if (resp != SQLITE_OK)
> printf("error message: %s\n", sqlite3_errmsg(dbPtr));
>
>
>Regards,
>Clemens

error message: no such table: dbOri.usr

sqlite> .tables
AgEfHolder AgPdIDtBlockcoco   ftsm_segments
AgEfIDt AgVtHolder FreqUseemail  ftsm_stat
AgEfKlv AgVtIDt Usr   ftsm   lnk
AgEfemer   AgVtPreatm ftsm_content   prm
AgPdHolder AgVtos blb ftsm_segdir


Regards
Adolfo J. Millan


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


Re: [sqlite] Archive SQLite Database?

2013-01-09 Thread Michael Black
You can also just copy the entire file (best to do when app is not running).
So you'd only be down for as long as it takes to copy it.
If your database is updated frequently .backup may never finish.

Then you can archive from the copy and delete the archived rows from the
active DB in a non-interference way (i.e. small batches).

I still think you may benefit greatly from some indexes but we need more
info.

Somebody will eventually tell you to run EXPLAIN on your queries so we can
see what they are doing.
http://www.sqlite.org/eqp.html






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


Re: [sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread Clemens Ladisch
a...@zator.com wrote:
>int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM 
> dbOrig.usr", -1, , 0);

 if (resp != SQLITE_OK)
 printf("error message: %s\n", sqlite3_errmsg(dbPtr));


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


Re: [sqlite] Archive SQLite Database?

2013-01-09 Thread Simon Slavin

On 8 Jan 2013, at 2:05pm, "Jimmy Martin"  wrote:

>I have recently taken over a position that uses a SQLite
> database.  The database is currently 24GB and running extremely slow.

Your best friend here might be the SQLite shell tool:



download from here:



> Is there a quick way to archive data and free-up some space?

Do you understand the data structure and know what rows you can delete ?  If 
so, just issue some DELETE commands and then do a VACUUM.

> Also, are
> there any risks to running the "vacuum" command...such as losing data?

It's no more or less safe than any other SQL command.  Obviously, you'd take a 
backup of your database file before you did anything at all to it -- that's 
your archive -- but there are no known corruption problems especially related 
to VACUUM.

> I would like to archive a year's worth of data.  Archiving the data via
> the application is taking roughly 30min for every 3-5MB.  Unfortunately
> our application cannot be down for such an extended time to Archive the
> years worth of data we need.


You can use the .backup command to backup the database while other applications 
have it open.  The command will continue trying to take a copy until it gets a 
consistent snapshot.  If you do use VACUUM then note that it does lock the 
database, possibly for a long time, so even if your normal apps are still 
running they may give 'cannot access database' problems.  It depends how the 
programmer wrote them.

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


Re: [sqlite] Archive SQLite Database?

2013-01-09 Thread Michael Black
Tou haven't said what "really slow" means.
Could be multiple solutions to that problem.

30min for 3-5MB sounds a bit ridiculous.

What kind of select are you doing to archive and what indexes are on the
tables?


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jimmy Martin
Sent: Tuesday, January 08, 2013 8:05 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Archive SQLite Database?

Hello,

I have recently taken over a position that uses a SQLite
database.  The database is currently 24GB and running extremely slow.
Is there a quick way to archive data and free-up some space?  Also, are
there any risks to running the "vacuum" command...such as losing data?
I would like to archive a year's worth of data.  Archiving the data via
the application is taking roughly 30min for every 3-5MB.  Unfortunately
our application cannot be down for such an extended time to Archive the
years worth of data we need.

 

SQLite Version:  3.6.23.1

 

 

Thanks,

 

Jimmy Martin

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

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


Re: [sqlite] Lock Database temporarily.

2013-01-09 Thread sants87
Simon,

To answer your question, I want to stop modification when my app is not
running/alive.



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Lock-Database-temporarily-tp66434p66454.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] Lock Database temporarily.

2013-01-09 Thread sants87
Thanks Simon/devienne

Donald,

I just want my app to use the database. But as the database resides in a
common easy accessible location I want to lock the database or prevent any
access to it.

I don't want other apps or even user using that database. I just want to
block the writes. I am fine with reads too.



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Lock-Database-temporarily-tp66434p66453.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


[sqlite] Archive SQLite Database?

2013-01-09 Thread Jimmy Martin
Hello,

I have recently taken over a position that uses a SQLite
database.  The database is currently 24GB and running extremely slow.
Is there a quick way to archive data and free-up some space?  Also, are
there any risks to running the "vacuum" command...such as losing data?
I would like to archive a year's worth of data.  Archiving the data via
the application is taking roughly 30min for every 3-5MB.  Unfortunately
our application cannot be down for such an extended time to Archive the
years worth of data we need.

 

SQLite Version:  3.6.23.1

 

 

Thanks,

 

Jimmy Martin

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


[sqlite] Problem whit sqlite_prepare_v2() in 3.7.5 version and later

2013-01-09 Thread ajm

Hi list:

I've an application who from a long time, worked in Windows 98; XP; Vista; W7, 
and now in W8.

The things go fine until now, but with SQLite versions 3.7.15 and 3.7.15.1, 
sqlite3_prepare_v2() fails and return 1.

Here is a brief of the situation:

1.- The application is running in a (local) directory, and there is a dBase  
-say: D:\local\dB-,
who has a table: "CREATE TABLE usr (ky INTEGER PRIMARY KEY,id CHARACTER 
UNIQUE,lev INTEGER,pwd TEXT)"

2.- Use:"PRAGMA page_size=4096"

3.- Create a dBase (same name) in a distinct (foreing) directory. Say: 
D:\someplace\dB

4.- Add the same table design to the "foreing" dbase:
   "CREATE TABLE usr (ky INTEGER PRIMARY KEY,id CHARACTER UNIQUE,lev 
INTEGER,pwd TEXT)"

In a process to populate the foreing table with the "local" values:

5.-  Attach the local dBase: "ATTACH dB AS dbOrig" (without pathname -is local-)

6.-  Prepare to a read statement in the "foreing dBase:
   sqlite3_stmt* sTmt1 = NULL;
   int resp = sqlite3_prepare_v2 (dbPtr, "SELECT ky,id,lev,pwd FROM 
dbOrig.usr", -1, , 0);

Here, resp = 1, and by the way, all previous opperations returned Ok, and the 
mentioned code, works fine with SQLite version 3.7.11.

If I have not inadvertently broken something, perhaps it may be a bug.

HTH.

--
Adolfo J. Millán
Zator Systems


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