Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert
Message
De
21/07/2008 14:44:11
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
21/07/2008 13:53:56
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Re: Insert
Divers
Thread ID:
01332830
Message ID:
01332915
Vues:
7
Sebastian,

>I try to insert a new record in a base SQL Server 2005, being still the guide.
>
>In the page_load Event:
>
> Me.oOrigen = CType(Me.RegisterBizObj(New Origen), Origen)
> Me.IdOrigen = Integer.Parse(Request.QueryString("IdOrigen"))
>
> Me.oOrigen.OrigenGetByID(Me.IdOrigen)
> Session("dsOrigen") = oOrigen.DataSet
>
>To insert:
>
> Dim ds As DataSet = CType(Session("dsOrigen"), DataSet)
>
> Me.oOrigen.NewRow(ds, Me.oOrigen.TableName)
>
> Session("ds") = dsOrigen
>
>To Save:
>
> Dim ds As DataSet = CTyThpe(Session("dsOrigen"), DataSet)
>
> If Me.Save(Me.oOrigen, ds, Me.oOrigen.TableName) = mmSaveDataResult.RulesPassed Then
> Response.Redirect("OrigenCrud.aspx")
> End If
>
>Display that error:
>
> System.NullReferenceException was unhandled by user code
> Message="Referencia a objeto no establecida como instancia de un objeto."
> Source="OakLeaf.MM2008.Framework"
>
>
>Thank for your time
>
>...Saludos Amigo...

Is all of this code in the Load Event or are you trying to save from a button or something? Since the error indicates a reference to an object that has not been instantiated; in the web environment it is important to keep track of the post backs and what is available. Can you post where these code pieces are in your form.
Thanks
Tim
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform