i have a problem with access database in visual web developer

Discussion in 'Databases' started by derinweb, Aug 30, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. hello , i have a problem with access database in visual web developer , when i want to or insert a record to my access database it shows me this error messege :
    thanks for your help.


    Server Error in '/kurdpedia' Application.


    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:





    Code:
    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:





    Code:
    [OleDbException (0x80004005): You tried to assign the Null value to a variable that is not a Variant data type.]
       System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +65
       System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +181
       System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +307
       System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +77
       System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +188
       System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +112
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +493
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +549
       System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +173
       System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +623
       System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +745
       System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +163
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
       System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source, EventArgs e) +118
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +106
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +177
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +242
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837
    

    Version Information:Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 <!--
    [OleDbException]: You tried to assign the Null value to a variable that is not a Variant data type.
    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
    at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
    at System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation)
    at System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values)
    at System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback)
    at System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation)
    at System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup)
    at System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e)
    at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    at System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source, EventArgs e)
    at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
    at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
    at System.Web.UI.Page.HandleError(Exception e)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest()
    at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
    at System.Web.UI.Page.ProcessRequest(HttpContext context)
    at ASP.admin_kurdish_history_aspx.ProcessRequest(HttpContext context)
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    -->
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    This error usually means that you are trying to insert a NULL intoa Auto Numbered Column.

    You need to update your Insert statement such that it doesn't insert into the AutoNumbered Field.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page