|
From: Eric S. <er...@gr...> - 2004-06-15 21:03:26
|
John,
Thanks for your help a few weeks ago. I have just gotten a sample =
program going on Mac OS X. I'll try embedding the framework in a little =
bit, but I am having another problem now...
If I try to programmatically create any table with >1 column, my call =
seems to go into an infinite loop within the Firebird library. Other =
calls works fine - creating and attaching to DBs, dropping existing =
tables, adding data to a multi-column table, etc. I can also create a =
multi-column table from iSQL, just not from my test app.
I pretty much copied the code from the api1.c sample file (except I =
changed the dialect parameter to 3):
int createTable(char *dbName, char *tableString)
{
isc_db_handle newdb =3D NULL; // database handle=20
isc_tr_handle trans =3D NULL; // transaction handle=20
ISC_STATUS_ARRAY status; // status vector=20
long sqlcode; // SQLCODE =20
//static char *create_tbl =3D "CREATE TABLE dbinfo (when_created =
DATE)";
//static char *insert_date =3D "INSERT INTO dbinfo VALUES ('NOW')";
if (isc_attach_database(status, 0, dbName, &newdb, 0, NULL))
if (pr_error(status, "attach database"))
return 1;
// Create a sample table.
isc_start_transaction(status, &trans, 1, &newdb, 0, NULL);
if (isc_dsql_execute_immediate(status, &newdb, &trans, 0, =
tableString, 3, NULL))
if (pr_error(status, "create table"))
{
isc_detach_database(status, &newdb);
return 1;=09
}
isc_commit_transaction(status, &trans);
isc_detach_database(status, &newdb);
return 0;
}
I call the app with something like:
createTable(dbConnectString, "CREATE TABLE dVARDATA(id INTEGER NOT NULL, =
data BLOB NOT NULL, deleted SMALLINT NOT NULL, PRIMARY KEY(id))");
Or
createTable(dbConnectString, "CREATE TABLE dVARDATA(id INTEGER NOT NULL, =
idd INTEGER NOT NULL)");
Anything besides
createTable(dbConnectString, "CREATE TABLE dVARDATA(id INTEGER NOT =
NULL)");
Makes it go into la la land.
Suggestions?
Thanks,
Eric
> -----Original Message-----
> From: fir...@li...=20
> [mailto:fir...@li...] On Behalf=20
> Of John Bellardo
> Sent: Tuesday, May 25, 2004 5:22 PM
> To: fir...@li...
> Subject: Re: [Firebird-devel] Mac OS X Support - Embedded and Other
>=20
> Eric,
>=20
> On May 25, 2004, at 11:32 AM, Eric Sword wrote:
>=20
> > My company is looking for a DBMS to use with our=A0commercial=20
> product.=A0=A0
> > It runs on Windows and Mac and requires both a regular DBMS=20
> (for the=20
> > server part) and an embedded DB (for the client part that is freely=20
> > distributed via the web and so must be small and easy to install).
> > =A0
> > I am looking for input from anyone who is using Firebird on=20
> Mac OS X=20
> > for either a commercial or a fairly heavy weight app.
>=20
> I don't use the MacOS version of Firebird in heavy weight=20
> apps, but I can provide some insight into its development.
>=20
> > I see that the Mac version of Firebird 1.5 is not=A0officially =
"done"=20
> > and that it hasn't been updated since last November, so I am a bit=20
> > worried about the overall support community for Firebird on OS X.
>=20
> I'm am the support community :-) Actually, there are a few=20
> users have had contact with over the years, but nothing=20
> recently. Perhaps they will come out of the woodwork to=20
> respond to you. As it stands I haven't had enough time to=20
> fully test a 1.5 build to the point where I feel comfortable=20
> releasing. About once a month or so I get a build done, but=20
> I never feel comfortable releasing an untested build. I=20
> don't know when I'll get to releasing a 1.5 build. It=20
> depends on my free time, which is fairly small right now.
>=20
> > =A0
> > I am also interested in if anyone has attempted to build an=20
> embedded=20
> > version of Firebird on OS X?=A0 I have found a thread from=20
> someone who=20
> > has done this for Linux - basically tweaking some build files -
> > http://sourceforge.net/mailarchive/message.php?msg_id=3D7096578
> > =A0
> > Can=A0anyone shed light on if this would be straightforward=20
> on Mac, or=20
> > if there are any plans to do it?
>=20
> I don't plan to support an "embedded" version as you find on=20
> the Windows platform. But, due to Firebird's packaging as a=20
> framework for OS X, it should be trivial to embed it in your=20
> application. You need to include the entire framework inside=20
> your .app (I don't know the directory structure off the top=20
> of my head, but I'm sure Apple has docs that tell you how to=20
> do it). The trickiest bit is the var folder buried inside=20
> the framework. The user needs write access to it because=20
> that is the default location for the log and lock files. I=20
> would suggest using a SS framework, because that only=20
> contains the remote client code and not the DB engine itself.=20
> Then you could change the default log file location (perhaps=20
> there is a config setting for this
> already?) and not worry about var being writable at all. You=20
> would also want to strip out all the executables,=20
> documentation, examples, and the other junk that would just=20
> be wasting space.
>=20
> Hope this helps.
>=20
> -John=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g Get certified=20
> on the hottest thing ever to hit the market... Oracle 10g.=20
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
> Firebird-Devel mailing list, web interface at=20
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>=20
>=20
|