<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=921155301-29102005><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=921155301-29102005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=921155301-29102005><FONT face=Arial color=#0000ff size=2>cat 
/opt/sybase-12.5.2/interfaces:</FONT></SPAN></DIV>
<DIV><SPAN class=921155301-29102005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=921155301-29102005><FONT face=Arial color=#0000ff 
size=2>dt1_12_5_3_esd1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
master tcp ether wol1-db-srv-dt1 
5010<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; query tcp ether 
wol1-db-srv-dt1 5010</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=921155301-29102005>so to 
connect to wol1-db-srv-dt1 on port 5000 i would use:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=921155301-29102005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2><SPAN class=921155301-29102005>db = 
Sybase.connect("dt1_12_5_3_esd1",user, passwd, database)</SPAN></FONT></DIV>
<DIV><SPAN class=921155301-29102005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> 
  python-sybase-bounces@www.object-craft.com.au 
  [mailto:python-sybase-bounces@www.object-craft.com.au]<B>On Behalf Of 
  </B>Robert Marchetti<BR><B>Sent:</B> Saturday, 29 October 2005 2:34 
  AM<BR><B>To:</B> 'python-sybase@www.object-craft.com.au'<BR><B>Subject:</B> 
  [python-sybase] error trying to connect using latest 
  sybase.py<BR><BR></FONT></DIV>
  <META content="Microsoft Word 11 (filtered medium)" name=Generator>
  <STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
H2 {
        FONT-SIZE: 14pt; MARGIN: 12pt 0in 3pt; FONT-STYLE: italic; FONT-FAMILY: Arial
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P.StyleHeading2Blue {
        FONT-WEIGHT: bold; FONT-SIZE: 12pt; MARGIN: 12pt 0in 3pt; COLOR: blue; FONT-FAMILY: Arial
}
LI.StyleHeading2Blue {
        FONT-WEIGHT: bold; FONT-SIZE: 12pt; MARGIN: 12pt 0in 3pt; COLOR: blue; FONT-FAMILY: Arial
}
DIV.StyleHeading2Blue {
        FONT-WEIGHT: bold; FONT-SIZE: 12pt; MARGIN: 12pt 0in 3pt; COLOR: blue; FONT-FAMILY: Arial
}
SPAN.EmailStyle18 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>

  <DIV class=Section1>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Hello,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">I am trying to connect to 
  a SYBASE using Sybase.connect<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; but it 
  throws an error before I can connect<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  Example:<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; # DNS, 
  user, passwd, Database<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; db = 
  Sybase.connect("10.10.10.10:1600",user, passwd, database) 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; print 
  db<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  Traceback (most recent call last):<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  File "C:\eclipse\workspace\GUI_TestCases\DVM.py", line 11, in 
  ?<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  db = Sybase.connect("10.150.4.103 : 1600",user, passwd, 
  database)<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  File "C:\Python24\Lib\site-packages\Sybase.py", line 1005, in 
  connect<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  strip, auto_commit, delay_connect, locking)<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  File "C:\Python24\Lib\site-packages\Sybase.py", line 867, in 
  __init__<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  self.connect()<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  File "C:\Python24\Lib\site-packages\Sybase.py", line 886, in 
  connect<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  status = conn.ct_connect(self.dsn)<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  File "C:\Python24\Lib\site-packages\Sybase.py", line 184, in 
  _clientmsg_cb<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  raise DatabaseError(_fmt_client(msg))<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">- 
  Ignored:<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  Sybase.DatabaseError: Layer: 6, Origin: 8<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  ct_connect(): directory service layer: internal directory control 
  layer<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; error: 
  Requested server name not found.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; I can 
  connect find thru java and Sybase central, but I would like to 
  python<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; so I 
  can script some validation tests.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; It uses 
  an IP and Port as in the above example <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; (Actual 
  IP not used in this message)<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; Any 
  info would be great!<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; Thanks 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Courier New" size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; 
  Rob<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV>
  <P>
  <HR SIZE=1>

  <P></P>
  <P><STRONG>The information contained in this e-mail message and any 
  attachments is<BR>confidential, and is intended only for the use of the party 
  to whom it<BR>is addressed. If you are not the above-named intended recipient, 
  you<BR>are hereby notified that any dissemination, copying or disclosure 
  of<BR>this communication is strictly prohibited. If you have received 
  this<BR>communication in error, please notify Boston Communications Group, 
  Inc.<BR>immediately by reply to this message or by telephoning (781) 
  904-5000,<BR>and destroy this message and its attachments, without making any 
  copy<BR>or distribution. </STRONG></P></BLOCKQUOTE></BODY><!--[object_id=#infocomp.com#]--><P><FONT face=Arial color=#808080 size=1>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. </FONT></P>
<P><FONT face=Arial color=#808080 size=1>WARNING: Although Infocomp has taken reasonable precautions so that no viruses&nbsp;are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of e-mail attachments.</FONT></P></HTML>