R
ruca
Hi,
I have this code:
--------------------------------------------
Dim myDataSet As DataSet
myDataSet = New DataSet("Funcionarios")
' Create two DataTable objects using a function.
Dim table As New DataTable()
Dim col as DataColumn
Dim data, dia, mes, ano as String
Dim horas as Date
Dim strValor as Date
'Adicionar três colunas
col = New DataColumn ("CdRcs", System.Type.GetType("System.String"))
table.Columns.Add(col)
col = New DataColumn ("Name", System.Type.GetType("System.String"))
table.Columns.Add(col)
col = New DataColumn ("Pwd", System.Type.GetType("System.String"))
table.Columns.Add(col)
myDataSet.Tables.Add(table)
Console.WriteLine(myDataSet.DataSetName, myDataSet.Tables.Count)
--------------------------------------------
Now I want to add some rows to myDataSet. How can I do that?
Example:
CdRsc = "001"
Name = "XPTO"
Pwd = "****"
CdRsc = "002"
Name = "OTPX"
Pwd = "****"
etc, etc...
NOTE: I don't have any DB associated, and it must be this way.
Thanks,
ruca
I have this code:
--------------------------------------------
Dim myDataSet As DataSet
myDataSet = New DataSet("Funcionarios")
' Create two DataTable objects using a function.
Dim table As New DataTable()
Dim col as DataColumn
Dim data, dia, mes, ano as String
Dim horas as Date
Dim strValor as Date
'Adicionar três colunas
col = New DataColumn ("CdRcs", System.Type.GetType("System.String"))
table.Columns.Add(col)
col = New DataColumn ("Name", System.Type.GetType("System.String"))
table.Columns.Add(col)
col = New DataColumn ("Pwd", System.Type.GetType("System.String"))
table.Columns.Add(col)
myDataSet.Tables.Add(table)
Console.WriteLine(myDataSet.DataSetName, myDataSet.Tables.Count)
--------------------------------------------
Now I want to add some rows to myDataSet. How can I do that?
Example:
CdRsc = "001"
Name = "XPTO"
Pwd = "****"
CdRsc = "002"
Name = "OTPX"
Pwd = "****"
etc, etc...
NOTE: I don't have any DB associated, and it must be this way.
Thanks,
ruca