It says line 169 which appears to be this line
objDataRow = objDataTable.NewRow()
The html page has 2 panels.
PanelJoin
PanelComplete.
Inside PanelComplete is a ASP Repeater named tblBTC....
The names seem to be correct. I don't know why it would hose on that line.
a the lines before it seem to do fine.
objDataAdapter.Fill(objDataSet, "BTC MEMBERS")
objDataTable = objDataSet.Tables("tblBTC")
objDataRow = objDataTable.NewRow()
Have a nice day.
----- Original Message -----
From: "Mark E" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, January 11, 2005 7:51 PM
Subject: Re: [AspNetAnyQuestionIsOk] Form wil not submit.
>
> I usually see this when I am trying to access a control that doesn't
> exist. Or I misspelled the control name.
>
> Double check to make sure that you are correctly referencing all your
> controls.
>
> Mark
>
> [EMAIL PROTECTED] wrote:
> I have built the page and things work except udating the database. I get
> an error and have searched on the net but cannot figure out how to fix it.
> The error im getting is listed below. I am so close to making this work.
> It is probably something silly. Thank you. Awsome group.
>
> ERROR
>
> Server Error in '/btcNET' Application.
> --------------------------------------------------------------------------------
>
> Object reference not set to an instance of an object.
> 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.NullReferenceException: Object reference not set
> to an instance of an object.
>
> Source Error:
>
> 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:
>
> [NullReferenceException: Object reference not set to an instance of an
> object.]
> btcNET.JoinBTC.Page_Load(Object sender, EventArgs e) in
> \\webslave\wwwroot$\btcNET\JoinBTC.aspx.vb:169
> System.Web.UI.Control.OnLoad(EventArgs e) +102
> System.Web.UI.Control.LoadRecursive() +45
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +952
>
>
>
> --------------------------------------------------------------------------------
> Version Information: Microsoft .NET Framework Version:2.0.40607.42;
> ASP.NET Version:2.0.40607.42
>
> ERROR
>
>
>
>
>
>
>
>
>
>
>
>
> Here is the page code:
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
>
> If IsPostBack Then
> Dim strName, strPlayingname, strUserName, strPassword,
> strLocation, strEmail, strAge, strIcq, strAim, strOccupation
> Dim strBio, strPersonalInformation, strGamesPlayed, strConnect,
> strOS, strProcessor, strRam, strVideocard
> Dim strSoundcard, strHarddrive, strAdditionalsysteminformation,
> strPhoto, strSystemPhoto
>
> strName = Request.Form("name")
> strPlayingname = Request.Form("playingname")
> strUserName = Request.Form("username")
> strPassword = Request.Form("password")
> strLocation = Request.Form("location")
> strEmail = Request.Form("email")
> strAge = Request.Form("age")
> strIcq = Request.Form("icq")
> strAim = Request.Form("aim")
> strOccupation = Request.Form("occupation")
> strBio = Request.Form("bio")
> strPersonalInformation = Request.Form("personalinformation")
> strGamesPlayed = Request.Form("gamesplayed")
> strConnect = Request.Form("connect")
> strOS = Request.Form("os")
> strProcessor = Request.Form("processor")
> strRam = Request.Form("ram")
> strVideocard = Request.Form("videocard")
> strSoundcard = Request.Form("soundcard")
> strHarddrive = Request.Form("harddrive")
> strAdditionalsysteminformation =
> Request.Form("additionalsysteminformation")
> strPhoto = Request.Form("Photo")
> strSystemPhoto = Request.Form("SystemPhoto")
>
> 'Testing variables
> 'Response.Write(strName)
> 'Response.Write(strPlayingname)
> 'Response.Write(strUserName)
> 'Response.Write(strPassword)
> 'Response.Write(strLocation)
> 'Response.Write(strEmail)
> 'Response.Write(strAge)
> 'Response.Write(strIcq)
> 'Response.Write(strAim)
> 'Response.Write(strOccupation)
> 'Response.Write(strBio)
> 'Response.Write(strPersonalInformation)
> 'Response.Write(strGamesPlayed)
> 'Response.Write(strConnect)
> 'Response.Write(strOS)
> 'Response.Write(strProcessor)
> 'Response.Write(strRam)
> 'Response.Write(strVideocard)
> 'Response.Write(strSoundcard)
> 'Response.Write(strHarddrive)
> 'Response.Write(strAdditionalsysteminformation)
> 'Response.Write(strPhoto)
> 'Response.Write(strSystemPhoto)
>
>
> 'Hide The Form on Submit
> PanelJoin.Visible = False
>
>
>
> 'Open the Connection -------------------------------------
> Dim objConn As OleDbConnection
> Dim objConnString As String =
> "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\Inetpub\wwwroot\btcNET\DB\belcherman.mdb"
> objConn = New OleDb.OleDbConnection(objConnString)
> objConn.Open()
> '---------------------------------------------------------
>
> 'Create a DataSet ----------------------------------------
> Dim objDataSet As New DataSet
> 'Create a DataSet ----------------------------------------
>
> 'Build SQL String --------------------------------------
> Dim strSQLstring As String
> strSQLstring = "SELECT * FROM tblBTC"
> '-------------------------------------------------------
>
> 'Create a DataAdapter ------------------------------------
> Dim objDataAdapter As OleDbDataAdapter
> objDataAdapter = New OleDbDataAdapter(strSQLstring, objConn)
> 'Create a DataAdapter ------------------------------------
>
> 'Create a DataTable ----------------------------------------
> Dim objDataTable As DataTable
> 'Create a DataTable ----------------------------------------
>
> 'Create a DataRow ----------------------------------------
> Dim objDataRow As DataRow
> 'Create a DataRow ----------------------------------------
>
> objDataAdapter.Fill(objDataSet, "BTC MEMBERS")
>
> objDataTable = objDataSet.Tables("tblBTC")
>
> objDataRow = objDataTable.NewRow()
>
> 'Create Record Field Values here
> objDataRow.Item("Name") = strName
> objDataRow.Item("Playingname") = strPlayingname
> objDataRow.Item("UserName") = strUserName
> objDataRow.Item("Password") = strPassword
> objDataRow.Item("Location") = strLocation
> objDataRow.Item("Email") = strEmail
> objDataRow.Item("Age") = strAge
> objDataRow.Item("Icq") = strIcq
> objDataRow.Item("Aim") = strAim
> objDataRow.Item("Occupation") = strOccupation
> objDataRow.Item("Bio") = strBio
> objDataRow.Item("PersonalInformation") = strPersonalInformation
> objDataRow.Item("GamesPlayed") = strGamesPlayed
> objDataRow.Item("Connect") = strConnect
> objDataRow.Item("OS") = strOS
> objDataRow.Item("Processor") = strProcessor
> objDataRow.Item("Ram") = strRam
> objDataRow.Item("Videocard") = strVideocard
> objDataRow.Item("Soundcard") = strSoundcard
> objDataRow.Item("Harddrive") = strHarddrive
> objDataRow.Item("Additionalsysteminformation") =
> strAdditionalsysteminformation
> objDataRow.Item("Photo") = strPhoto
> objDataRow.Item("SystemPhoto") = strSystemPhoto
>
> objDataTable.Rows.Add(objDataRow)
> objDataAdapter.Update(objDataTable)
>
>
> tblBTC.DataSource = objDataSet
> tblBTC.DataBind()
>
>
> 'Show Completed Profile
> PanelComplete.Visible = True
>
> 'Close things up ------------------------------------
> objDataSet.Dispose()
> objDataSet = Nothing
>
> objDataAdapter = Nothing
>
> objConn.Close()
> objConn = Nothing
> 'Close things up ------------------------------------
>
>
>
> Else
> PanelJoin.Visible = True
> PanelComplete.Visible = False
>
>
> End If
>
>
>
>
> End Sub
>
>
>
>
> End Class
> End Page code:
>
>
>
> Mike Belcher
> Independent Computer Consultant
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/