dbTalk Databases Forums  

Connect ASA server without DSN information

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


Discuss Connect ASA server without DSN information in the sybase.public.sqlanywhere.general forum.



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

Default Connect ASA server without DSN information - 04-06-2006 , 11:03 PM






SQLCA.DBParm =
"ConnectString='DSN=ERS;CharSet='cp950';CommitOnDi sconnect=No'
,ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPR OMPT'"

Currently I use the ODBC setting to connect ASA server.
Please advise how I can connect to ASA server with only
engine name and ip address.

Reply With Quote
  #2  
Old   
Greg Fenton
 
Posts: n/a

Default Re: Connect ASA server without DSN information - 04-06-2006 , 11:54 PM






Karina wrote:
Quote:
SQLCA.DBParm =
"ConnectString='DSN=ERS;CharSet='cp950';CommitOnDi sconnect=No'
,ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPR OMPT'"

Currently I use the ODBC setting to connect ASA server.
Please advise how I can connect to ASA server with only
engine name and ip address.
You must provide at least UID and PWD. For a remote server, you must
also provide ENG and LINKS:


UID=my_id;PWD=my_pwd;ENG=ERS;LINKS=TCPIP(HOST=my_i p_addr)

Since you know the IP address, you likely don't need to be broadcasting:

...;LINKS=TCPIP(HOST=my_ip;DOBROADCAST=none;PORT=2 638)

In the SQLAnywhere 9.x online docs see:

ASA Database Administration Guide
Connecting to a Database
- Introduction to connections

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


Reply With Quote
  #3  
Old   
Stephen Rice
 
Posts: n/a

Default Re: Connect ASA server without DSN information - 04-07-2006 , 12:02 AM



Are you still going to be using the ODBC API? If you are then you can
use something that resembles:
"driver=xxx/dbodbc9.dll;eng=???;links=tcpip(host=xxx.xxx.xxx)"
I don't have the ODBC SDK in front of me so you need to confirm the
syntax for dynamically loading a driver from the connection parameters


If you are not using the ODBC API which API are you going to use?

/steve

Karina wrote:
Quote:
SQLCA.DBParm =
"ConnectString='DSN=ERS;CharSet='cp950';CommitOnDi sconnect=No'
,ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPR OMPT'"

Currently I use the ODBC setting to connect ASA server.
Please advise how I can connect to ASA server with only
engine name and ip address.
--

Stephen Rice
Technical Services Manager
iAnywhere (a Sybase Company)
email: srice (AT) ianywhere (DOT) com


Reply With Quote
  #4  
Old   
Breck Carter [Team iAnywhere]
 
Posts: n/a

Default Re: Connect ASA server without DSN information - 04-07-2006 , 07:37 AM



On 6 Apr 2006 20:03:22 -0800, Karina wrote:

Quote:
SQLCA.DBParm =
"ConnectString='DSN=ERS;CharSet='cp950';CommitOnDi sconnect=No'
,ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPR OMPT'"

Currently I use the ODBC setting to connect ASA server.
Please advise how I can connect to ASA server with only
engine name and ip address.
It depends on the version of ASA, and whether the ASA engine is
running or you want to "autostart" it.

Here are a couple of templates, one for a running V9 engine, one for
V8 with autostart:

SQLCA.DBParm &
= "ConnectString='Driver=Adaptive Server Anywhere 9.0;" &
+ "UID=dba;PWD=sql;DatabaseName=asademo;EngineName=a sademo9;" &
+ "AutoStop=No;Integrated=No;" &
+ "CommLinks=SharedMemory,TCPIP{HOST=tsunami;DOBROAD =NONE};" &
+ "Compress=No"


SQLCA.DBParm &
= "ConnectString='Driver=Adaptive Server Anywhere 8.0;" &
+ "UID=DBA;PWD=SQL;" &
+ "START=C:\Program Files\Sybase\SQL Anywhere 8\win32\dbeng8.exe;"
&
+ "DBF=" &
+ aaa &
+ "'"

Breck

--
Breck Carter [Team iAnywhere]
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
The book: http://www.risingroad.com/SQL_Anywhe...ers_Guide.html
breck.carter (AT) risingroad (DOT) 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.