Direct Mode for asp.net

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
jiayu821
Posts: 8
Joined: Thu 21 May 2009 05:22

Direct Mode for asp.net

Post by jiayu821 » Thu 21 May 2009 05:30

I use OraDirect 4.75 for my asp.net application,when i run it in my develop machine,i use direct mode ok,but when i deploy my app to the server,i got the error below in the code:
{
OracleConnection connection = new OracleConnection(connectString);
}

NullReferenceException: object reference not set to an instance of an object]
CoreLab.Common.DbConnectionBase.get_ConnectionString() +11
CoreLab.Oracle.OracleConnection..ctor(String connectionString) +32
Login.ASPxButtonLogin_Click(Object sender, EventArgs e) in d:\CRM\Login.aspx.cs:18
DevExpress.Web.ASPxEditors.ASPxButton.OnClick(EventArgs e) +98
DevExpress.Web.ASPxEditors.ASPxButton.RaisePostBackEvent(String eventArgument) +402
DevExpress.Web.ASPxClasses.ASPxWebControl.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


the server no oracle client installed,but my develop machine has,
the oracle server version is 8.17

my connectionstring is
user id=zccrm;password=ythcrm;server=192.168.1.200;unicode=True;direct=True;sid=PROD

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 21 May 2009 11:39

If you use the Direct mode, Oracle client software is not used.

We cannot reproduce the problem. Please send us (support at devart*com) a small test project that reproduces the problem. Please avoid using third-party components.

jiayu821
Posts: 8
Joined: Thu 21 May 2009 05:22

Post by jiayu821 » Fri 22 May 2009 01:50

I have do another test,when i use OracleDataSource in my asp.net page in Direct Mode,it can work well,
But when i Use the Code like this:
OracleConnection connection = new OracleConnection(connectString);
i got the error like above,why?
the only difference between these two method is the OracleDataSource has property

jiayu821
Posts: 8
Joined: Thu 21 May 2009 05:22

Post by jiayu821 » Fri 22 May 2009 02:18

just bofore i have another test,
i write code like this:
protected CoreLab.Oracle.OracleConnection connection;
protected CoreLab.Oracle.OracleCommand cmd;

override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()
{
this.connection = new CoreLab.Oracle.OracleConnection();
this.cmd = new CoreLab.Oracle.OracleCommand();
}


protected void ASPxButtonLogin_Click(object sender, EventArgs e)
{

connection.ConnectionString = connectString;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "zccrm.pkg_user_manager.f_user_login";
cmd.Connection = connection;
.....
}

i got it, why?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 25 May 2009 09:22

1. Could you please try the latest build 5.20.33 of dotConnect for Oracle? Is there the mentioned problem?
2. Please send us (e-mail: support at devart*com, topic "Direct Mode for ASP.NET issue") a small test project that reproduces the problem. Please avoid using third-party components.

Post Reply