以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- '红色代码处提示:未将对象引用设置到对象的实例. (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=188227) |
-- 作者:sysckj -- 发布时间:2023/9/9 8:23:00 -- '红色代码处提示:未将对象引用设置到对象的实例. Dim sb As StringBuilder Dim dr As DataRow =DataTables("users").find("name = \'" & username & "\'") If dr IsNot Nothing Then Dim dr1 As DataRow =DataTables("interest_classes").find("name = \'" & e.PostValues("iname") & "\'") Dim dr2 As List(Of DataRow) dr2 =DataTables("users").Select("[class] = \'" & dr("class") & "\' and [interestid] = \'" & dr1("id") & "\'") messagebox.Show("ok2") If dr2.count <=4 Then messagebox.Show("ok3") If dr("interestid")<>dr1("id") Then dr("interestid")=dr1("id") messagebox.Show("ok4") dr.Save() sb.AppendLine("报名成功! <br/><br/>") sb.AppendLine("<a href=\'default.htm\'>返回!</a>") e.WriteString(sb.ToString) End If messagebox.Show("ok5") Dim sb91 As StringBuilder messagebox.Show("ok6") sb91.AppendLine("Hello World") messagebox.Show("ok7") sb91.AppendLine("<a href=\'default.htm\'>返回!</a>") messagebox.Show("ok8") e.WriteString(sb91.ToString) messagebox.Show("ok9") Else messagebox.Show("ok10") sb.AppendLine("报名失败!本社团已满员!请选择其它社团报名! <br/><br/>") sb.AppendLine("<a href=\'default.htm\'>返回!</a>") e.WriteString(sb.ToString) End If Else messagebox.Show("ok4") Dim sb1 As StringBuilder sb1.AppendLine("报名失败! <br/><br/>") sb1.AppendLine("<a href=\'default.htm\'>返回!</a>") e.WriteString(sb1.ToString) End If e.WriteString(wb.Build) [此贴子已经被作者于2023/9/9 8:27:34编辑过]
|
-- 作者:有点蓝 -- 发布时间:2023/9/9 8:43:00 -- Dim sb As new StringBuilder Dim sb91 As new StringBuilder
|