Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot save nullable datetime #400

Closed
sinancx opened this issue May 31, 2017 · 7 comments
Closed

Cannot save nullable datetime #400

sinancx opened this issue May 31, 2017 · 7 comments
Assignees

Comments

@sinancx
Copy link

sinancx commented May 31, 2017

Hi All,

We have problems to save nullable datetime in oracle.

[MapField("XYZ"], Nullable]
public DateTime? ValidFrom{get;set;}

If the value of the Property is null, we become the following error:

Exception thrown: 'System.ArgumentOutOfRangeException' in Oracle.ManagedDataAccess.dll
   bei Oracle.ManagedDataAccess.Client.OracleParameter.set_DbType(DbType value)
   bei BLToolkit.Data.DataProvider.OdpManagedDataProvider.BLToolkitExtension.OracleParameterWrap.System.Data.IDataParameter.set_DbType(DbType value)
   bei BLToolkit.Data.DbManager.Parameter(ParameterDirection parameterDirection, String parameterName, Object value, DbType dbType)
   bei BLToolkit.Data.DbManager.Parameter(String parameterName, Object value, DbType dbType)
   bei BLToolkit.DataAccess.SqlQueryInfo.GetParameters(DbManager db, Object obj)
   bei BLToolkit.DataAccess.SqlQuery`1.Insert(DbManager db, T obj)
   bei BLToolkit.DataAccess.SqlQuery`1.Insert(T obj)

Any help is appreciated.

Regards

Sinan

@ili
Copy link
Collaborator

ili commented May 31, 2017

I'll take a look in next few days.

ili added a commit that referenced this issue Jun 3, 2017
* update Oracle.ManagedDataAccess to 12.2.110
@ili ili self-assigned this Jun 3, 2017
@ili ili mentioned this issue Jun 3, 2017
@ili ili closed this as completed in 5e8ab9c Jun 3, 2017
@ili
Copy link
Collaborator

ili commented Jun 3, 2017

fixed in 4.3.9
nugets updated

@sinancx
Copy link
Author

sinancx commented Jun 9, 2017

Great job! Thanks for the quick support!

@ili
Copy link
Collaborator

ili commented Jun 9, 2017

Not at all.
Please consider migrating to linq2db :)

@sinancx
Copy link
Author

sinancx commented Jun 9, 2017

linq2db looks very good and similar to BLToolkit Linq Extension.

What's the difference between the two? and Which one will be supported more in the future?

Thanks and kind regards

Sinan

@ili
Copy link
Collaborator

ili commented Jun 9, 2017

linq2db is linq-only (and you are right, it is similar with BLToolkit Linq, because it is from the same author: @igor-tkachev )
no DataAccessors, no EditableObjects (but you can generate Editable objects from database with T4 templates), no ObjectBinder, reflection, etc...

BLToolkit is suspended, no new features would be implemented, only small bug fixes (as one you faced with). linq2db is live & growing project. So we do suggest to start new projects with inq2db & to migrate old, of possible.

@sinancx
Copy link
Author

sinancx commented Jun 9, 2017

Thanks for the useful information! We liked BLToolkit and I am pretty sure linq2db will be great, as well.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants