Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Open ODBC Connection to a DB that is already open

5 posts in General Discussion Last posting was on 2003-02-14 20:28:38.0Z
kiko Posted on 2003-02-13 22:43:24.0Z
From: "kiko" <kburgos@siebel.com>
Subject: Open ODBC Connection to a DB that is already open
Date: Thu, 13 Feb 2003 23:43:24 +0100
Lines: 13
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <9BnkJQ70CHA.59@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: ouroboros.siebel.com 206.154.118.2
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:135
Article PK: 1954

Hi all:
dbeng8
I am trying to open an ODBC connection to a DB.
If Db is not already opened, then..no problem. Everything is ok.
If DB is already opened (third party app) then I receive an error while
trying to test ODBC Conn:
"Connection failed, specific database not found"
Any suggestion?
Thanks for your help:
kiko


Reg Domaratzki Posted on 2003-02-14 17:28:15.0Z
From: "Reg Domaratzki" <rdomarat_AT_sybase_DOT_com>
References: <9BnkJQ70CHA.59@forums.sybase.com>
Subject: Re: Open ODBC Connection to a DB that is already open
Date: Fri, 14 Feb 2003 12:28:15 -0500
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <xtzysEF1CHA.345@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: 172.31.143.163
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:131
Article PK: 1950

If another application has already opened the database, is the database
engine that is running on the same machine where you want to make the second
connection from? If so, as long as you specify the same database file,
database name and server name in the two connection strings from the two
applications, it should work.

For example :

dbisqlc -c "dbf=c:\data.db;eng=data;dbn=data;uid=dba;pwd=sql"

// This will autostart the database engine named "data" and mount the
database "data" from "c:\data.db"

If I were to run this command again, a second dbisqlc session would start up
and connect to the already running server.

Have a read over the following chapter in the docs :

Adaptive Server Anywhere Database Administration Guide
2. Connecting to a Database

Specifically, there is a section called "Troubleshooting connections" that
might be helpful. You may also find the following on-line tech doc helpful
: http://www.sybase.com/detail?id=1011225.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"kiko" <kburgos@siebel.com> wrote in message
news:9BnkJQ70CHA.59@forums.sybase.com...
> Hi all:
> dbeng8
> I am trying to open an ODBC connection to a DB.
> If Db is not already opened, then..no problem. Everything is ok.
> If DB is already opened (third party app) then I receive an error while
> trying to test ODBC Conn:
> "Connection failed, specific database not found"
> Any suggestion?
> Thanks for your help:
> kiko
>
>
>


Raymond_Kwong Posted on 2003-02-14 01:19:43.0Z
From: Raymond_Kwong
Date: Thu, 13 Feb 2003 20:19:43 -0500
Newsgroups: ianywhere.public.general
Subject: Re: Open ODBC Connection to a DB that is already open
Message-ID: <B5E2BC174660D39300074C7885256CCD.008300F985256CCC@webforums>
References: <9BnkJQ70CHA.59@forums.sybase.com>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:134
Article PK: 1955

Have you just specified the database file name but not the database server
name?

If you use a DSN, it is in the DSN's Database tab

If you use a File DSN, it is the EngineName= entry

If you use a connection string, it is the eng= field.

That field would have to be defined.... and if you're connecting to a
database running on another machine other than where the application is
running at, then make sure that you use dbsrv8.exe


kiko Posted on 2003-02-14 15:16:57.0Z
From: "kiko" <kburgos@siebel.com>
References: <9BnkJQ70CHA.59@forums.sybase.com> <B5E2BC174660D39300074C7885256CCD.008300F985256CCC@webforums>
Subject: Re: Open ODBC Connection to a DB that is already open
Date: Fri, 14 Feb 2003 16:16:57 +0100
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <QbyWX7D1CHA.331@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: ouroboros.siebel.com 206.154.118.2
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:132
Article PK: 1956

Raymond, thanks !
If DbEngine is not running, then I have no probem. Db Name and Db File(whole
path) are specified.
If the Db files is opened becasue another proccess opened the db, then I hve
no way of connecting.
I have tried everything, sonly db name, db name plus db file....but no way.
May be its not possible to open two different apps against the same dbf
file?

Thanks very much for your help, regards:
kiko


I dont have dbsrv, just dbengine to open Sybase dbs.

<Raymond_Kwong> wrote in message
news:B5E2BC174660D39300074C7885256CCD.008300F985256CCC@webforums...
> Have you just specified the database file name but not the database server
> name?
>
> If you use a DSN, it is in the DSN's Database tab
>
> If you use a File DSN, it is the EngineName= entry
>
> If you use a connection string, it is the eng= field.
>
> That field would have to be defined.... and if you're connecting to a
> database running on another machine other than where the application is
> running at, then make sure that you use dbsrv8.exe


Raymond_Kwong Posted on 2003-02-14 20:28:38.0Z
From: Raymond_Kwong
Date: Fri, 14 Feb 2003 15:28:38 -0500
Newsgroups: ianywhere.public.general
Subject: Re: Open ODBC Connection to a DB that is already open
Message-ID: <A6C1A13702CE2A7B00707C1A85256CCD.00592A6F85256CCD@webforums>
References: <9BnkJQ70CHA.59@forums.sybase.com> <B5E2BC174660D39300074C7885256CCD.008300F985256CCC@webforums> <QbyWX7D1CHA.331@forums.sybase.com>
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:129
Article PK: 1953

Reg answered your question...