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.

Can't Create multiple DSNs using Adaptive Server Anywhere??

2 posts in General Discussion Last posting was on 2003-01-24 13:20:14.0Z
chaogao Posted on 2003-01-24 01:51:54.0Z
From: chaogao
Date: Thu, 23 Jan 2003 20:51:54 -0500
Newsgroups: ianywhere.public.general
Subject: Can't Create multiple DSNs using Adaptive Server Anywhere??
Message-ID: <91A426809695C5FB000A3ECC85256CB8.000A3EDB85256CB8@webforums>
Lines: 29
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:252
Article PK: 2074

Why I can't create multiple DSNs for ODBC connections using Adaptive
Server Anywhere???

I am not sure this is the newsgroup I need post this question. If this is
not right group, please let me know which newsgroup I should post this
question.

I have created an Access Database and I tried to use this Access database
to connect to different Sybase databases. I used Adaptive Server Anywhere
7.0 to create serveral DSNs pointing these different Sybase databases.

Here is what I did. I created DSN1 (User DSN) for my Database1 using ODBC
Data Source Administrator. DSN1 worked ok. Then I created DSN2 the same
way, but pointing my Database2 and tested the connection using the Test
Connection button. I got message saying "Connection Successful!". So I
thought I was OK. When I was trying to link the tables or import the
tables, I found that I linked or imported the tables in the Database1
instead of the Database2. Then I deleted DSN1 and DSN2 and recreated DSN2.
Now this time, DSN2 is OK. Looks like I can use Adaptive Server Anywhere
7.0 to create only one DSN.

My question is: Why I can't use Adaptive Server Anywhere 7.0 to create more
than one DSNs just like other ODBC Drivers (e.g., SQL Server, Oracle,
Access, DB2 Drivers, etc.). Are there alternitives.
Maybe I can dynamically create DSN using Access VBA code everytime pointing
different database, then delete it dynamically after I use it. Is there any
sample code I can find somewhere?

Please help!

Chad


Robert Waywell Posted on 2003-01-24 13:20:14.0Z
From: "Robert Waywell" <rwaywell@ianywhere.com>
References: <91A426809695C5FB000A3ECC85256CB8.000A3EDB85256CB8@webforums>
Subject: Re: Can't Create multiple DSNs using Adaptive Server Anywhere??
Date: Fri, 24 Jan 2003 08:20:14 -0500
Lines: 67
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <PrIAw36wCHA.155@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: 172.31.143.74
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:245
Article PK: 2062

You can and have created multiple DSN's using ASA.

If you could tell us exactly what connection parameters you specified in
each of those DSN's then we will be better able to explain to you why you
are seeing database 1 when you connect using DSN 2 after having already
started database 1.


--
-----------------------------------------------
Robert Waywell
Sybase Adaptive Server Anywhere Developer - Version 8
Sybase Certified Professional

Sybase's iAnywhere Solutions

Please respond ONLY to newsgroup

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere
Developer Community at www.ianywhere.com/developer

<chaogao> wrote in message
news:91A426809695C5FB000A3ECC85256CB8.000A3EDB85256CB8@webforums...
> Why I can't create multiple DSNs for ODBC connections using Adaptive
> Server Anywhere???
>
> I am not sure this is the newsgroup I need post this question. If this is
> not right group, please let me know which newsgroup I should post this
> question.
>
> I have created an Access Database and I tried to use this Access database
> to connect to different Sybase databases. I used Adaptive Server Anywhere
> 7.0 to create serveral DSNs pointing these different Sybase databases.
>
> Here is what I did. I created DSN1 (User DSN) for my Database1 using ODBC
> Data Source Administrator. DSN1 worked ok. Then I created DSN2 the same
> way, but pointing my Database2 and tested the connection using the Test
> Connection button. I got message saying "Connection Successful!". So I
> thought I was OK. When I was trying to link the tables or import the
> tables, I found that I linked or imported the tables in the Database1
> instead of the Database2. Then I deleted DSN1 and DSN2 and recreated DSN2.
> Now this time, DSN2 is OK. Looks like I can use Adaptive Server Anywhere
> 7.0 to create only one DSN.
>
> My question is: Why I can't use Adaptive Server Anywhere 7.0 to create
more
> than one DSNs just like other ODBC Drivers (e.g., SQL Server, Oracle,
> Access, DB2 Drivers, etc.). Are there alternitives.
> Maybe I can dynamically create DSN using Access VBA code everytime
pointing
> different database, then delete it dynamically after I use it. Is there
any
> sample code I can find somewhere?
>
> Please help!
>
> Chad