Just wondering if there is a way to prevent the sqlanywhere icon from appearing in the taskbar on windows when using the dbcreate capi function?
For bonus points (:P). Is there a way to specify the ENG parameter for the dbcreate call to specify a unique dbeng12 instance for the database creation. We have a bunch of unit tests that create databases and when there are multiple builds running the database creations get tangled up and fail. We have a workaround for this issue so it isn't critical, just annoying...
The easiest way to direct database creation to a particular server is to connect to the server then use a CREATE DATABASE statement. The DBTools interface predates the existence of a CREATE DATABASE statement and nowadays just builds such a statement and sends it to a database engine. Remember that you can't ask a running server to create a database with a page size that is larger than the server's cache page size.
Alternatively, note that dbinit in the dbtools interface is hard-wired to talk to an engine named "dbinit_engine". You could start an engine by that name and it will end up servicing all calls to the dbtools interface.
answered 30 May '12, 06:27
I assume you are refering to the DBCreate DBTools function.
From the docs, I would think that the startline parameter of the a_create_db should help, as you can specify the according database engine parameters here. And you can use the -n database server switch to name the database engine and the -qi switch (and possibly other -qX variants) to suppress the icon in the system tray.
So I would suggest (but have not tested) to use the startline to something like
a_create_db.startline = "dbeng12 -gp page_size -c 10M -n MyEngineXy -qi"
answered 30 May '12, 04:26