2012-06-08 75 views
0

當我連接到oracle數據庫時出現錯誤。我正在使用ODBC DRIVER的連接字符串語句。我想從orcle數據庫獲取一些數據並將其綁定到一些控件中。 oracle客戶端安裝在我的機器上。關於使用.net的ODBC連接字符串

my db name is PINDB it's in another server. Not in localhost. 
am creating oracle driver named as obdialer il localhost 
local host ip adress is 10.103.1.166 
the DB is placed in this server (IP 172.23.6.217) 
user id is RAM 
password is RAM 

in my programme am using the connection string as like this. 

code 
---- 
conn.ConnectionString = ("Driver ={Microsoft ODBC for Oracle};server=172.23.6.217.PINDB;Uid =OEARENEWAL;Pwd =OEARENEWAL;Persist Security Info=False;Trusted_Connection=Yes") 
try 
    con.open() 
    ---------- 
    ---------- 
catch ex as exception 
    msgbox(ex.message) 
end try 



i didnt get any error and also the values are not bind to that particular control. 
pls help me to correct the error in connectionstring. 
+0

我想從連接字符串中移除憑證。 – Alex

+0

您收到的錯誤消息是什麼? – tcarvin

回答

0

Accoding到this example連接字符串基本上是正確的,但儘量remocing最後兩個屬性。當您指定用戶名和密碼時,它不是可信任的連接:

conn.ConnectionString = "Driver={Microsoft ODBC for Oracle};server=172.23.6.217.PINDB;Uid=OEARENEWAL;Pwd=OEARENEWAL"