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.

Anywhere connection from c# with multiple databases

4 posts in General Discussion Last posting was on 2006-10-03 13:49:00.0Z
Andresr Posted on 2006-10-02 17:46:37.0Z
Sender: 755b.45214f4b.1804289383@sybase.com
From: Andresr
Newsgroups: ianywhere.public.general
Subject: Anywhere connection from c# with multiple databases
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4521507d.7579.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 2 Oct 2006 10:46:37 -0700
X-Trace: forums-1-dub 1159811197 10.22.241.41 (2 Oct 2006 10:46:37 -0700)
X-Original-Trace: 2 Oct 2006 10:46:37 -0700, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5650
Article PK: 1668

Hi all

My application needs connection to an anyhwere server with
multiple databases, those databases are dynamics (exists
only for a short time and new databases are generated every
day). Wich I need is know how to connect to them without the
need of generate multiple odbc's, I need a SQL Server like
connection (servername, databasename, userid, password),
some one know how to do it?


Chris Keating (iAnywhere Solutions) Posted on 2006-10-02 17:58:24.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <4521507d.7579.1681692777@sybase.com>
Subject: Re: Anywhere connection from c# with multiple databases
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: keating-dm20.sybase.com
Message-ID: <4521523d$1@forums-2-dub>
X-Original-Trace: 2 Oct 2006 10:54:05 -0700, keating-dm20.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 2 Oct 2006 10:55:31 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 2 Oct 2006 10:58:24 -0700
X-Trace: forums-1-dub 1159811904 10.22.108.75 (2 Oct 2006 10:58:24 -0700)
X-Original-Trace: 2 Oct 2006 10:58:24 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5651
Article PK: 1669

ODBC would be the least likely connectivity option for C#. If you are using
ODBC to connect, you can use a DSNLess connection. If you are using a
connectivity technology such as OLEDB or the managed provider, the ODBC DSN
is not required but can be used as a source of 'connectivity information'.

Your connection string would look like this (although you may need more
parameters):

Eng=<engname>;dbn=<databasename>;uid=<uid>;pwd=<pwd>

Other information may also be required depending on your connectivity
technology i.e.,odbc, oledb, managed provider.

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

*****************************************************************************

Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
=and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

*****************************************************************************

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use Case Express to report bugs http://case-express.sybase.com

*****************************************************************************


Andresr Posted on 2006-10-02 18:49:38.0Z
Sender: 755b.45214f4b.1804289383@sybase.com
From: Andresr
Newsgroups: ianywhere.public.general
Subject: Re: Anywhere connection from c# with multiple databases
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <45215f42.7624.1681692777@sybase.com>
References: <4521523d$1@forums-2-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 2 Oct 2006 11:49:38 -0700
X-Trace: forums-1-dub 1159814978 10.22.241.41 (2 Oct 2006 11:49:38 -0700)
X-Original-Trace: 2 Oct 2006 11:49:38 -0700, 10.22.241.41
Lines: 52
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5652
Article PK: 1670


> ODBC would be the least likely connectivity option for C#.
> If you are using ODBC to connect, you can use a DSNLess
> connection. If you are using a connectivity technology
> such as OLEDB or the managed provider, the ODBC DSN is
> not required but can be used as a source of 'connectivity
> information'.
>
> Your connection string would look like this (although you
> may need more parameters):
>
> Eng=<engname>;dbn=<databasename>;uid=<uid>;pwd=<pwd>

Connection works as you tell me, but now I need this
connection binded to a DataWindow.Net 2.0, I tried with the
AdoTransaction but fails.

>
> Other information may also be required depending on your
> connectivity technology i.e.,odbc, oledb, managed
> provider.
>
> --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
> **********************************************************
> *******************
>
> Sign up today for your copy of the SQL Anywhere Studio 9
> Developer Edition =and try out the market-leading
> database for mobile, embedded and small to medium sized
> business environments for free!
>
> http://www.ianywhere.com/promos/deved/index.html
>
> **********************************************************
> *******************
>
> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at
> http://www.iAnywhere.com/developer ** EBFs can be found at
> http://downloads.sybase.com/swx/sdmain.stm ** Use Case
> Express to report bugs http://case-express.sybase.com
>
> **********************************************************
> *******************
>
>


Chris Keating (iAnywhere Solutions) Posted on 2006-10-03 13:49:00.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <4521523d$1@forums-2-dub> <45215f42.7624.1681692777@sybase.com>
Subject: Re: Anywhere connection from c# with multiple databases
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: keating-dm20.sybase.com
Message-ID: <452269b6$1@forums-2-dub>
X-Original-Trace: 3 Oct 2006 06:46:30 -0700, keating-dm20.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 3 Oct 2006 06:46:32 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 3 Oct 2006 06:49:00 -0700
X-Trace: forums-1-dub 1159883340 10.22.108.75 (3 Oct 2006 06:49:00 -0700)
X-Original-Trace: 3 Oct 2006 06:49:00 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5654
Article PK: 1672

See the Datawindow.Net documentation ( referenced in the program group as
Compiled HTML Help File):

Sybase DataWindow .NET

Using an AdoTransaction object

You do not make the connection directly to AdoTransaction as shown in the
sample below:

System.Data.OleDb.OleDbConnection oleDbConn = new
System.Data.OleDb.OleDbConnection();

oleDbConn.ConnectionString =
"UserID=dba;Password=sql;EngineName=asademo9;DatabaseName=asademo;Provider=ASAProv.90";

oleDbConn.Open();


AdoTransaction adoTrans = new AdoTransaction(oleDbConn);

adoTrans.BindConnection();


--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

*****************************************************************************

Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
=and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

*****************************************************************************

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use Case Express to report bugs http://case-express.sybase.com

*****************************************************************************