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!

ORA-01400: cannot insert NULL into () Error on ASP.NET application.

Simon ChenMay 7 2009 — edited May 7 2009
Hi Everyone,

I know this might not be a ODP.NET issue but I am wondering whether someone has ever had similar problem before and can let me know whether the problem is.

I have a ASP.NET web application installed in IIS. And it connects to Oracle database. The application can connect to Oracle database but every time when it uses an SqlDataSource and runs a insert query with parameters, oracle will throw the error as stated in the title. If it runs an UPDATE query it will produce similar error. To our observation, it seems that all though we do assign values to those parameters, when insert function of the SqlDataSource is executed, the value is still null. his only happens when using the SqlDataSource. If I specify the insert command with some parameter name, assign values to these parameters, and execute and command, it can insert records into the database.

However, we have another server with similar software configuration. We installed the same source code there, but it will not have this issue. When I run the source code from visual studio I don't have this issue either. That's why I think maybe this is not related to the source code itself, but to the configuration of the system. I guess maybe some of the Oracle dll that are needed to work with ASP.NET are missing.

Can someone kindly shed some light on this issue?

Thanks in advance.

The configuration of the software environment is:
Windows Server 2003 Enterprise Edition
IIS 7.0
Oracle 11g Database
Oracle 11g Client
.NET framework 2.0
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2009
Added on May 7 2009
1 comment
1,920 views