Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OracleConnection equivalent to ADODB.Connection?

415269Feb 19 2004 — edited Mar 29 2004
I am rewriting some ASP/VBScript code into ASP.NET/C#. This is the rewritten ASP into C# using ADODB. What I want to do is use the ODP.NET provider.

ASP Code:
ADODB.Connection objConn2 = new ADODB.ConnectionClass();
objConn2.Open( "PROVIDER=OraOLEDB.Oracle;DATA SOURCE=" + Application["dbServer"] + ";PwdChgDlg=0", sUID, objMangler.Mangle(sPass), 0 );

// See if password has expired (not sure if this is working correctly yet)
if ( objConn2.Errors.Count > 0 ) {
foreach (ADODB.Error objErr in objConn2.Errors) {
if ( objErr.NativeError == 28001 ) {
Response.Clear();
strRedirect = "PassExpired.asp?UID=" + Server.UrlEncode(sUID);
}
}
}

How would I convert objConn2 to OracleConnection and achieve this functionality? Any articles/tutorials?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 26 2004
Added on Feb 19 2004
5 comments
821 views