Re: [sqlite] How do I write this query

2013-04-29 Thread markus diersbock
Why are basic SQL questions being asked in the SQLite forum?



On Mon, Apr 29, 2013 at 5:06 PM, Igor Korot <ikoro...@gmail.com> wrote:
> Hi, ALL,
>
> CREATE TABLE foo( a integer, b integer);
> INSERT INTO foo VALUES( 1,1);
> INSERT INTO foo VALUES( 1,2);
> INSERT INTO foo VALUES( 1,3);
> INSERT INTO foo VALUES( 2,1);
> INSERT INTO foo VALUES( 2,2);
> INSERT INTO foo VALUES( 2,3);
>
> CREATE TABLE bar( a integer, b integer, c integer);
>
> INSERT INTO bar VALUES((SELECT a, b FROM foo),1); // fails
> INSERT INTO bar( a, b ) VALUES( (SELECT a, b FROM foo) ); //fails
>
> What is the correct syntax?
>
> Basically I need bar to have records from foo with field c to be 1, so:
>
> SELECT * FROM bar;
> 1 1 1
> 1 2 1
> 1 3 1
> 2 1 1
> 2 2 1
> 2 3 1
>
> Thank you.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 

Markus Diersbock
SwingNote
Marblehead, MA

C 781.929.0693
F 888.654.6068

This e-mail is intended solely for the person or entity to which it is
addressed and may contain confidential information. If you have
received this e-mail in error, please contact the sender immediately
and delete the material from any computer. Any review, dissemination,
copying, printing or other use of this e-mail by persons or entities
other than the addressee is prohibited.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [SQLite.Net] Right way to install precompiled binaries?

2013-04-18 Thread markus diersbock
Putting them in your /debug folder was just to troubleshoot.

Since it worked, you can move the files to any final folder, and add a
reference to System.Data.SQLite.dll

And add your folder to PATH, to find SQLite.Interop.dll

For the end-user you can keep it simple and put the files in the same
folder as the assembly.



On Thu, Apr 18, 2013 at 6:49 PM, Gilles Ganault <gilles.gana...@free.fr> wrote:
> On Thu, 18 Apr 2013 13:36:54 -0400, markus diersbock
> <mdiersb...@gmail.com> wrote:
>>Put SQLite.Interop.dll in the same folder as your VB assembly (ie
>>/debug or /release)
>
> Thanks for the tip.
>
> But it's kind of a pain to have to copy SQLite.Interop.dll +
> System.Data.SQLite.dll in \debug with every new project.
>
> Why can't we just keep the two files in a central directory, and just
> add a reference through "Project > Add Reference"?
>
> Since the static-bundle version allows this, what is the added value
> of the other two (bundle and no-bundle, with dynamic linking to the
> VC++ runtime)?
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 

Markus Diersbock
SwingNote
Marblehead, MA

C 781.929.0693
F 888.654.6068

This e-mail is intended solely for the person or entity to which it is
addressed and may contain confidential information. If you have
received this e-mail in error, please contact the sender immediately
and delete the material from any computer. Any review, dissemination,
copying, printing or other use of this e-mail by persons or entities
other than the addressee is prohibited.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [SQLite.Net] Right way to install precompiled binaries?

2013-04-18 Thread markus diersbock
Put SQLite.Interop.dll in the same folder as your VB assembly (ie
/debug or /release)


On Thu, Apr 18, 2013 at 9:22 AM, Gilles Ganault <gilles.gana...@free.fr> wrote:
> Hello,
>
> I'm having a problem getting VB Express to find SQLite .Net:
>
> 1. I went to...
> http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
> ... to download sqlite-netFx45-binary-Win32-2012-1.0.84.0.zip
>
> 2. Unzipped file in C:\Downloads\SQLite\.Net\1.0.84.0\
>
> 3. Launched VB Express 2010 to create new Windows Form project
>
> 4. Project > Add Reference: Navigated to
> "C:\Downloads\SQLite\.Net\1.0.84.0\" and pointed to
> System.Data.SQLite.dll
>
> 5. Wrote SQLite test code:
>
> Dim SQLconnect As New SQLite.SQLiteConnection()
> Dim SQLcommand As SQLiteCommand
>
> 'Note: Non-admin app cannot write to c:\
> SQLconnect.ConnectionString = "Data
> Source=c:\users\fred\test.sqlite;"
> SQLconnect.Open()
>
> 'SQLcommand = SQLconnect.CreateCommand
>
> 'SQLcommand.CommandText = "CREATE TABLE IF NOT EXISTS Item
> (type)"
> 'SQLcommand.ExecuteNonQuery()
>
> 'SQLcommand.CommandText = "INSERT INTO Item (type) VALUES
> ('something')"
> 'SQLcommand.ExecuteNonQuery()
>
> 'SQLcommand.Dispose()
> SQLconnect.Close()
>
> 6. Launched app: "Unable to load DLL 'SQLite.Interop.dll': The
> specified module could not be found. (Exception from HRESULT:
> 0x8007007E)"
>
> What is the right way to install SQLite.Net so that applications can
> find it?
>
> Thank you.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 

Markus Diersbock
SwingNote
Marblehead, MA

C 781.929.0693
F 888.654.6068

This e-mail is intended solely for the person or entity to which it is
addressed and may contain confidential information. If you have
received this e-mail in error, please contact the sender immediately
and delete the material from any computer. Any review, dissemination,
copying, printing or other use of this e-mail by persons or entities
other than the addressee is prohibited.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users