我知道我在这里是一个白痴,我只是不能解决它。但我试图从vb.net数据库中取回一些数据。它没有被设置为对象错误的实例,而是落在了对象引用上。在代码运行之前,它说变量在被设置之前被使用,但是我看不到。代码:VB.net数据库连接空引用
Private taNotifications As dsDataTableAdapters.NotificationsTableAdapter = New dsDataTableAdapters.NotificationsTableAdapter
Dim notification As dsData.NotificationsDataTable = taNotifications.GetDataByClientID(userrow.UserID)
If notification.Rows.Count > 0 Then
Dim notificationrow As dsData.NotificationsRow
Dim forwardURL As String = notificationrow.ForwardLocation
End If
它在Dim forwardURL As String = notificationrow.ForwardLocation
非常感谢!真的很有帮助 – TMB87