Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert
Message
From
21/07/2008 14:44:11
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
21/07/2008 13:53:56
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Re: Insert
Miscellaneous
Thread ID:
01332830
Message ID:
01332915
Views:
6
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
Previous
Reply
Map
View

Click here to load this message in the networking platform