From: Robert M. <RMa...@bc...> - 2005-10-31 09:31:48
|
Thanks for the help! I was able to config a sql.ini file and now I can connect. Rob M. _____ From: Grant McDonald [mailto:gmc...@in...] Sent: Friday, October 28, 2005 9:58 PM To: Robert Marchetti; pyt...@ww... Subject: RE: [python-sybase] error trying to connect using latest sybase.py Since this python module is a wrapper around the Sybase CT library you've got to use the server name that is defined in your sql.ini for windows or in your interfaces file on linux. cat /opt/sybase-12.5.2/interfaces: dt1_12_5_3_esd1 master tcp ether wol1-db-srv-dt1 5010 query tcp ether wol1-db-srv-dt1 5010 so to connect to wol1-db-srv-dt1 on port 5000 i would use: db = Sybase.connect("dt1_12_5_3_esd1",user, passwd, database) -----Original Message----- From: pyt...@ww... [mailto:pyt...@ww...]On Behalf Of Robert Marchetti Sent: Saturday, 29 October 2005 2:34 AM To: 'pyt...@ww...' Subject: [python-sybase] error trying to connect using latest sybase.py Hello, I am trying to connect to a SYBASE using Sybase.connect but it throws an error before I can connect Example: # DNS, user, passwd, Database db = Sybase.connect("10.10.10.10:1600",user, passwd, database) print db Traceback (most recent call last): File "C:\eclipse\workspace\GUI_TestCases\DVM.py", line 11, in ? db = Sybase.connect("10.150.4.103 : 1600",user, passwd, database) File "C:\Python24\Lib\site-packages\Sybase.py", line 1005, in connect strip, auto_commit, delay_connect, locking) File "C:\Python24\Lib\site-packages\Sybase.py", line 867, in __init__ self.connect() File "C:\Python24\Lib\site-packages\Sybase.py", line 886, in connect status = conn.ct_connect(self.dsn) File "C:\Python24\Lib\site-packages\Sybase.py", line 184, in _clientmsg_cb raise DatabaseError(_fmt_client(msg)) - Ignored: Sybase.DatabaseError: Layer: 6, Origin: 8 ct_connect(): directory service layer: internal directory control layer error: Requested server name not found. I can connect find thru java and Sybase central, but I would like to python so I can script some validation tests. It uses an IP and Port as in the above example (Actual IP not used in this message) Any info would be great! Thanks Rob _____ The information contained in this e-mail message and any attachments is confidential, and is intended only for the use of the party to whom it is addressed. If you are not the above-named intended recipient, you are hereby notified that any dissemination, copying or disclosure of this communication is strictly prohibited. If you have received this communication in error, please notify Boston Communications Group, Inc. immediately by reply to this message or by telephoning (781) 904-5000, and destroy this message and its attachments, without making any copy or distribution. Important notice: This message is intended for the individual(s) and entity(s) addressed. The information contained in this transmission and any attached, may be confidential and may also be the subject of legal privilege, public interest immunity or legal professional privilege. Any review, retransmission, dissemination or other use of, taking of any action in reliance upon this information by person or entities other than the recipient is prohibited and requires authorization from the sender. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person) you may not copy or deliver this message to anyone. In such cases you should destroy this message and kindly notify the sender by reply email. WARNING: Although Infocomp has taken reasonable precautions so that no viruses are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of e-mail attachments. |