built Windows binaries to generate C++ code for manipulating SQLite 3
databases. Hopefully some of you will find it useful.
The code and more information is available at
http://www.ceamus.com/objbuilder/
Clay Dowling
--
CeaMuS, Simple Content Management
http://www.ceamus.com
you then perform the updates based on your cached data.
Clay Dowling
--
http://www.lazarusid.com/notes/
Lazarus Notes
Articles and Commentary on Web Development
n great detail. Even after implementing this kind of
structure before I wouldn't try it again without consulting Selko's book.
Clay Dowling
.EnumCol) = 0 begin
>select raise(rollback, 'foreign-key violation: MainTbl.EnumCol');
> end;
That's a lot more elegant than what I had envisioned, which was a static
list of values. Don't forget though that you'll also need to write an
update trigger,
e as a
language enum where that's possible (I'm not sure if PHP handles enums).
Clay Dowling
--
Simple Content Management
http://www.ceamus.com
John,
There's a package often found in the discount aisles of computer stores
called My Database. My father (who doesn't pretend to know anything about
databases or programming) uses it for his business and personal uses. The
tool looked absolutely brilliant from the perspective of making it eas
e a full literature search on this matter so I
can't really say that this would be breaking new ground.
Clay Dowling
nation of libxml2 and libxslt to generate your output. I've used
both solutions to generate output for high-volume web apps.
Clay Dowling
--
Simple Content Management
http://www.ceamus.com
Brad DerManouelian said:
> I was looking for something aggregateder. I've been scared to read email
> lists until now because of how unsafe it is. Just gotta figure out how I
> upgrade the internet to 2.01. I hope it comes with AJAX.
If you get the Web 2.01 upgrade pack, I think they throw AJAX i
w that we rate highly with the web 2.01 crowd,
as web 2.0 was so passe. Tell me, does this mean that we're also
exploiting the power of Ruby On Rails? Also, how will XML and XSLT
transforms be used?
Clay Dowling
former management consultant
--
Simple Content Management
http://www.ceamus.com
Try opening it with an sqlite3 client as well. If neither will open the
file, it's either not an SQLite database, or it's hopelessly corrupted and
you aren't getting into it.
Clay Dowling
Manuel Enache said:
> I'done like Shawn said and here is the result:
>
>
imary key. If you do that you'll get auto incrementing keys
by default. If you tack auto_increment on to it you'll get slightly
different behavior in the selection of keys.
Clay Dowling
not the one
who will be writing the SQL that gets passed to the engine, but if you'll
be writing all of the SQL yourself, you can avoid the problem by not doing
something that you know shouldn't work.
Clay Dowling
--
Simple Content Management
http://www.ceamus.com
fference between driving a nice comfortable Ford
Taurus (Delphi) and a BMW Z3 with a stick shift (if you haven't done it,
do: you probably never realized that driving could be so fun). I like
driving both. But there are certain situations where one is a lot better
than the other, as I'm su
> .quit
bash$
That should probably take care of you.
Clay Dowling
Tero Vihavainen said:
> yes I'm newbie ... :)
>
> ** clip ***
>
> [EMAIL PROTECTED]:/public$ ./sqlite3-3.2.7.bin
> SQLite version 3.2.7
> Enter ".help" for instructions
> sq
Edward Wilson said:
> What is the best approach to concurrency in this scenario?
>
Don't choke when you get a SQLITE_BUSY error. Just wait and try again in
a second or so.
Clay Dowling
--
Simple Content Management
http://www.ceamus.com
Dave Dyer said:
>
> If I designed a sqlite database to be used by a bunch of independent
> applications, for example a bunch of CGI scripts each of which
> opened the database, did some processing, and exited, would
> that be (a) safe (b) effecient ?
It's very safe. My own product does that (see
the future, no matter what SELECT 5/2 returns in its result set.
Clay Dowling
--
CeaMuS, Simple Content Management
http://www.ceamus.com
anguages like C, Pascal and BASIC are really good and handling
arithmetic. Likewise, SQL and database engines are really good at data
storage. So when you need to divide 5 by 2, it probably makes a lot of
sense to do that in C/Pascal/BASIC than in SQL. And sure, there's cases
where you can't avoid it. But usually you can.
Clay Dowling
--
Simple Content Management
http://www.ceamus.com
easonably happy with the
result. Fair warning though that I'm not exactly a .NET power user, so
what was acceptable to me may be a steaming pile to you.
Clay Dowling
--
Simple Content Management
http://www.ceamus.com
be matched, using a native
DLL is clearly not a good solution for the original poster. It does
completely defeat the compile once run anywhere goal of Java. Presumably
if he was willing to accept platform lock-in he would just write the app
in C++ and be done with it.
Clay Dowling
--
Simple Content Management
http://www.ceamus.com
orm, where the computer and the user
have a different idea of what the primary key is, and the user's key has
a uniqueness constraint upon it. I understand that this doesn't fly
well with some DBAs. I'm not a sophisticated enough designer to
understand their objections, but the design works well enough for my
purposes.
Clay Dowling
Jim McNamara said:
> i dont see many webhosts that advertise sqlite
> availability. are webhosts excluding support for
> sqlite for any reason
> i.e. is it a security concern?
> it is suppose to be an internal extension. i am not
> sure what that means yet.
Because SQLite doesn't have a databa
ut #define are malarkey and
only relevant to win32 programmers. They have a notion of private and
public members for shared libraries that doesn't apply in the UNIX world.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
ts
which don't release source code Sleepycat is rather expensive. Speaking
as a program it has also not been my favorite database for administration
issues.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
tion users) that you might instead be in need of a
high availability client/server database model. PostgreSQL fares very
well in this category, or some of the heftier commercial database
offerings.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
, because they can afford to fight the case. If your company is that
size, you should be fretting the matter with your lawyers, not a mailing
list.
My advice? Stop fretting and get on with using this great little
library. There's a lot more profit in that than there is in worrying
abo
Chad Whitacre said:
> My personal favorite non-copyleft license is the "beer-ware license," as
> used by, e.g., Poul-Henning Kamp:
>
>http://people.freebsd.org/~phk/ [note: find 'Beerware']
That is a beautiful license. I'm for anything that gets me a
prepare
once at program initiation and refer back to each time it is needed.
Just remember to reset the statement after each query execution. For
more complex logic you can couple this trick with functions that choose
which query to execute.
Clay Dowling
--
http://www.lazarusid.com/notes/
L
themselves
to that discipline which I suggested in an earlier message, principally
that we don't expect SQLite to cover for our own inconsistencies in column
naming. The discipline is fairly simple and I heartily encourage you to
submit to it.
Clay Dowling
--
Lazarus Notes from Lazarus I
me word in different case as being the same, it seems
perfectly reasonable not to get into a situation where that is necessary.
If you find that this conformity is too restrictive, the libc implementers
have graciously provided strcasecmp(3).
Clay Dowling
--
Lazarus Notes from Lazarus Internet Developm
James Berry wrote:
It would be useful to use bound parameters in such cases.
Might it make sense to coerce the value at runtime into a string
value in such a case? I believe a similar restriction (ticket #1096:
limit and offset) was recently lifted to allow bound parameters in
those cases, wh
Mahendra Batra said:
> Someone, plz tell me how could i embed SQLite. I included sqlite.h but
> getting unresolved errors i.e the definition of functions like
> sqlite3_open(..) and sqlite3_exec(..) can not be found.
> Please favor me as soon as possible.
In general the actual error messa
d in a
RAID 1 configuration.
As a confirmed OpenBSD devotee these numbers make me very happy. I use
it for the security, but I can see that there are good performance
reasons as well. I guess we know where the app should run if they need
that kind of performance.
Clay Dowling
--
http://www.lazaru
jack wu said:
> i did not find the length limitations in the
> documentation but seems like TEXT can only hold less
> than 250 chars. is it true or is it SqliteExplorer
> that only shows 250 chars. Thanks.
That's not a limitation of SQLite. I'm regularly storing strings larger
than that in a TEX
in that field. For
SQLite programmer's that size is a combination of habit and reference. By
looking at the number in the schema I have a reminder for how large I
intend to make that field in my program.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Bill Henderson said:
> I have the Dev-Cpp IDE installed and have successfully compiled and
> linked
> several test programmes and am satisfied that dev-cpp is functioning
> correctly.
Bill,
You need to generate the libsqlite3.a library, which you can do with
dlltool. I don't remember the synta
only
implement the forward only, read only recordset model, since that's what's
actually supported by the library (and most actual DB interfaces, to be
honest).
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
won't be
sufficient. It would be a trivial matter to modify the library source to
bypass asking for the password. Encryption of the file is the only
solution, and that can be purchased.
Clay Dowling
Iulian Popescu said:
> Hi,
>
> Would someone please explain me the semantics of this function? I've
> tried:
>
> SELECT quote('AAA'') AS value
>
> And it returns the following error:
>
> Error: near "": syntax error (1)
Try SELECT quote('AAA\'') AS value
Not sure what purpose this fu
in the database, since a
problem with the Windows implementation of the hash was my first suspect.
Has anybody else experienced problems like this? Part of my interest in
composing a static library is that I suspect that it will be a better
match for my build system (gcc 3.4), which might reduce some problems.
Clay Dowling
o share their trick with
this poor benighted soul? I've got the 3.2.0 source.
Clay Dowling
--
http://www.lazarusid.com/notes/
Lazarus Notes
Articles and Commentary on Web Development
t including the
terminating NULL. That's what sqlite3_prepare() is expecting.
I'm glad that my article was of some use to you in using the
sqlite_prepare() interface.
Clay Dowling
--
http://www.lazarusid.com/notes/
Lazarus Notes
Articles and Commentary on Web Development
Marco Bambini said:
> we have develop an SQLiteServer on top of sqlite3 (and sqlite2)
> database engine.
> Our requirements was robustness and a reasonable fast solution to be
> able to serve a large amount of concurrent connections.
> The server will be available in few days, when we'll finish
rev=1.3&content-type=text/x-cvsweb-markup
These two examples show how to do it very easily in C++.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
aleks ponjavic said:
>>From the quick start I've learned how to manipulate a db file but this is
> one created from dos shell.
> Since my program uses databases, when a user creates a new file a new db
> should also be created how can I do this from within the program?
>
sqlite3_open(filename, &d
ndates the
> presence of the T.
strftime(buffer, size, "%Y-%m-%sT%H:%M:%S", now);
SOAP uses the same format for date/time information, and I've been neck
deep in SOAP for the last few weeks.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
D. Richard Hipp said:
> As currently implemented, there is no fixed limit to the number
> of columns you can put in a table in SQLite. If the CREATE TABLE
> statement will fit in memory, then SQLite will accept it. Call
> the number of columns in a table K. I am proposing to limit the
> value o
e, at least
in SQLite and MySQL. Many DB systems do allow NULLs in the primary key,
even if that's not strictly to the standard. Heaven help the poor souls
who do put NULLs in the primary key, but some systems assume that you know
what you're doing.
Clay Dowling
--
Lazarus Notes from Laza
n and your table has deleted records. It's generally not a problem
if your app is good about maintaining referential integrity, but if you've
been slack it can cause some interesting behavior.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/no
your
language's built in facilities for generating formatted text are strongly
to be preferred.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Eli Burke said:
> So, I was wondering if any of the more opinionated among you would care
> to suggest an interface language. It'll be on a Linux box, presumably
> running apache although I'm open to alternatives. The app itself uses
> sqlite3 for scheduling jobs and storing job data, so the web
Jay said:
> I used cgicc.
> It's good workable code, but it's a pain sometimes to understand!
Agreed. In fact I use cgic in either C or C++, since it's easy to use.
The licensing is agreeable too, since even a commercial license is very
inexpensive.
Clay
--
Lazarus Notes from Lazarus Interne
Darren Duncan said:
> One caveat of languages like C and C++ is that you are opening
> yourself to several classes of potential security problems that
> interpreted languages tend not to have.
You are opening yourself to such problems only if you do something rash
like try to write your own CGI
or CGI development. He's right, but I still found
it humorous given the juxtaposition.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
new features such
as the previously mentioned true ALTER TABLE syntax than chasing down bugs
that allow people to support dodgy SQL.
For those of you having the problems with loading data into a hash, feel
free to contact me off-list and I'll help you get around the problem. The
solution
D. Richard Hipp said:
> On Mon, 2005-02-28 at 11:12 +0200, Cariotoglou Mike wrote:
>> I understand that this "column names" issue is becoming a pain for the
>> sqlite authors, but OTOH, it is very important for wrapper authors...
>>
>
> Why? Why does anybody care what the column names in the resu
money.
Clay Dowling
;t
have a reputation for fast code at all, and I've had a few ugly run-ins
with it in the past. There are some people here who use it though, so
maybe they'll be good enough to give it a whirl for us.
Clay Dowling
Jakub Adamek wrote:
select * from a inner join b;
Just as a general guide with any database system, this type of query
isn't particularly recommended because of the namespace issue. Here's
what I do to get around the problem (again, not just with SQLite):
1. Specify the criteria for the join
Ulrik Petersen wrote:
I have a copy of libobjc.a in cygwin/lib/mingw and copied it to
c:/dev-cpp/lib/gcc/mingw32/3.4.2 as lobjc.a
but this is not working
Unless your Cygwin version of libobjc.a is exactly the same as the one
that comes with dev-c++, I suspect this may not be a good idea.
Perh
Luc Vandal said:
> Today a user told me that everything was fine yesterday and since today he
> can't write to the database. What could cause that? The software closes
> the
> database on exit. I guess that the db is busy but what could cause the db
> to
> be busy for a large amount of time?
You
r just Company and Contact. Spaces in table names require some
variety of quoting or escaping, or they'll be interpretted as separate
strings.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Luc Vandal said:
> The database is stored in the [User]\Local Settings\Application Data\
> folder
> for the current user.
In that case it's worth looking at the folder and the file and making sure
that both have write permission for the user in question. This isn't
terribly easy to do if your us
plication Data under windows or your app's folder under
their home directory. I spent a lot of time beating my head against the
wall over this same issue, so hopefully my pain will save you some.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Ned Batchelder said:
> That's not "good database design", it's relational dogma.
You are correct, it is indeed relational dogma. My appologies, it's
merely a knee-jerk response from having to support a legacy database
that's not going away for many years that was designed by relational
heretics.
and reference the polygon primary key:
Create the second table. There shouldn't be any question about this.
That's just good database design.
Clay Dowling
Opinionated Programmer
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
[EMAIL PROTECTED] wrote:
Do you know if this bug exist in 2.8.15 as well? If so, is the fix
back-portable?
Darrell,
I believe that the VACUUM statement didn't exist in 2.8.x, so there
shouldn't be a problem.
Clay
Yasuo Ohgaki said:
> http://www.ohgaki.net/download/speedtest.html
> http://www.ohgaki.net/download/speedtest-pgsql-nosync.html
The tests were very interesting. Based on what I see in those reports,
any one of the three should be suitable for most tasks, with the engine
chosen based on the feat
[EMAIL PROTECTED] said:
> Which API calls would be required for a complete assessment of readiness?
> Would sqlite3_busy_handler be a candidate? I presume callbacks would be
> involved as well.
There is no need to test for readiness. There are two different
interfaces to the database, either sq
ould be a good bet. It you're willing to risk
partially incomplete data, smaller transactions for single tables are
suitable and probably provide a better backup of your data. For that
matter, simply copying the file is often suitable. With a compression
utility you can even make a relatively
//www.jelliclecats.net/Lyrics/pollicles-ing.htm) will be portrayed
by
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
raight forward to me, but I suspect that you misread
the documentation your first time through. It's happened before in this
very office.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
[EMAIL PROTECTED] said:
> I have run into problems trying to use SQLite via perl DBA.
> According to the SQLite.org web site, DECLARE CURSOR should be supported
> (actually, it is not in the list of the only SQL not supported).
> I get a error saying "error near DECLARE". I have tried to declare
ter, or you could dump as HTML, view in a browser and send
that to a printer.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Drew, Stephen said:
> Yet Starteam (version control system) is still interfering with the file
> - causing unexpected errors while the application is running. Is this
> because the locking in Windows is below-par in comparison with the Unix
> locking? The thing is that Starteam is not even inter
g of the SQL statements until they're completed. That should be
a good start to get you going. If you're using another language you'll
have to do the translation yourself.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
ifically to your application.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Alex Chudnovsky said:
> I am using ADO .NET wrapper
> (http://sourceforge.net/projects/adodotnetsqlite/) and I am not sure
> if I can just "drop in" new .DLL -- the wrapper was not updated for a
> while now :(
I feel moderately bad about that, because I have recommended that
particular wrapper in
Alex Chudnovsky said:
> Today I had database corruption (running v3.0.7 on Windows using ADO
> .NET's data providers + my
Alex,
You might try 3.0.8, which is the current stable release from the 3.0
branch. It's entirely possible that you encountered something that was
addressed
okay with SQLite, just because it's fast and very
efficient. That will probably change if most of the clients are
writing, or even if a high enough percentage are writing. Because of
SQLite's very coarse-grained locking, writes on a busy database can be
problematic.
Clay Dowling
Gwendolynn ferch Elydyr wrote:
I seem to recall that there was a significant performance difference
between using sqlite3_exec vs prepared statements. You might try
using sqlite3_prepare/bind/finalize.
I would add that you need to do all of your database retreiving before
starting the updating.
on
Windows and I86 hardware. It's also highly likely that you were running
on faster hardware, as others have mentioned.
Clay Dowling
David Maass wrote:
unfortunately the "encrypt database" feature is a bit expensive for a
freeware fun project, are there other ways to prevent ppl from reading
the database?
What about using a cryptoAPI (for example the microsoft one), and do
some symetric encryption in the program before storing t
result set to a file
using the facilities of the programming language. The approach you're
trying is to use the features of the sqlite shell rather than the features
of the sqlite database. PHP doesn't give you access to the shell, only
the database.
Clay Dowling
--
Lazarus Notes from
describing, but
if all you need is Delphi access I highly recommend the Zeos Database
Objects at http://www.zeoslib.net. The latest beta is SQLite capable, at
least for SQLite 2.8.x
Connecting through ODBC via ADO just seems like way too many layers to be
comfortable.
Clay Dowling
--
Lazarus Notes
Christian Kienle said:
> I would like to write an app with C++ which uses sqlite.
> We will soon have a windows network here. Is it possible to place the
> sqlite database files on one server and to let the client apps access
> the sqlite db file through a windows share which is "mounted" like a
>
The problem you were experiencing and not seeing is that in Visual Basic,
inside of quotes, "" is not an empty string but a single " character.
Thus you don't have a State fields but a BillingNumber field with a
default value of ' not null State varchar(20) default '. That's probably
not what you expected.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
on these going forward? Personally
I love them, as it beats saving everything in some language proprietary
format, such as long integer for C or Doubles for Delphi.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
t with Apache in a chroot environment. IIS does
all kinds of crazy stuff with folder locations. You'll need to figure out
exactly what's going on with your paths.
If its not your paths, I'm afraid I'm all out of good options. You might
check library versions, but I'm assumi
Steven Lloyd said:
> I have been using SQLite successfully for quite some time. I recently
> installed it on a friends server in order to use it there.
>
> While I am able to access the db file just fine when I run my perl script
> from the shell prompt I get the following error when trying to ru
to write a Delphi
interface to SQLite myself, and I can send you the Pascal unit and a
short example off list.
Clay Dowling
It
might be worth your while to do that, since you'd have a lot more control
over your interaction.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Antonio Coralles said:
> how can i get the output which will be produced by sqlite>.tables from a
> sqlite_exec call inside my programm ?
> (i'm using sqlite 2.8.14)
It won't get you the same output as .tables, but take a look at the pragma
commands, which will get you all the metadata that you c
line
should work the best:
sqlite test.db < query.txt
These operators are important to understand if you're going to be doing
this kind of scripting.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
Tomas Franzén said:
> On 2004-11-09, at 16.42, b.bum wrote:
>> Are you statically linking SQLite or using a dylib?
>
> I don't know. That's not a good sign, is it? ;-)
> I have compiled SQLite and added libsqlite.o and sqlite.h to the
> project items in XCode.
ldd is your friend here. It will sh
Richard Boehme said:
> This is an extreme case -- records would usually be updated every minute
> or so. Usually there might be 10 computers trading information (about
> 100 records every few minutes), for example. I was extrpolating an
> extreme test case where the system is very heavily used.
>
Richard Boehme said:
> Hi there. How well does SQLite do in a client/server environment where
> the SQLite database is handling a batch of 100 inserts and the same
> number of queries a every 0.5 seconds? The inserts would be batched into
> a transaction. The queries would most likely not.
I'm no
Srinivas Koppisetti said:
> Hi,
> Has any one tried to use V2.76 database files with 2.85 binary on solaris.
> Are there any known issue in doing so?
>
> I am trying to upgrade my binary to 2.85 or latter. Any info about this is
> great..
I don't know about file level compatibility, but the upgra
ve a similar application to transfer a 2.5 MB paradox
database. It took hours before I added the transaction, and minutes
after.
Clay Dowling
--
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development
101 - 200 of 209 matches
Mail list logo