MySql DateTime

G

Guest

Hi,

I'm trying to use MySql 4.1 db instead of MSSql2k and am having problems
with the DateTime in the db.

In mysqladmtools 1.0.19 I'm recommended to use 0000-00-00 00:00:00 as the
default value, but you can't save these settings. If you read the manual they
say the default value is thbe one above but that you can't use it, you have
to use a non zero value and with a non zero value you can't save the
settings. Pandoras box?

So far my solution has been to programmatically insert non zero datetime
values in every record. And it works just fine.

In my apps I'm using projects with a startdate and an enddate, and you don´t
want to see a non zero datetime value as the enddate so in mssql2k you could
use a SqlDateTime.Null value and save with db.null. Is there a ecvivalence in
MySql?

TIA

Kenneth P
 
A

Alvin Bruney [ASP.NET MVP]

why doesn't system.dbnull not work for you? what error are you getting?

--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
_________________________
 
G

Guest

Oh, it does work. Was working late with many tables. Flaw in brain. Forgive me.

Alvin Bruney said:
why doesn't system.dbnull not work for you? what error are you getting?

--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
_________________________


Kenneth P said:
Hi,

I'm trying to use MySql 4.1 db instead of MSSql2k and am having problems
with the DateTime in the db.

In mysqladmtools 1.0.19 I'm recommended to use 0000-00-00 00:00:00 as the
default value, but you can't save these settings. If you read the manual
they
say the default value is thbe one above but that you can't use it, you
have
to use a non zero value and with a non zero value you can't save the
settings. Pandoras box?

So far my solution has been to programmatically insert non zero datetime
values in every record. And it works just fine.

In my apps I'm using projects with a startdate and an enddate, and you
don´t
want to see a non zero datetime value as the enddate so in mssql2k you
could
use a SqlDateTime.Null value and save with db.null. Is there a ecvivalence
in
MySql?

TIA

Kenneth P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top