Http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
1.
The following dll must be included during release.
Http://www.189works.com/article-58367-1.html
Or download the xcopy version of Oracle odac and run install. bat all c: \ oracle odac for installation.
2.
You can use EF and paramname for parameterized query.
View code
Private Void Button4_click ( Object Sender, eventargs e ){ VaR Plain text = @" Select E. empno, E. ename, E. hiredate, D. dname from Scott. EMP e inner join Scott. dept D on E. deptno = D. deptno where D. deptno =: deptno " ; VaR CTX = New Entities (); VaR List = CTX. executestorequery <empinfo> (plain text, 20 ). Tolist ();}} Public Class Empinfo { Public Int Empno { Get ; Set ;} Public String Ename { Get ; Set ;} Public Datetime hiredate { Get ; Set ;} Public String Dname { Get ; Set ;}}
3.
The connection can be written as follows:
String connstring = "Data Source = (description = (address = (Protocol = TCP) (host = 192.168.1.30) (Port = 1521) (CONNECT_DATA = (SID = orcl ))); user ID = Scott; Password = password ;"
You can also do this:
String connstring = "Data Source = 192.168.1.30: 1521/orcl; user id = Scott; Password = password ;"
Log On As administrator:
String connstring = "Data Source = 192.168.1.30: 1521/orcl; user id = sys; Password = admin; DBA privilege = sysdba ;";
4.
You can use Oracle Net configuration assistant to configure the Oracle connection port. If you cannot connect to the port, try this.