急救!!120...VB.NET问题
imports system.data
imports system.data.sqlclient
imports system.nullreferenceexception
public class _default
inherits system.web.ui.page
# region "web 窗体设计器
...简了
dim mycon as sqlconnection
dim mycom as sqlcommand
sub page_load(sender as object,e as eventargs)
if not ispostback then
mycon=new sqlconnection("data source=(local);initial catalog=lyzygl;user id=sa;")
mycom=new sqlcommand("select name,passwd from ydzy",mycon)
end if
end sub
sub button1_click(sender as object,e as eventargs)
mycon.open()
dim dt as SqlDataReader=mycom.ExcuteReader()
while dt.read()
if trim(dt("name"))=trim(textbox1.text) and trim(dt("passwd"))=trim(textbox2.text) then
reponse.redirect("announce.aspx")
end if
dt.read()
end while
message.html="用户不存在或者密码错误!"
end sub
......以下简了....
错误信息为:未将对象引用设置到对象的实例/////
不要叫我换成 datatable...因为我换了也不行!我的程序里每个页面全是这种错误我已经倒了。!!!!谢谢告诉我。。。。。
imports system.data.sqlclient
imports system.nullreferenceexception
public class _default
inherits system.web.ui.page
# region "web 窗体设计器
...简了
dim mycon as sqlconnection
dim mycom as sqlcommand
sub page_load(sender as object,e as eventargs)
if not ispostback then
mycon=new sqlconnection("data source=(local);initial catalog=lyzygl;user id=sa;")
mycom=new sqlcommand("select name,passwd from ydzy",mycon)
end if
end sub
sub button1_click(sender as object,e as eventargs)
mycon.open()
dim dt as SqlDataReader=mycom.ExcuteReader()
while dt.read()
if trim(dt("name"))=trim(textbox1.text) and trim(dt("passwd"))=trim(textbox2.text) then
reponse.redirect("announce.aspx")
end if
dt.read()
end while
message.html="用户不存在或者密码错误!"
end sub
......以下简了....
错误信息为:未将对象引用设置到对象的实例/////
不要叫我换成 datatable...因为我换了也不行!我的程序里每个页面全是这种错误我已经倒了。!!!!谢谢告诉我。。。。。
...全文
相关推荐
VB.net程序源码120实例(VS2013)
这个压缩包包含120个VB.NET编程实例,适用于在Visual Studio 2013环境中学习和实践。通过这些实例,你可以深入理解VB.NET的核心特性和实际应用。1.
VB.net中调用外部的EXE程序的处理问题
在VB.net编程中,调用外部EXE程序是一种常见的操作,尤其是在自动化脚本或需要执行特定任务时。本文将深入解析如何通过VB.net中的Process类来管理和控制外部可执行文件(EXE)的执行,以及
Vb.Net问题集.rar_VB .net_vb.net_vb.net_
这个“Vb.Net问题集.rar”压缩包显然包含了一些关于VB.NET编程中常见问题的资料,包括一个名为“Vb.Net问题集.doc”的文档和一个可能是链接或参考资源的“www.pudn.com.txt
VB以及VB.net试题和答案
VB(Visual Basic)和VB.NET是两种源自同一编程语言家族的编程工具,由微软公司开发。VB.NET是VB的现代版本,它基于.NET框架,提供了更强大的功能和更现代的编程模型。
棋盘问题VB.NET
在VB.NET编程环境中,"棋盘问题"是一个经典的计算几何问题,主要涉及到对二维空间的正方形和长方形数量的统计。在这个问题中,我们有一个x * y大小的棋盘,其中每个小方格被视为一个单位长度的边。


