|
Home > Archive > SQL Anywhere database > July 2005 > Stand alone startup question
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 |
Stand alone startup question
|
|
| David DeRam 2005-07-26, 8:23 pm |
| I have a connect string of the format:
" DSN=DS1;START=dbeng9
.exe -ep -Q -c
8m;ENG=deskdb;AutoSt
op=yes;UID=joe;PWD=g
o;DBF=c:\junk\today\
data1.db;CON=0"
In the same application the user connects to another database. This string
has the same format but with a different DBF. The DBF happens to have the
same file name but it is in a different path.
" DSN=DS1;START=dbeng9
.exe -ep -Q -c
8m;ENG=deskdb;AutoSt
op=yes;UID=joe;PWD=g
o;DBF=c:\junk\yester
day\data1.db;CON=1"
The second connection actually connects to the first database. (It connects
to the "today" database and the user would expect it to connect to the
"yesterday" database). Does that behavior sound right?
Is the correct solution to just add DBF=0 to one string and DBF=1 to the
other (use the same param as the CON=)?
The version is 9.0.2.2451 and it is running on Windows as a stand alone.
The application uses embedded SQL via MS C++.
Thanks.
| |
| Mark Culp 2005-07-26, 8:23 pm |
| Your connection string is specifying the same engine name (ENG=deskdb),
and effective database name (DBF=....\data1.db implies db name of data1)
and therefore if there is an engine running with this name (deskdb) then the
client will connect to it.
One way to solve this is to specify different database names by using the
DBN parameter. i.e.
" DSN=DS1;START=dbeng9
.exe -ep -Q -c
8m;ENG=deskdb;DBN=to
day;AutoStop=yes;UID
=joe;PWD=go;DBF=c:\j
unk\today\data1.db;CON=0"
" DSN=DS1;START=dbeng9
.exe -ep -Q -c
8m;ENG=deskdb;DBN=ye
sterday;AutoStop=yes
;UID=joe;PWD=go;DBF=
c:\junk\yesterday\da
ta1.db;CON=1"
(Note I didn't try this, but it should work ! ;-)
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
David DeRam wrote:
>
> I have a connect string of the format:
>
> " DSN=DS1;START=dbeng9
.exe -ep -Q -c
> 8m;ENG=deskdb;AutoSt
op=yes;UID=joe;PWD=g
o;DBF=c:\junk\today\
data1.db;CON=0"
>
> In the same application the user connects to another database. This string
> has the same format but with a different DBF. The DBF happens to have the
> same file name but it is in a different path.
>
> " DSN=DS1;START=dbeng9
.exe -ep -Q -c
> 8m;ENG=deskdb;AutoSt
op=yes;UID=joe;PWD=g
o;DBF=c:\junk\yester
day\data1.db;CON=1"
>
> The second connection actually connects to the first database. (It connects
> to the "today" database and the user would expect it to connect to the
> "yesterday" database). Does that behavior sound right?
>
> Is the correct solution to just add DBF=0 to one string and DBF=1 to the
> other (use the same param as the CON=)?
>
> The version is 9.0.2.2451 and it is running on Windows as a stand alone.
> The application uses embedded SQL via MS C++.
>
> Thanks.
| |
| David DeRam 2005-07-27, 11:23 am |
| Thanks. DBN is actually what I meant when i wrote DBF=0 and DBF=1 (should
have read DBN=0 and DBN=1). It seemed like this made sense but I felt
unsure about it...as it would be a factor in *every* connection made.
I tested this and it works. I can't find any problems with it.
"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
wrote in message news:42E6E2F9.B81F5A98@iAnywhere.com...[color=darkred]
> Your connection string is specifying the same engine name (ENG=deskdb),
> and effective database name (DBF=....\data1.db implies db name of data1)
> and therefore if there is an engine running with this name (deskdb) then
> the
> client will connect to it.
>
> One way to solve this is to specify different database names by using the
> DBN parameter. i.e.
>
> " DSN=DS1;START=dbeng9
.exe -ep -Q -c
>
> 8m;ENG=deskdb;DBN=to
day;AutoStop=yes;UID
=joe;PWD=go;DBF=c:\j
unk\today\data1.db;CON=0"
>
> " DSN=DS1;START=dbeng9
.exe -ep -Q -c
>
> 8m;ENG=deskdb;DBN=ye
sterday;AutoStop=yes
;UID=joe;PWD=go;DBF=
c:\junk\yesterday\da
ta1.db;CON=1"
>
> (Note I didn't try this, but it should work ! ;-)
> --
> Mark Culp
> SQLAnywhere Research and Development
> -------------------------------------------------------------------------
> ** Whitepapers, TechDocs, bug fixes are all available through the **
> ** iAnywhere Developer Community at http://www.ianywhere.com/developer **
> -------------------------------------------------------------------------
> David DeRam wrote:
|
|
|
|
|