我连接到oracle DB时遇到错误。我使用ODBC DRIVER使用连接字符串语句。我想从orcle db获取一些数据并将其绑定到某个控件中。 oracle客户端安装在我的机器上。
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 :(得分:0)
根据this example,您的连接字符串基本上是正确的,但请尝试删除最后两个属性。指定用户名和密码时,它不是可信连接:
conn.ConnectionString = "Driver={Microsoft ODBC for Oracle};server=172.23.6.217.PINDB;Uid=OEARENEWAL;Pwd=OEARENEWAL"