Re: [sqlite] Need JDBC driver for SQLite

2013-04-06 Thread Walter Hurry
On Thu, 04 Apr 2013 11:30:51 +0530, Vinoth raj wrote:

> Hello All,
> 
> I was looking for an authoritative source from where I can get the
> driver (jar) for SQLite. SQLite web site do not have any mention for
> Java support.
> 
> Can anyone help in getting the JDBC driver for SQLite (from trusted
> source only)?
> 
I don't know what you mean by "authoritative source", but I use this one 
with success:

https://bitbucket.org/xerial/sqlite-jdbc

It works perfectly for me with SQLWotkbench/J


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


Re: [sqlite] Unhandled Exception: System.TypeInitializationException

2013-04-06 Thread Don V Nielsen
TY sir.  I'm going to be a much smarter developer when this is all said and
done.  I have lots to learn.  Is everything cool with sqlite and VS2012?
 I'm in the process of installing VS2012/Express on my 64bit laptop in an
effort to get my education started.


On Sat, Apr 6, 2013 at 4:18 AM, Bernd  wrote:

> Am 05.04.2013 22:19, schrieb Don V Nielsen:
>
>  Thanks for reading.  I am getting the following error moving a 32 bit
>> application from Windows Server 2003 to WS2008.  This is a straight copy
>> from one computer to another.  It runs fine on WS2003 and not so good on
>> WS2008.  The application was compiled with VS2005.  I do not have a
>> development environment on the WS2008.  I have not cleared licensing for
>> that, yet.
>>
>> I'm not a developer savant.  I can code in C#, assemble, and run things.
>>   I've been googling this issue, but do not really understand what I am
>> reading.  All of you rank pretty high on my rankings, so I thought I would
>> ask you all for help.
>>
>> Thanks for your time and consideration,
>> dvn
>>
>> Unhandled Exception: System.**TypeInitializationException: The type
>> initializer for 'CDG.AddAName.AAN' threw an exception. --->
>> System.**BadImageFormatException: Could not load file or assembly
>> 'System.Data.SQLite, Version=1.0.82.0, Culture=neutral,
>> PublicKeyToken=**db937bc2d44ff139' or one of its dependencies. An
>> attempt was
>> made to load a program with an incorrect format.
>> File name: 'System.Data.SQLite, Version=1.0.82.0, Culture=neutral,
>> PublicKeyToken=**db937bc2d44ff139'
>> at CDG.AddAName.AAN..cctor()
>>
>
> That looks a lot like your two systems do not have the same bitness. Could
> it be that your WS2008 is 64 bit? Have a look at
> https://system.data.sqlite.**org/index.html/doc/trunk/www/**downloads.wiki
> to resolve this issue.
>
> Bernd
> __**_
> 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] SQL Logic error or missing database

2013-04-06 Thread ibrahim

On 05.04.2013 17:01, Dan Kennedy wrote:

On 04/05/2013 09:08 PM, Rob Collie wrote:

Yeap, I'm on Visual Studio 2012. I've created a console app:


  sqlite3 *oDatabase;
  int returnValue;
  returnValue = sqlite3_open_v2("file://C:/Newfolder/testing.db",
&oDatabase, SQLITE_OPEN_CREATE, NULL);
  if (returnValue != SQLITE_OK )
  {
   //sqlite3_close(oDatabase);
   return returnValue ;
  }
  int anyKey;
  return 0;

It returns 21. Checking the other project, the open actually does 
return 21

too.


This one is returning SQLITE_MISUSE because the SQLITE_OPEN_READWRITE
flag is not being passed. It seems quite odd that the other code
would do the same though.





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


Thanks Dan I just copied and paste his code.

correction :

returnValue = sqlite3_open_v2 ("C:\\Newfolder\\testing.db", &oDatabase, 
SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, NULL) ;


and to make the test just more simple :

returnValue = sqlite3_open ("C:\\Newfolder\\testing.xyz", &oDatabase) ;

try the different file extension could be a problem on some systems.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL Logic error or missing database

2013-04-06 Thread ibrahim

On 05.04.2013 16:47, Rob Collie wrote:

sqlite3_open_v2("file://C:/Newfolder/testing.db",
> > > >& oDatabase, SQLITE_OPEN_CREATE, NULL);


Can you try :


returnValue = sqlite3_open_v2 ("C:\\Newfolder\\testing.db", &oDatabase, 
SQLITE_OPEN_CREATE, NULL) ;


Use double backslash also after "file://"

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


Re: [sqlite] SQL Logic error or missing database

2013-04-06 Thread ibrahim

On 05.04.2013 14:54, Rob Collie wrote:

Hello there,

For my sins, I'm trying to create a library allowing our legacy fortran
code to work with SQL.

Calling this from fortran...

CALL EXECUTESQL('dbTest'//CHAR(0), cQuery, iReturnValue)
...runs the following code, and yet the error returned is 'SQL Logic error
or missing database'. No file is ever created. Is there something dumb I'm
missing here?


extern "C"
{

  void EXECUTESQL(char *dataBase, char *query, int returnValue)
  {

   // Checking the incoming data from FORTRAN
   CStringW wName(dataBase);
   MessageBoxW( NULL, wName, L"Name: ", MB_OK );

   // Create the object
   sqlite3 *oDatabase;

   // Create the error objects
   char *sErrorMessage;
   // Open/create the table, if required
   returnValue = sqlite3_open_v2(dataBase, &oDatabase,
SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, "");
   if (returnValue != SQLITE_OK )
   {
sqlite3_close(oDatabase);
MessageBoxA(NULL, sqlite3_errstr(returnValue), "SQL Open Error", MB_OK);
return;
   }


Rob.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Can you change the file extension into something different ? "z45" as an 
example. Sometimes registered filetypes create issues on windows.



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


Re: [sqlite] Unhandled Exception: System.TypeInitializationException

2013-04-06 Thread Bernd

Am 05.04.2013 22:19, schrieb Don V Nielsen:

Thanks for reading.  I am getting the following error moving a 32 bit
application from Windows Server 2003 to WS2008.  This is a straight copy
from one computer to another.  It runs fine on WS2003 and not so good on
WS2008.  The application was compiled with VS2005.  I do not have a
development environment on the WS2008.  I have not cleared licensing for
that, yet.

I'm not a developer savant.  I can code in C#, assemble, and run things.
  I've been googling this issue, but do not really understand what I am
reading.  All of you rank pretty high on my rankings, so I thought I would
ask you all for help.

Thanks for your time and consideration,
dvn

Unhandled Exception: System.TypeInitializationException: The type
initializer for 'CDG.AddAName.AAN' threw an exception. --->
System.BadImageFormatException: Could not load file or assembly
'System.Data.SQLite, Version=1.0.82.0, Culture=neutral,
PublicKeyToken=db937bc2d44ff139' or one of its dependencies. An attempt was
made to load a program with an incorrect format.
File name: 'System.Data.SQLite, Version=1.0.82.0, Culture=neutral,
PublicKeyToken=db937bc2d44ff139'
at CDG.AddAName.AAN..cctor()


That looks a lot like your two systems do not have the same bitness. 
Could it be that your WS2008 is 64 bit? Have a look at

https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
to resolve this issue.

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