469,951 Members | 2,629 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,951 developers. It's quick & easy.

MySql DateTime

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
Nov 19 '05 #1
2 2141
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" <Ke******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
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

Nov 19 '05 #2
Oh, it does work. Was working late with many tables. Flaw in brain. Forgive me.

"Alvin Bruney [ASP.NET MVP]" wrote:
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" <Ke******@discussions.microsoft.com> wrote in message
news:A7**********************************@microsof t.com...
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


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Neal | last post: by
5 posts views Thread by PKin via DotNetMonster.com | last post: by
reply views Thread by ZoombyWoof | last post: by
6 posts views Thread by Brandon | last post: by
4 posts views Thread by Michael Sharman | last post: by
3 posts views Thread by len | last post: by
reply views Thread by Edwin.Madari | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.