Re: [sqlite] Looking for SQLite schema doc generator (in

2015-02-03 Thread Drago, William @ CSG - NARDAEAST
I was just about to post a link to this. I am still using it. Handy tool, it 
does a great job with the HTML doc.

--
Bill Drago
Senior Engineer
L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com


> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Erik Ejlskov Jensen
> Sent: Tuesday, February 03, 2015 12:11 PM
> To: rsm...@rsweb.co.za; gerald.ba...@gmail.com
> Cc: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Looking for SQLite schema doc generator (in
>
> You can use my Visual Studio addin: SQLite Toolbox to do this:
>
>
> http://erikej.blogspot.dk/2014/08/sqlite-toolbox-40-visual-guide-
> of.html
>
>
>
>
>
>
>
>
> Sendt fra Windows Mail
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] pre-loading with nuget fails to copy SQLite Interop Library

2014-12-16 Thread Drago, William @ CSG - NARDAEAST
There were changes to the NuGet packages in 1.0.94 that may have something to 
do with what you're experiencing. Also, it looks like there are some NuGet bug 
fixes scheduled for the next release. I am using 1.0.94 Core with no issues 
(the x86/64 folders and interop files are copied to the bin folder and all 
works as it should).

See:
http://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki

--
Bill Drago
Senior Engineer
L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com


> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of defelix72
> Sent: Tuesday, December 16, 2014 5:57 AM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] pre-loading with nuget fails to copy SQLite Interop
> Library
>
> Hi all,
> I have a project in .net 4.5, I have been using System.Data.SQLite.Core
> assembly 1.0.86.0 from nuget  with the preloading native library
> feature that copied in the folders x64 and x86 the corrensponding
> SQLite Interop Library.
> Now I would like to do the same with the latest packages from nuget,
> but the sub folders, x64 and x86, are not created and so no SQLite
> Interop Library gets loaded in the project.
> Am I doing something wrong?
> Has the process of installation from nuget changed with the latest
> versions?
> thanks in advance for your support
> Luca
>
>
>
> --
> View this message in context: http://sqlite.1065341.n5.nabble.com/pre-
> loading-with-nuget-fails-to-copy-SQLite-Interop-Library-tp79658.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
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Table names length and content

2014-12-08 Thread Drago, William @ CSG - NARDAEAST
That's a relief. I thought I was doing something wrong.

Thanks,
--
Bill Drago
Senior Engineer
L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com



> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Stephan Beal
> Sent: Monday, December 08, 2014 1:41 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Table names length and content
>
> On Mon, Dec 8, 2014 at 7:37 PM, Drago, William @ CSG - NARDAEAST <
> william.dr...@l-3com.com> wrote:
>
> > Uh oh! I never use quotes when I create my tables. What are the
> > implications of not quoting?
> >
>
> If you restrict yourself to C-style identifiers, the primary
> implication is better ease of use and readability! ;)
>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> "Freedom is sloppy. But since tyranny's the only guaranteed byproduct
> of those who insist on a perfect world, freedom will have to do." --
> Bigby Wolf ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Table names length and content

2014-12-08 Thread Drago, William @ CSG - NARDAEAST
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Richard Hipp
> Sent: Monday, December 08, 2014 1:28 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Table names length and content
>
> On Mon, Dec 8, 2014 at 1:22 PM, jose isaias cabrera
>  > wrote:
>
> >
> > "Stephan Beal" wrote...
> >
> >  On Mon, Dec 8, 2014 at 6:32 PM, jose isaias cabrera <
> >> jic...@cinops.xerox.com
> >>
> >>> wrote:
> >>>
> >>
> >>  When creating table names, are there any constraints that one must
> >> look
> >>> for? ie. Length? Characters? etc.?  I quickly browse through this
> >>> spot,
> >>>
> >>> https://www.sqlite.org/lang_createtable.html
> >>>
> >>
> >>
> >> https://www.sqlite.org/limits.html
> >>
> >> might have what you're looking for.
> >>
> >
> > Hmmm... what I am looking for it is not there.  If the "string
> length"
> > defined there is what defines the length of the name of a table, I am
> > in business. :-)  However, there is nothing about problematic
> characters. ie.
> > <>!@#$%^&*()_+=-{}\|[]'";:?/.,, etc., etc. in the table name.
> >
> >
> Put the table name in double-quotes.

Uh oh! I never use quotes when I create my tables. What are the implications of 
not quoting?

-Bill
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to check if a record exists

2014-11-05 Thread Drago, William @ CSG - NARDAEAST
Cool website, James. I bookmarked it for future reference.

Thanks for your help, it will come in handy...

--
Bill Drago
Senior Engineer
L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com



> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of James K. Lowden
> Sent: Tuesday, November 04, 2014 6:23 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to check if a record exists
>
> On Tue, 4 Nov 2014 21:47:20 +0000
> "Drago, William @ CSG - NARDAEAST" <william.dr...@l-3com.com> wrote:
>
> > I've been pulling my hair out trying to figure how to use EXISTS.
>
> I have several examples at
> http://www.schemamania.org/sql/#missing.table.
>
> > Is there a better/recommended way in SQLite to check if a record
> > exists?
> >
> > static bool IDisDuplicate(string dbFileName, int id)
>
> Yes.  Assert, don't check!
>
> Your function is checking for duplicates.  I could be wrong of course,
> but I suspect that you're checking for duplicates to do something about
> it in the database.  If so, between the time you check and the time you
> "do something" that duplicate could have gone away and another arisen.
> Cache coherency folks call that a write-after-read error.
>
> The way to avoid that is to put everything on the broad shoulders of
> SQLite, viz,
>
>   insert/update/delete T as t
>   -- ... --
>   where exists (
>   select 1 from T
>   where something = t.something
>   group by something
>   having count(*) > 1
>   );
>
> HTH.  Exists is confusing at first, and consequently under-appreciated.
>
> (BTW, I dis duplicates, too.  Despise them, in fact.)
>
> --jkl
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to check if a record exists

2014-11-05 Thread Drago, William @ CSG - NARDAEAST
This is exactly what I was looking for. It works perfectly.

Thanks,
--
Bill Drago
Senior Engineer
L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com



> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Igor Tandetnik
> Sent: Tuesday, November 04, 2014 5:49 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to check if a record exists
>
> On 11/4/2014 4:47 PM, Drago, William @ CSG - NARDAEAST wrote:
> >  "SELECT count(1) DatasetID FROM UUT_Info
> > where DatasetID = " + id + ";";
>
> You could do
>
> select exists (select 1 from UUT_Info where DatasetID = :id);
>
> This returns 0 or 1 (record absent/present). May work faster than the
> variant using count() if there are many records satisfying the
> condition (EXISTS stops as soon as it finds the first matching record),
> but that may not be a consideration in your case (DatasetID sounds like
> primary key).
> --
> Igor Tandetnik
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to check if a record exists

2014-11-05 Thread Drago, William @ CSG - NARDAEAST
Thanks for the reply, Darren. No need for parameters here. There's no risk of 
SQL injection attacks and speed is not a concern.

Thanks again,
--
Bill Drago
Senior Engineer
L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com



> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Darren Duncan
> Sent: Tuesday, November 04, 2014 4:59 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] How to check if a record exists
>
> If all you want to know is whether a record matching a particular field
> value exists, then what you did is appropriate.  The EXISTS construct
> is generally for filtering one table with another.  That being said,
> you should be using bind parameters rather than stitching id into the
> SQL string itself, as that practice generally leads to huge security
> problems / SQL injection (although if your language is strongly typed
> an int wouldn't do it, but a string would). -- Darren Duncan
>
> On 2014-11-04 1:47 PM, Drago, William @ CSG - NARDAEAST wrote:
> > All,
> >
> > I've been pulling my hair out trying to figure how to use EXISTS.
> I've had no luck with it (syntax errors) and I've resorted to this. Is
> there a better/recommended way in SQLite to check if a record exists?
> >
> >
> > static bool IDisDuplicate(string dbFileName, int id)
> >  {
> >  int count;
> >  string connectionString = String.Format("Data
> Source={0}", dbFileName);
> >  using (SQLiteConnection connection = new
> SQLiteConnection(connectionString))
> >  {
> >  using (SQLiteCommand command =
> connection.CreateCommand())
> >  {
> >  connection.Open();
> >  command.CommandText =
> >  "SELECT count(1) DatasetID FROM UUT_Info
> where DatasetID = " + id + ";";
> >  count =
> Convert.ToInt32(command.ExecuteScalar());
> >  }
> >  }
> >
> >  if (count > 0)
> >  {
> >  return true;
> >  }
> >  else
> >  {
> >  return false;
> >  }
> >  }
> >
> >
> > Thanks,
> > --
> > Bill Drago
> > Senior Engineer
> > L3 Communications / Narda Microwave
> > East<http://www.nardamicrowave.com/>
> > 435 Moreland Road
> > Hauppauge, NY 11788
> > 631-272-5947 /
> > william.dr...@l-3com.com<mailto:william.dr...@l-3com.com>
> >
> >
> > CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and
> any attachments are solely for the use of the addressee and may contain
> information that is privileged or confidential. Any disclosure, use or
> distribution of the information contained herein is prohibited. In the
> event this e-mail contains technical data within the definition of the
> International Traffic in Arms Regulations or Export Administration
> Regulations, it is subject to the export control laws of the
> U.S.Government. The recipient should check this e-mail and any
> attachments for the presence of viruses as L-3 does not accept any
> liability associated with the transmission of this e-mail. If you have
> received this communication in error, please notify the sender by reply
> e-mail and immediately delete this message and any attachments.
> > ___
> > 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
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] How to check if a record exists

2014-11-04 Thread Drago, William @ CSG - NARDAEAST
All,

I've been pulling my hair out trying to figure how to use EXISTS. I've had no 
luck with it (syntax errors) and I've resorted to this. Is there a 
better/recommended way in SQLite to check if a record exists?


static bool IDisDuplicate(string dbFileName, int id)
{
int count;
string connectionString = String.Format("Data Source={0}", 
dbFileName);
using (SQLiteConnection connection = new 
SQLiteConnection(connectionString))
{
using (SQLiteCommand command = connection.CreateCommand())
{
connection.Open();
command.CommandText =
"SELECT count(1) DatasetID FROM UUT_Info where 
DatasetID = " + id + ";";
count = Convert.ToInt32(command.ExecuteScalar());
}
}

if (count > 0)
{
return true;
}
else
{
return false;
}
}


Thanks,
--
Bill Drago
Senior Engineer
L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com


CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users