error running site local and using online DB with no data

Topics: Help
Jan 12, 2008 at 11:27 PM
Edited Jan 13, 2008 at 2:56 AM
Hi All,
I am new to all of this.
error is below. It is say I have a null value and the code does not handle this. I used scripts to create the DB. Not the data.sql script.
I will try that. How do I transfer my data from my local database to the online database?
Thank you,
Jim


System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="App_Code.r-r6zepb"
StackTrace:
at ClubStarterKit.Web.Controls.PollControl.CreateControls() in C:\Documents and Settings\Jim\Desktop\Web site info\Express(VB) 3.1\AppCode\Controls\PollControl.vb:line 168 at ClubStarterKit.Web.Controls.PollControl.CreateChildControls() in C:\Documents and Settings\Jim\Desktop\Web site info\Express(VB) 3.1\AppCode\Controls\PollControl.vb:line 108 at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:


For Each row In AnswerTable
Dim percentage As Decimal = ComputePercentage(Poll.NumberOfVotesByAnswer(row.PollAnswerId))

Me.Controls.Add(New LiteralControl("<li>"))

Dim answerLabel As Label = New Label()
answerLabel.Text = String.Format("{0}:", row.Answer)
Me.Controls.Add(answerLabel)

Me.Controls.Add(New LiteralControl("<br/>"))

Dim img As New System.Web.UI.WebControls.Image
img.ImageUrl = "~/images/pixel.png"
img.Height = New Unit(7)
img.Width = New Unit(percentage.ToString())
Me.Controls.Add(img)
Coordinator
Jan 13, 2008 at 3:13 PM
Well, that's because you have no data :) Put in a sum data and it should work. Granted, we should have fixed this :)
Jan 14, 2008 at 12:19 AM


z2bass wrote:
Well, that's because you have no data :) Put in a sum data and it should work. Granted, we should have fixed this :)

Hi,
I am new to this and how would I add data directly to the database? do I have to add the key?
Thank you for your patience.
Jim
Jan 14, 2008 at 12:44 AM
I added data to PollAnswers and PollWuestions and the site came up.
Thank you,
Jim
Jan 14, 2008 at 1:23 AM


z2bass wrote:
Well, that's because you have no data :) Put in a sum data and it should work. Granted, we should have fixed this :)


z2bass or anyone,
What data is required to run the site so I can edit the other options?
Thank you,
Jim