Ask a Question related to ASP.NET General, Design and Development.
-
Movsum Zade #1
Null values enter to SQL
Hi,
I have datagrid filled using SqlDataAdapter. One of the fields is a date
field which can be null.
When I assign null value I receive the following error:
"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and
12/31/9999 11:59:59 PM."
My code:
Dim dateunl As TextBox
dateunl = CType(e.Item.Cells(11).Controls(0), TextBox)
If dateunl.Text = "" Then
dateunloadnew = Nothing
Else : dateunloadnew = dateunl.Text
End If
Dim r As Loadings._Dom_LoadingsRow
r = Loadings2._Dom_Loadings.FindByid(key)
r.DateUnload() = dateunloadnew
SqlDataAdapter1.Update(Loadings2)
Thanks,
Movsum
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Movsum Zade Guest
-
cfgridupdate and null values
Yeah I have the same problem. It looks like the only solution is to rewrite a custom version cfgridupdate to do my own custom query update. I... -
WDDX and NULL values
I am currently working on a project to upgrade from our ColdFusion server from CF 5.0 to CF MX 7. I've started testing our existing applications... -
Null Values
hi how to count null values in an array? tnx -
Detecting Null Values
I have a DataGrid from which the datasource is a SqlDataReader based on a SQL Server Stored Procedure. This SP returns columns will NULL values. ... -
Joining on Null values
Hello everyone Have a problem that I need help with I have a table Codes which looks like: ID, Code, modifier Any code can have multiple... -
DudeGuy #2
Re: Null values enter to SQL
assgin DBNull in VB.NEt you will be fine.
fields is a date>-----Original Message-----
>I do not know how in VB, but in C# you could
>
>if (dateunl.Text.Equals(string.Empty)){
> dateunloadnew = System.Data.SqlTypes.SqlDateTime.Null;
>}
>
>Vaclav
>
>
>"Movsum Zade" <mmzade@socarmo.az> wrote in message
>news:%23LTKXnPVDHA.1896@TK2MSFTNGP12.phx.gbl...>>
>> Hi,
>>
>> I have datagrid filled using SqlDataAdapter. One of the12:00:00 AM and>> field which can be null.
>>
>> When I assign null value I receive the following error:
>> "SqlDateTime overflow. Must be between 1/1/1753TextBox)>> 12/31/9999 11:59:59 PM."
>>
>> My code:
>> Dim dateunl As TextBox
>> dateunl = CType(e.Item.Cells(11).Controls(0),***>> If dateunl.Text = "" Then
>> dateunloadnew = Nothing
>> Else : dateunloadnew = dateunl.Text
>> End If
>>
>> Dim r As Loadings._Dom_LoadingsRow
>> r = Loadings2._Dom_Loadings.FindByid(key)
>>
>> r.DateUnload() = dateunloadnew
>>
>> SqlDataAdapter1.Update(Loadings2)
>>
>> Thanks,
>>
>> Movsum
>>
>> *** Sent via Developersdex [url]http://www.developersdex.com[/url]>>> Don't just participate in USENET...get rewarded for it!
>
>.
>DudeGuy Guest



Reply With Quote

