E
eljdh2
Guest
Hello,
I am sorry if this has been asked elsewhere but i cant seem to find an answer that will help me.
I am using visual studio 2013 and a data connection database from Microsoft access called RFID.mdb (which i made by editing the sample Northwind.mdb file)
I have followed the Microsoft tutorials on how to connect a database and make a data set and i know have the database and dataset in the solution explorer,
All i simply want to do is load the data i have from a text file into this database, i can load the data from the text file but i cannot seem to get the data into the data set so i can add it to the data base.
The error i get is on
RFIDDataSet1 is not declared. It may be inaccessible due to its protection level. On line 24 and 29.
I have tried removing the "1" as suggested and this gave me "Reference to a non-shared member requires an object reference."
I am not sure what i am doing wrong or what could be wrong, could anyone offer some help?
I am using visual basic.
Code:
-----------------------------------------------------------------------------------------------
Imports System.IO
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText("C:\gobetwino\Project\testlog.txt")
MsgBox(fileReader)
If File.Exists(fileReader) Then
Dim iofile As New StreamReader(fileReader)
Dim ioline As String
Dim DandT, Reader, Id
ioline = iofile.Readline
While Not ioline = ""
Dim mysplit = Split(ioline, ";")
DandT = mysplit(0)
Reader = mysplit(1)
Id = mysplit(2)
Dim newImportRow As RFIDDataSet.ImportRow
newImportRow = RFIDDataSet.Import.NewImportRow()
newImportRow.DateTime = DandT
newImportRow.ReaderNum = Reader
newImportRow.TagNum = Id
RFIDDataSet1.Import.Rows.Add(newImportRow)
End While
End If
End Sub
End Class
------
Error lines:
newImportRow = RFIDDataSet1.Import.NewImportRow()
RFIDDataSet1.Import.Rows.Add(newImportRow)
Continue reading...
I am sorry if this has been asked elsewhere but i cant seem to find an answer that will help me.
I am using visual studio 2013 and a data connection database from Microsoft access called RFID.mdb (which i made by editing the sample Northwind.mdb file)
I have followed the Microsoft tutorials on how to connect a database and make a data set and i know have the database and dataset in the solution explorer,
All i simply want to do is load the data i have from a text file into this database, i can load the data from the text file but i cannot seem to get the data into the data set so i can add it to the data base.
The error i get is on
RFIDDataSet1 is not declared. It may be inaccessible due to its protection level. On line 24 and 29.
I have tried removing the "1" as suggested and this gave me "Reference to a non-shared member requires an object reference."
I am not sure what i am doing wrong or what could be wrong, could anyone offer some help?
I am using visual basic.
Code:
-----------------------------------------------------------------------------------------------
Imports System.IO
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText("C:\gobetwino\Project\testlog.txt")
MsgBox(fileReader)
If File.Exists(fileReader) Then
Dim iofile As New StreamReader(fileReader)
Dim ioline As String
Dim DandT, Reader, Id
ioline = iofile.Readline
While Not ioline = ""
Dim mysplit = Split(ioline, ";")
DandT = mysplit(0)
Reader = mysplit(1)
Id = mysplit(2)
Dim newImportRow As RFIDDataSet.ImportRow
newImportRow = RFIDDataSet.Import.NewImportRow()
newImportRow.DateTime = DandT
newImportRow.ReaderNum = Reader
newImportRow.TagNum = Id
RFIDDataSet1.Import.Rows.Add(newImportRow)
End While
End If
End Sub
End Class
------
Error lines:
newImportRow = RFIDDataSet1.Import.NewImportRow()
RFIDDataSet1.Import.Rows.Add(newImportRow)
Continue reading...