You might try starting IronPython with -X:ExceptionDetail to get the full stack 
trace and the CLR exception info.  That's likely to be more useful in this case 
than the python exception display you're seeing here.  Once you've got the 
right exception name a search on the web might tell you what causes that 
specific error.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jane janet
Sent: Wednesday, August 29, 2007 10:24 AM
To: [email protected]
Subject: [IronPython] IronPython and Oracle


Dear Everybody,

 I installed Oracle Database 10g Express Edition (Universal) on the Server Host.

And then, I used Ironpython access this database on server host by Microsoft 
OLE DB Provider for Oracle. It's work.

import clr

import System

clr.AddReference("System.Data")

from System.Data import DataSet

from System.Data.OleDb import OleDbConnection, OleDbDataAdapter, OleDbCommand

conStr = "Provider=MSDAORA.1;User ID=name;Password=pwd;Persist Security 
Info=False"

con = OleDbConnection(conStr)

query = "SELECT * FROM TEST"

adapter = OleDbDataAdapter(query,con)

ds = DataSet()

con.Open()

adapter.Fill(ds,"t1")

for i in range(ds.Tables["t1"].Rows.Count -1 ):

print ds.Tables["t1"].Rows[i][0]

print ds.Tables["t1"].Rows[i][1]

print ds.Tables["t1"].Rows[i][2]

con.Close()

But my problem is I can't access Oracle Server side from client side by the 
same provider.

I changed conStr to this

conStr = """Provider=MSDAORA.1;User ID=name;Password=pwd;
  (DESCRIPTION=(CONNECT_DATA=(SID =XE)
  (CID=(PROGRAM=C:\WINDOWS\system32\Rundll32.exe)
  (HOST=hostname)(USER=name)))
  (ADDRESS=(PROTOCOL=TCP)(HOST=xx.yy.zz.ww)
  (PORT=1521)))"""

I got EnvironmentError: ORA-12560: TNS:protocol adapter error

I don't know how to solve this problem.

Please help me everything i missed and everything i should know. What I should 
do or change something, please tell me.

Thank you.






________________________________
Puzzles, trivia teasers, word scrambles and more. Play for your chance to 
win!<http://g.msn.com/8HMAENUS/2728??PS=47575>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to