Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Assign Null value error

Reply
Thread Tools

Re: Assign Null value error

 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      03-16-2006
Post some snippet code..
Are you using MS Access?
Patrick

"Jim McGivney" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In asp 2.0 I am trying to insert a row using a detailsview control
> connected to an accessDataSource. I get the error message below. I am
> having trouble identifing which data field is causing the problem. Any
> suggestings are welcomed.
> Jim
> *************
> You tried to assign the Null value to a variable that is not a Variant
> data type.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.Data.OleDb.OleDbException: You tried to assign
> the Null value to a variable that is not a Variant data type.
>
> Source Error:
>
> An unhandled exception was generated during the execution of the
> current web request. Information regarding the origin and location of the
> exception can be identified using the exception stack trace below.
>
> Stack Trace:
>
> [OleDbException (0x80004005): You tried to assign the Null value to a
> variable that is not a Variant data type.]
>
> System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
> dbParams, Object& executeResult) +177
> System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
> +194
> System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
> Object& executeResult) +56
> System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
> behavior, String method) +105
> System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +88
> System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand
> command, DataSourceOperation operation) +392
> System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary
> values) +403
> System.Web.UI.DataSourceView.Insert(IDictionary values,
> DataSourceViewOperationCallback callback) +68
> System.Web.UI.WebControls.DetailsView.HandleInsert (String commandArg,
> Boolean causesValidation) +390
> System.Web.UI.WebControls.DetailsView.HandleEvent( EventArgs e, Boolean
> causesValidation, String validationGroup) +609
> System.Web.UI.WebControls.DetailsView.OnBubbleEven t(Object source,
> EventArgs e) +87
> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
> +35
> System.Web.UI.WebControls.DetailsViewRow.OnBubbleE vent(Object source,
> EventArgs e) +109
> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
> +35
> System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +86
> System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
> eventArgument) +153
>
> System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) +7
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument) +11
> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +172
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921
>
>
>
> --------------------------------------------------------------------------------
> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
> ASP.NET Version:2.0.50727.42
>



 
Reply With Quote
 
 
 
 
Jim McGivney
Guest
Posts: n/a
 
      03-16-2006
Yes it is an access database.
There is no code, it was all put together with the detailsview smart-tag.
Jim

"Patrick.O.Ige" <(E-Mail Removed)> wrote in message
news:eKfBH$(E-Mail Removed)...
> Post some snippet code..
> Are you using MS Access?
> Patrick
>
> "Jim McGivney" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> In asp 2.0 I am trying to insert a row using a detailsview control
>> connected to an accessDataSource. I get the error message below. I am
>> having trouble identifing which data field is causing the problem. Any
>> suggestings are welcomed.
>> Jim
>> *************
>> You tried to assign the Null value to a variable that is not a Variant
>> data type.
>> Description: An unhandled exception occurred during the execution of the
>> current web request. Please review the stack trace for more information
>> about the error and where it originated in the code.
>>
>> Exception Details: System.Data.OleDb.OleDbException: You tried to assign
>> the Null value to a variable that is not a Variant data type.
>>
>> Source Error:
>>
>> An unhandled exception was generated during the execution of the
>> current web request. Information regarding the origin and location of the
>> exception can be identified using the exception stack trace below.
>>
>> Stack Trace:
>>
>> [OleDbException (0x80004005): You tried to assign the Null value to a
>> variable that is not a Variant data type.]
>>
>> System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
>> dbParams, Object& executeResult) +177
>> System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object&
>> executeResult) +194
>> System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
>> Object& executeResult) +56
>> System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
>> behavior, String method) +105
>> System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +88
>> System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand
>> command, DataSourceOperation operation) +392
>> System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary
>> values) +403
>> System.Web.UI.DataSourceView.Insert(IDictionary values,
>> DataSourceViewOperationCallback callback) +68
>> System.Web.UI.WebControls.DetailsView.HandleInsert (String commandArg,
>> Boolean causesValidation) +390
>> System.Web.UI.WebControls.DetailsView.HandleEvent( EventArgs e, Boolean
>> causesValidation, String validationGroup) +609
>> System.Web.UI.WebControls.DetailsView.OnBubbleEven t(Object source,
>> EventArgs e) +87
>> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
>> +35
>> System.Web.UI.WebControls.DetailsViewRow.OnBubbleE vent(Object source,
>> EventArgs e) +109
>> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
>> +35
>> System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +86
>> System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
>> eventArgument) +153
>>
>> System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
>> eventArgument) +7
>> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
>> sourceControl, String eventArgument) +11
>> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
>> +172
>> System.Web.UI.Page.ProcessRequestMain(Boolean
>> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>> +4921
>>
>>
>>
>> --------------------------------------------------------------------------------
>> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
>> ASP.NET Version:2.0.50727.42
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why c++ compiler don't assign NULL for us S S C++ 2 12-15-2008 11:43 PM
How do I assign a null value to a SqlDataReader? Learner ASP .Net 4 04-25-2006 07:26 PM
Begin() applied on empty Vector returns NULL or non null value???? Col C++ 1 04-21-2006 01:12 PM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
is it a good idea to assign object to pointer without initialising it to NULL. nrhayyal C++ 8 09-22-2005 02:21 PM



Advertisments