Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not an object
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Not an object
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01020230
Message ID:
01020230
Vues:
183
I keep recieveing the following error:
Line 104:		Dim dsCensus As DataSet = CType(Session("dsCensus"), DataSet)
Line 105:
Line 106:		Me.Save(Me.oCensus, dsCensus, Me.oCensus.TableName)
Line 107:		'If Me.Save(Me.oCensus, dsCensus, Me.oCensus.TableName) =  mmSaveDataResult.RulesPassed Then
Line 108:		Response.Redirect("CensusOptions.aspx")
With the following code behind:
Imports OakLeaf.MM.Main.Web.UI
Imports ATRA.Dogs.Business

Public Class CensusEdit
	Inherits mmBusinessWebPage

	Protected oCensus As boCensus
#Region " Web Form Designer Generated Code "

	'This call is required by the Web Form Designer.
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

	End Sub
	Protected WithEvents Label1 As System.Web.UI.WebControls.Label
	Protected WithEvents Label2 As System.Web.UI.WebControls.Label
	Protected WithEvents lblToday As System.Web.UI.WebControls.Label
	Protected WithEvents MmTextBox2 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox3 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox4 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox5 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox6 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox8 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox9 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox10 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox11 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox13 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox14 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox15 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox16 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox17 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox18 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox19 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox20 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox21 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox22 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox24 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents txtPKID As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents btnCancel As OakLeaf.MM.Main.Web.UI.WebControls.mmButton
	Protected WithEvents btnSave As OakLeaf.MM.Main.Web.UI.WebControls.mmButton
	Protected WithEvents Label3 As System.Web.UI.WebControls.Label
	Protected WithEvents Label4 As System.Web.UI.WebControls.Label
	Protected WithEvents Label5 As System.Web.UI.WebControls.Label
	Protected WithEvents Label6 As System.Web.UI.WebControls.Label
	Protected WithEvents Label7 As System.Web.UI.WebControls.Label
	Protected WithEvents Label8 As System.Web.UI.WebControls.Label
	Protected WithEvents Label9 As System.Web.UI.WebControls.Label
	Protected WithEvents Label10 As System.Web.UI.WebControls.Label
	Protected WithEvents Label11 As System.Web.UI.WebControls.Label
	Protected WithEvents Label12 As System.Web.UI.WebControls.Label
	Protected WithEvents PktRet As OakLeaf.MM.Main.Web.UI.WebControls.mmCheckBox
	Protected WithEvents LABEL13 As System.Web.UI.WebControls.Label
	Protected WithEvents MmDropDownList1 As OakLeaf.MM.Main.Web.UI.WebControls.mmDropDownList
	Protected WithEvents LABEL14 As System.Web.UI.WebControls.Label
	Protected WithEvents edtRelComments As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL15 As System.Web.UI.WebControls.Label
	Protected WithEvents MMTEXTBOX1 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL16 As System.Web.UI.WebControls.Label
	Protected WithEvents MMTEXTBOX7 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL17 As System.Web.UI.WebControls.Label
	Protected WithEvents LABEL18 As System.Web.UI.WebControls.Label
	Protected WithEvents MMTEXTBOX23 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL19 As System.Web.UI.WebControls.Label
	Protected WithEvents MmTextBox25 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmTextBox26 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL21 As System.Web.UI.WebControls.Label
	Protected WithEvents LABEL22 As System.Web.UI.WebControls.Label
	Protected WithEvents MMTEXTBOX27 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents MmDropDownList2 As OakLeaf.MM.Main.Web.UI.WebControls.mmDropDownList
	Protected WithEvents LABEL23 As System.Web.UI.WebControls.Label
	Protected WithEvents LABEL24 As System.Web.UI.WebControls.Label
	Protected WithEvents MMTEXTBOX28 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL25 As System.Web.UI.WebControls.Label
	Protected WithEvents MMTEXTBOX29 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL26 As System.Web.UI.WebControls.Label
	Protected WithEvents MMTEXTBOX30 As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox
	Protected WithEvents LABEL27 As System.Web.UI.WebControls.Label
	Protected WithEvents txtDatePktSent As OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox

	'NOTE: The following placeholder declaration is required by the Web Form Designer.
	'Do not delete or move it.
	Private designerPlaceholderDeclaration As System.Object

	Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
		'CODEGEN: This method call is required by the Web Form Designer
		'Do not modify it using the code editor.
		InitializeComponent()
	End Sub

#End Region


	Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		Dim lcId As String = Request.QueryString("pkid")
		Me.oCensus = CType(Me.RegisterBizObj(New boCensus), boCensus)
		Session("dsCensus") = Me.oCensus.GetAllSensus("pkid =" + lcId)

	End Sub

	Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
		Response.Redirect("CensusOptions.aspx")
	End Sub

	Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
		Dim dsCensus As DataSet = CType(Session("dsCensus"), DataSet)

		Me.Save(Me.oCensus, dsCensus, Me.oCensus.TableName)
'If Me.Save(Me.oCensus, dsCensus, Me.oCensus.TableName) =  mmSaveDataResult.RulesPassed Then
		Response.Redirect("CensusOptions.aspx")

	End Sub

End Class
This form loads and displays properly but when I try to save - Kaaaaapow! not an object. I tried to follow your example in the Jump start but obviously I missed something. Please advise.

Glenn
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform