Re: MVPs, Points, OP, etc.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Olaf. :-)

Webbiz


"Schmidt" <sss@xxxxxxxxx> wrote in message
news:u4nA2ELwJHA.5392@xxxxxxxxxxxxxxxxxxxxxxx

"Webbiz" <nospam@xxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:e0oGl.48927$%k2.18383@xxxxxxxxxxxxxxx

On the puzzle of the 4 guys. Nothing was said about the
side guys "making fun".
Yep, but it was *also* not said, that they're behaving
"always seriously". <g>

And even if they did, if they lie, they lie, joke or no joke.
And we know whether they are lying if they say any reply
other than "truth-sayer".
This again assumes that the guy across the table can only
tell lies or tell truth and there is no "joking" in this equation. :-b
True of course - but if the guy across the table is the only one
with always the same habit, then what's the use of that
"knowledge", that one of the side-guys just told you a lie?

In that case you are not allowed, to conclude anything with
certainty from that small info-snippet - but the OP of the riddle
did that with:
"...but I do know which one of you is ..."

And that's simply just a speculation - the only allowed
conclusion would be: "...but I do know, which one of you
just told me a lie ...". And that's pretty much "Nothing" -
at least it does not allow you, to assume safely that
someone *is*...

This kind of puzzle often has the background-story:
There are three persons ... (the side-conditions follow) ...
...you are allowed, to ask each of the three persons
only one single question - after that you have to make
your final "dead-or-alive" kind of decision.

But I think, we should set a breakpoint now to this
topic - unless someone plans to come up with a class-
based VB-implementation <g> ... you know, that
cPerson-thingy, which implements ILiar or ITruthTeller ;-)

At least we came to a point, which "proved" another
"age-old thing":
That "communication works best, when it's precise". <g>

Somewhat more detailed background-infos to questions,
posted into the group are always a good idea - but those
are missed very often - hence the need of the regulars here,
to sometimes ask these "What do you really want to achieve...?"-
kind of questions.


Learning from stepping through code is a bit of a brain
smoker for me.
Maybe, but IMO it is the fastest method, to get used to
a new library - especially if a given code-example already
covers the "problem domain" of your real scenario somewhat
(your Meta-Stock-topic).

I've purchased several 3rd-party tools and if it were not
for the specific instructions and examples in their help files
I'd still be stepping through their code to learn it.
Also right - and I know that I have to do something more
regarding the documentation of the toolset, but at least a
simple class-view is now online at www.thecommon.net/3.html
But this has to be fleshed out much more over time of course.

-------------------------------------------------------------------------
Set Cnn = New cConnection
Cnn.CreateNewDB 'without filename creates an InMemory-SQLiteDB
-------------------------------------------------------------------------

Okay, so here we simply create a instance of cConnection and
reference it with Cnn.
This allows us access to all the methods in cConnection.

You remarked that "without filename creates an InMemory-SQLiteDB"?

Does this mean that my SQLiteDB database is stored in memory
only and will not reside in a file on the disk?
Yes.

If I had provided a filename, would it have created a file on the
hard drive and my database would be there instead?
Exactly.

A complete sequence, which would either create or "just open"
the DB would be:
On Error Resume Next
Cnn.CreateNewDB YourFileName
If Err Then 'DB-File already exists
Err.Clear
Cnn.OpenDB YourFileName
End If

And the table-creation-statement would have to be enhanced about:
Cnn.Execute "Create Table If Not Exists Master ...
To not throw an error at you, in case you opened an already
existing DB, which already contains this table.
These " If (Not) Exists " parts are really nice - and common
on many SQL-(DDL)Dialects (supported by different DB-
engines out there, though not on the JET-engine AFAIK).

Here is an example of where instructions would be useful.
...
It's pretty clear that this method takes a STRING that appears
to be in itself an instruction set.
...
...So what I can determine from this is that Cnn.Execute is
sending instructions to SQLite.

So then, I assume ... .Execute is one of the wrapper methods
that I would use to direct instructions to the 'wrapped'
SQLiteDB to create tables, etc.

Funny. When I first went over this it was a bit cloudy.
But placing it here and explaining what I think it is makes
it even more clearer for me. LOL!
:-)
So nothing to comment about that little sequence of your
posting I'd say. ;-)

And learning it "this way" is touching "more synapses" in your
brain IMO - you will not forget that fast, as if you read something
about "execution of DDL-staments over a Connection-Object"
somewhere in a book (compared with having real working code
in an easy to use IDE/Debugger).

QUESTION: Would it be the greater consensus here that I
should learn how to use SQLite for my particular VB6
database needs?
Don't know about the "consensus here" ;-) - but knowing about
SQLite - when used over ADO-like wrapper-classes would
teach you all the common things about the SQL- or the
usual DDL-queries, which are not that different from what
you'd have to write against other DB-Engines.
And the wrapper-classes are ADO-like - so if you know
them better after some time, you will have no larger problem
later on, when you want to use ADO instead within another
project where this is a requirement.
Nearly all "object-based" DataAccess-Layers have Connection-
Classes which support Execute-Methods - all have some
kind of ResultSet-encapsulation (Recordsets which contain
Move-methods) or Command-objects which support
parameter-based queries or DDL-statements.

So you will definitely not waste your time - and SQLite
(especially the InMemory-feature) is really nice - fast
and easy deployable.

QUESTION: Was your time trials examples demonstrating
that SQLite is faster than ADO/DAO or demonstrating that
your wrapper makes SQLite faster?
The engine itself (sqlite36_engine.dll) is already snappy - and
I've compiled it with the latest MS-C-Compiler with all suitable
"speed-options" - and BTW - the equivalent to it would *not*
be the ADO-Classes, but e.g. the JET-Engine-Runtime-Dlls
instead.

The equivalent to the ADO-Classes are my Wrapper-Classes
in dhRichClient3.dll.
And I'd say - the performance-advantage over ADO->JET
comes from both parts (dhRichClient->sqlite_engine).

E.g. the even greater performance-advantage in Read-Direction,
as soon as you switch on the CheckBox "act as in AppServer-
scenarios using disconnected Rs" - is mainly because of my
much faster working serialization-feature - and that is ensured
only within my wrapper-implementation.
When this switch is Off - then you compare more the engines
itself (JET-engine vs. SQLite-engine) - and the SQLite-engine
simply does also an awesome Job there - especially when
the queries get more complex (contain a lot of Joins) as for
example in the Invoices-View, which returns ca. 3 times as
fast - compared with JET (and ca. 6 times as fast, when
the CheckBox for disconnected mode is on).

If the former, then it would be a good idea I learn SQLite
before proceding further, right?
There's nothing wrong with that - especially since you
just start with SQL and classbased DataAccess-Layers.
Especially the InMemory-feature is very handy, if you just
want to play around with some SQL or want to develop/
test a small prototype - then you only need a DataGrid
on an empty form - and off you go...

But make sure, to try other DataLayers (ADO) and other
engines too after you got some experience with SQL -
and Connection and Recordset-Classes as well.

SQLite is in the meantime something like the "darling" of
the industry, when it comes to Desktop-DB-scenarios
(local storage handling in "offline-mode").
Nearly all non-MS-Browsers use it as their local engine.
http://www.sqlite.org/mostdeployed.html

The online-documentation is also *very* good - so with
regards to SQL as a language you should bookmark this
link here: http://www.sqlite.org/lang.html

If you become more familiar with the basic SQL stuff - and later
on run into more special problems (formulate more complex
queries, set the best suiting indexes, etc.) - here's the
forum, where you can ask this kind of questions (there are
the SQL-gurus, which know the engine exceptionally well):
http://news.gmane.org/gmane.comp.db.sqlite.general
It's a very friendly group - and Newbie-questions are no
problem there.

Olaf




.



Relevant Pages

  • Re: MVPs, Points, OP, etc.
    ... should learn how to use SQLite for my particular VB6 ... SQLite - when used over ADO-like wrapper-classes would ... When this switch is Off - then you compare more the engines ... just start with SQL and classbased DataAccess-Layers. ...
    (microsoft.public.vb.general.discussion)
  • Re: Databases - DAO and ADO
    ... the readme files (except the one I think is in German;) ... I was very impressed with the speed comparisions between the ADO and SQLite. ... The Example I've posted does work with Recordsets. ... SQL has a lot more to offer - so why not use that builtin ...
    (microsoft.public.vb.general.discussion)
  • Re: Is it just me, or is Sqlite3 goofy?
    ... be saying it has gasoline engine. ... SQL database, with an SQL engine. ... criticisms directed at SQLite. ...
    (comp.lang.python)
  • Re: SQLwaterheadretard3 (Was: Is it just me, or is Sqlite3 goofy?)
    ... thread who criticized SQLite. ... not a database, or not an SQL database, or other expletives. ... If you are too impatient to read the documentation, ...
    (comp.lang.python)
  • Re: Flat File or XML DOM?
    ... >Use of a DB is ruled out due to budget constraints. ... There are free db engines like SQLite and I would suggest you use some ... XML is not a replacement for DBMS. ...
    (microsoft.public.vc.language)