K
KKuser
Hello......
I know this might be a kind of "FAQ", but somehow I really can't find any
clue...(including MSDN)...
My code is as following...
Dim drow As DataRow
Dim ada As New SqlDataAdapter()
Dim ads = New DataSet()
Dim astrConn As String = "data source=(local);persist security
info=False;user id=" + UID + ";password=" + Pwd
Dim aconn = New SqlConnection(astrConn)
aconn.Open()
drow = ads.Tables("i_cust").NewRow
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the compiler stops here and says:
"System.NullReference.Exception" occurred
Object variable or With block variable not set
Could anyone tell me what's wrong and how to correct it?
Thanks!!
I know this might be a kind of "FAQ", but somehow I really can't find any
clue...(including MSDN)...
My code is as following...
Dim drow As DataRow
Dim ada As New SqlDataAdapter()
Dim ads = New DataSet()
Dim astrConn As String = "data source=(local);persist security
info=False;user id=" + UID + ";password=" + Pwd
Dim aconn = New SqlConnection(astrConn)
aconn.Open()
drow = ads.Tables("i_cust").NewRow
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the compiler stops here and says:
"System.NullReference.Exception" occurred
Object variable or With block variable not set
Could anyone tell me what's wrong and how to correct it?
Thanks!!