|
Home > Archive > SQL Anywhere database > December 2005 > how do I start a personal database server programmatically
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how do I start a personal database server programmatically
|
|
| Tom Hughes 2005-12-14, 3:23 am |
| from Java. I can call dbeng9 on the command line, but I want to startup
programmatically. DBCreate in the DbTools library seems a likely candidate
but I can't find any examples of it.
With this c++ code, I keep getting a error 3 - file not found. Any idea how
I can find out exactly which file was not found?
a_create_db createDbInfo;
memset(&createDbInfo, 0, sizeof(createDbInfo)
);
createDbInfo.version = DB_TOOLS_VERSION_NUM
BER;
createDbInfo.dbname = " C:\\Development\\Oba
\\db\\Demo.db";
createDbInfo.logname = " C:\\Development\\Oba
\\db\\Demo.log";
createDbInfo.startline = NULL;
createReturnCode = DBCreate(&createDbInfo);
thanks, Tom
| |
| Tom Hughes 2005-12-14, 3:23 am |
| actually I've answered my own question. you just connect to the db in the
normal jdbc way using the asa jdbc-odbc driver - and a personal database is
started automagically.
Any idea how you do this using the jconnect driver?
thanks, Tom
"Tom Hughes" <thughes@orchestrate.it> wrote in message
news:439fac86$1@foru
ms-2-dub...
> from Java. I can call dbeng9 on the command line, but I want to startup
> programmatically. DBCreate in the DbTools library seems a likely candidate
> but I can't find any examples of it.
>
>
> With this c++ code, I keep getting a error 3 - file not found. Any idea
> how I can find out exactly which file was not found?
> a_create_db createDbInfo;
>
> memset(&createDbInfo, 0, sizeof(createDbInfo)
);
>
> createDbInfo.version = DB_TOOLS_VERSION_NUM
BER;
>
> createDbInfo.dbname = " C:\\Development\\Oba
\\db\\Demo.db";
>
> createDbInfo.logname = " C:\\Development\\Oba
\\db\\Demo.log";
>
> createDbInfo.startline = NULL;
>
> createReturnCode = DBCreate(&createDbInfo);
>
>
>
> thanks, Tom
>
>
| |
| Pavel Karady 2005-12-14, 1:23 pm |
| "automagically" - I'll start to use this word heavily from now on
Pavel
P.S. sorry, I don't know nothing about jConnect and jdbc (yet) but thanks
for expanding my vocabulary :)
"Tom Hughes" <thughes@orchestrate.it> wrote in message
news:439fc41b$1@foru
ms-1-dub...
> actually I've answered my own question. you just connect to the db in the
> normal jdbc way using the asa jdbc-odbc driver - and a personal database
> is started automagically.
> Any idea how you do this using the jconnect driver?
>
> thanks, Tom
>
> "Tom Hughes" <thughes@orchestrate.it> wrote in message
> news:439fac86$1@foru
ms-2-dub...
>
>
| |
| Greg Fenton 2005-12-14, 1:23 pm |
| Tom Hughes wrote:
> Any idea how you do this using the jconnect driver?
>
You cannot since the jConnect driver uses TDS communication only, which
is a TCP/IP connection. Since the library only communicates via TCP/IP,
there is no way for it to ask the OS to start up a database (if it
cannot connect via TCP/IP...it isn't "talking" to anything).
If you haven't already, consider reading:
http://www.ianywhere.com/developer/...dbc_driver.html
Hope this helps,
greg.fenton
|
|
|
|
|