Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2001
    Messaggi
    112

    Inserimento Nuovo record

    Salve a tutti,
    sto iniziando da poco a scivere in ASp.net e uso il tool free di $MS.
    usando il GridView e poi il DetailsView per editare e aggiornare il record non ho problemi, ma quando voglio aggiungere un nuovo record, si visualizza tutto questo:


    codice:
    Server Error in '/miosito' Application.
    [OleDbException (0x80004005): Impossibile assegnare il valore Null ad una variabile non di tipo Variant.]
       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.DetailsView.HandleInsert(String commandArg, Boolean causesValidation) +624
       System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +745
       System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source, EventArgs e) +162
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
       System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source, EventArgs e) +117
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +175
       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) +244
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3838

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2001
    Messaggi
    112
    un aiutino????

  3. #3
    Utente di HTML.it L'avatar di tyson69
    Registrato dal
    Jan 2005
    Messaggi
    154
    ...te lo dice nella seconda riga
    Codice PHP:
    Impossibile assegnare il valore Null ad una variabile non di tipo Variant.] 
    valorizza la variabile(vedi se numerica o altro)!

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2001
    Messaggi
    112
    il database è quello di prova Northwind.

    Il problema me lo fa anche se uso un db access dove ID è chiave primaria.

    Ma il problema è sul db??

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.