dbTalk Databases Forums  

Problems with ASAConnection and Connectionstring

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Problems with ASAConnection and Connectionstring in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas Kehl
 
Posts: n/a

Default Problems with ASAConnection and Connectionstring - 04-12-2006 , 10:11 AM






Hello.

I am using AsaConnection from ADO.NET in C# (Version 2.0). Now, I am trying
to connect to a database. But I always get an Exception.

This is my connectionString:
"Driver={Adaptive Server Anywhere
9.0};UID=tk;PWD=xxxxx;DatabaseFile=C:\\PPDev\\PPDB \\PROFITEX.db;EngineName=PPDEV;Start=C:\\Programme \\Sybase\\SQL
Anywhere 9\\win32\\dbeng9.exe -c 32M;AutoStop=Yes"

I am getting an ArgumentException when I do

oConnection.ConnectionString = "Driver={Adaptive Server Anywhere
9.0};UID=tk;PWD=CITROEN;DatabaseFile=C:\\PPDev\\PP DB\\PROFITEX.db;EngineName=PPDEV;Start=C:\\Program me\\Sybase\\SQL
Anywhere 9\\win32\\dbeng9.exe -c 32M;AutoStop=Yes"

The Message is (translated from german to english):
Invalid connecting character sequence. Error with the syntactic analysis of
the character sequence for the connecting parameter parameter name: VALUE

Can anybody help me, what I am doing wrong?

Thanks
Thomas



Reply With Quote
  #2  
Old   
Chris Keating(iAnywhere Solutions)
 
Posts: n/a

Default Re: Problems with ASAConnection and Connectionstring - 04-12-2006 , 11:17 AM






Why are you referencing DRIVER= in this? It is an ODBC setting.

You should be setting PROVIDER=ASAProv.x where x is 70, 80, or 90 (to
reflect the version of ASA). Note the .x is optional but will ensure
which provider is enabled rather than relying on the default value
(which is affected by install order).


--

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

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

Reply With Quote
  #3  
Old   
Thomas Kehl
 
Posts: n/a

Default Re: Problems with ASAConnection and Connectionstring - 04-12-2006 , 01:31 PM



Hi Chris,

the fallowing string do also not work - the same error:

"Provider=ASAProv.90;UID=tk;PWD=xxxxx;DatabaseFile =C:\\PPDev\\PPDB\\PROFITEX.db;EngineName=PPDEV;Sta rt=C:\\Programme\\Sybase\\SQL
Anywhere 9\\win32\\dbeng9.exe -c 32M;AutoStop=Yes"

Thomas

"Chris Keating(iAnywhere Solutions)"
<NoSpamPlease_k_e_a_t_i_n_g (AT) i_A_n_y_w_h_e_r_e (DOT) com> schrieb im Newsbeitrag
news:443d282a$1 (AT) forums-1-dub (DOT) ..
Quote:
Why are you referencing DRIVER= in this? It is an ODBC setting.

You should be setting PROVIDER=ASAProv.x where x is 70, 80, or 90 (to
reflect the version of ASA). Note the .x is optional but will ensure which
provider is enabled rather than relying on the default value (which is
affected by install order).


--

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

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



Reply With Quote
  #4  
Old   
Chris Keating(iAnywhere Solutions)
 
Posts: n/a

Default Re: Problems with ASAConnection and Connectionstring - 04-12-2006 , 02:32 PM



I am not having any problems. What version of VS.NET and compact
framework are you running (go to help about)?
--

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

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

Reply With Quote
  #5  
Old   
Thomas Kehl
 
Posts: n/a

Default Re: Problems with ASAConnection and Connectionstring - 04-12-2006 , 02:46 PM



Hi Chris,

I use VS.NET Version 8.0.50727.42
I do not use compact framework - i use the normal .NET framework with
version 2.0.50727

Perhaps, the problem is, that I have referenced the assembly
iAnywhere.Data.AsaClient.dll directly in path Sybase\SQL Anywhere
9\win32\VS8.
The assembly is installed in the GAC, but I don't see it in the
browse-window in VS to add the reference on it. Can you help me about that?

Thanks
Thomas


"Chris Keating(iAnywhere Solutions)"
<NoSpamPlease_k_e_a_t_i_n_g (AT) i_A_n_y_w_h_e_r_e (DOT) com> schrieb im Newsbeitrag
news:443d4551$1 (AT) forums-2-dub (DOT) ..
Quote:
I am not having any problems. What version of VS.NET and compact framework
are you running (go to help about)?
--

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

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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.