ch1zra Posted June 7, 2010 Report Share Posted June 7, 2010 ima li koga ovde da se igrao oko pyodbc-a sa oraclom ? imam mali problem koji me prilicno nervira :) koristim python 2.6.2 i oracle 8i elem, interesuje me da li je moguce nekako testirati konekciju pre bilo kakvih daljih akcija... probao sam ovo : cnxn = pyodbc.connect("DRIVER={Microsoft ODBC for Oracle};UID=UNAME;PWD=PASS;SERVER=SERV;") cursor = cnxn.cursor() if not cursor: print 'Nije moguce ostvariti konekciju sa bazom.' al patka :P Quote Ko je nub ne budi mu drug. I mean you harm. Link to comment Share on other sites More sharing options...
Trooper Posted June 7, 2010 Report Share Posted June 7, 2010 a da ne baca taj connect() možda neki exception? trebalo bi da radi nešto tipa try: cnxn = pyodbc.connect("...") except: print "Nije moguce ostvariti konekciju sa bazom." Quote Link to comment Share on other sites More sharing options...
ch1zra Posted June 7, 2010 Author Report Share Posted June 7, 2010 hm.. mislim da sam probao tako nesto i da nije urodilo plodom, al provericu sutra kad odem na posao opet Quote Ko je nub ne budi mu drug. I mean you harm. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.