Kåre Simensen
|
Posted: 07/31/2003, 8:39 AM |
|
Why do I have this Errormessage when I try to update my table with a
date-field:
"The conversion of a char data type to a datetime data type resulted in an
out-of-range datetime value. (Microsoft OLE DB Provider for SQL Server)"
In my database, I have a field Date - first define it as a SmallDate. In
CodeCharge the field is define as a date-field . I have tried to define the
field as a Datetime in my Ms-sql base, but the errormessage is the same.
Is there someone who can help me?????
|
|
|
Dave B
|
Posted: 07/31/2003, 8:55 AM |
|
Have you set the format in the connection string
Click Project choose settings choose connections highlight connection click
modify then choose server
--
---------------------------------------------------------------
Dave
Life goes on ...and on ...and on
"Kåre Simensen" <karesim@trollnet.no> wrote in message
news:bgbd7t$qo0$1@news.codecharge.com...
> Why do I have this Errormessage when I try to update my table with a
> date-field:
> "The conversion of a char data type to a datetime data type resulted in an
> out-of-range datetime value. (Microsoft OLE DB Provider for SQL Server)"
>
> In my database, I have a field Date - first define it as a SmallDate. In
> CodeCharge the field is define as a date-field . I have tried to define
the
> field as a Datetime in my Ms-sql base, but the errormessage is the same.
>
> Is there someone who can help me?????
>
>
|
|
|
DonB
|
Posted: 07/31/2003, 8:58 AM |
|
You need to snsure the field in your form is set to "Date" for the type. It
probably is "Text". This property affects whether the date value is
interpreted as a string (hence, encoded with apostrophes in the UPDATE) or
as a date value.
DonB
"Kåre Simensen" <karesim@trollnet.no> wrote in message
news:bgbd7t$qo0$1@news.codecharge.com...
> Why do I have this Errormessage when I try to update my table with a
> date-field:
> "The conversion of a char data type to a datetime data type resulted in an
> out-of-range datetime value. (Microsoft OLE DB Provider for SQL Server)"
>
> In my database, I have a field Date - first define it as a SmallDate. In
> CodeCharge the field is define as a date-field . I have tried to define
the
> field as a Datetime in my Ms-sql base, but the errormessage is the same.
>
> Is there someone who can help me?????
>
>
|
|
|
Kåre Simensen
|
Posted: 07/31/2003, 9:15 AM |
|
Hello Dave.
Now I have tried to set the format in connection string. But the
errormessage is still the same.
In Norway we use this format : DD.MM.YYYY and that's the format I want and
write in the connection string.
The datefield in CodeCharge looks like that:
- format :dd.mm.yyyy
- default value: Currentdate
- Data type : date.
In the table the field is defined like datetime !!!
regards
Kåre Simensen, Alta, Norway
"Dave B" <david@procyberscripts.com> wrote in message
news:bgbe61$s1o$1@news.codecharge.com...
> Have you set the format in the connection string
>
> Click Project choose settings choose connections highlight connection
click
> modify then choose server
>
> --
> ---------------------------------------------------------------
>
> Dave
>
> Life goes on ...and on ...and on
> "Kåre Simensen" <karesim@trollnet.no> wrote in message
>news:bgbd7t$qo0$1@news.codecharge.com...
> > Why do I have this Errormessage when I try to update my table with a
> > date-field:
> > "The conversion of a char data type to a datetime data type resulted in
an
> > out-of-range datetime value. (Microsoft OLE DB Provider for SQL Server)"
> >
> > In my database, I have a field Date - first define it as a SmallDate. In
> > CodeCharge the field is define as a date-field . I have tried to define
> the
> > field as a Datetime in my Ms-sql base, but the errormessage is the same.
> >
> > Is there someone who can help me?????
> >
> >
>
>
|
|
|
Kåre Simensen
|
Posted: 07/31/2003, 9:22 AM |
|
Hi DonB
All my datefield in my forms are defined as a datefield !! That's why I use
some ugly words when I get this errormessage...
Kåre
"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:bgbebj$s4i$1@news.codecharge.com...
> You need to snsure the field in your form is set to "Date" for the type.
It
> probably is "Text". This property affects whether the date value is
> interpreted as a string (hence, encoded with apostrophes in the UPDATE) or
> as a date value.
>
> DonB
>
>
> "Kåre Simensen" <karesim@trollnet.no> wrote in message
>news:bgbd7t$qo0$1@news.codecharge.com...
> > Why do I have this Errormessage when I try to update my table with a
> > date-field:
> > "The conversion of a char data type to a datetime data type resulted in
an
> > out-of-range datetime value. (Microsoft OLE DB Provider for SQL Server)"
> >
> > In my database, I have a field Date - first define it as a SmallDate. In
> > CodeCharge the field is define as a date-field . I have tried to define
> the
> > field as a Datetime in my Ms-sql base, but the errormessage is the same.
> >
> > Is there someone who can help me?????
> >
> >
>
>
|
|
|
DonB
|
Posted: 07/31/2003, 11:49 AM |
|
Please examine the Code panel of the page when it is opened in CCS. Search
the code for your text field's name. There will be several references to it
on lines that mention things like "AddFields" or "CCCreateControl. These
reference your field and should indicate "ccsDate" not ccsText or or
something else. If NOT ccsDate then this is the problem.
It is also possible that you have used a reserved word - is the textbox on
the page actually named "Date"? Ensure you have not used a reserved word to
name either fields on the page or columns in the database.
DonB
"Kåre Simensen" <karesim@trollnet.no> wrote in message
news:bgbfna$tpo$1@news.codecharge.com...
> Hi DonB
> All my datefield in my forms are defined as a datefield !! That's why I
use
> some ugly words when I get this errormessage...
> Kåre
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:bgbebj$s4i$1@news.codecharge.com...
> > You need to snsure the field in your form is set to "Date" for the type.
> It
> > probably is "Text". This property affects whether the date value is
> > interpreted as a string (hence, encoded with apostrophes in the UPDATE)
or
> > as a date value.
> >
> > DonB
> >
> >
> > "Kåre Simensen" <karesim@trollnet.no> wrote in message
> >news:bgbd7t$qo0$1@news.codecharge.com...
> > > Why do I have this Errormessage when I try to update my table with a
> > > date-field:
> > > "The conversion of a char data type to a datetime data type resulted
in
> an
> > > out-of-range datetime value. (Microsoft OLE DB Provider for SQL
Server)"
> > >
> > > In my database, I have a field Date - first define it as a SmallDate.
In
> > > CodeCharge the field is define as a date-field . I have tried to
define
> > the
> > > field as a Datetime in my Ms-sql base, but the errormessage is the
same.
> > >
> > > Is there someone who can help me?????
> > >
> > >
> >
> >
>
>
|
|
|
|