這裡我就把這個方案和dll分享給大家。
usingoracle.manageddataaccess.client; //引入命名空間
private
void button1_click(object
sender, eventargs e)
//oracle連線字串
private
static
string strconn = "
data source=(description=(address=(protocol=tcp)(host=172.30.0.37)(port=1521))(connect_data=(service_name=emes)));persist security info=true;user id=emes_dev;password=emes_dev;";
private datatable querydt(string
sql)
oracledataadapter adap = new
oracledataadapter(sql, conn);
datatable dt = new
datatable();
adap.fill(dt);
return
dt; }
catch
(exception ex)
finally}}
1格式:2
string strconn = "
data source=(description=(address=(protocol=tcp)(host=172.30.0.37)(port=1521))(connect_data=(service_name=emes)));persist security info=true;user id=emes_dev;password=emes_dev;";
34格式:5
string strconn = "
data source=(description=(address=(protocol=tcp)(host=遠端伺服器ip位址)(port=1521))(connect_data=(service_name=遠端伺服器資料庫服務名稱)));persist security info=true;user id=資料庫使用者名稱;password=資料庫密碼;
C 連線Oracle資料庫字串
c 連線oracle資料庫字串 查詢資料 using system using system.collections.generic using system.componentmodel using system.data.oracleclient 這行和下一行都要先在引用中填加system.da...
資料庫連線字串 Oracle 連線字串
odbc 新版本driver server myserveraddress uid myusername pwd mypassword 舊版本driver connectstring oracleserver.world uid myusername pwd mypassword ole db,ol...
Oracle資料庫連線字串
oracle資料庫連線字串 經典大全 附件官方文件 2008 11 21 13 34 odbc 新版本driver server myserveraddress uid myusername pwd mypassword 舊版本driver connectstring oracleserver.wo...