[IronPython] IronPython and Oracle
dinov at exchange.microsoft.com
Wed Aug 29 10:41:25 PDT 2007
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: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of jane janet
Sent: Wednesday, August 29, 2007 10:24 AM
To: users at lists.ironpython.com
Subject: [IronPython] IronPython and Oracle
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.
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()
for i in range(ds.Tables["t1"].Rows.Count -1 ):
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;
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.
Puzzles, trivia teasers, word scrambles and more. Play for your chance to win!<http://g.msn.com/8HMAENUS/2728??PS=47575>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users