Namespace: Nemiro.Data.SqlAssembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
Public Function GetData As DataSet
Public Function GetData As DataSet
Return Value
Type:
DataSetException | Condition |
---|
SqlException | The exception that is thrown when SQL Server returns a warning or error. |
using (SqlClient c = new SqlClient())
{
c.CommandText = "SELECT * FROM messages; SELECT * FROM users;";
DataSet data = c.GetData();
if(data.Tables.Count > 0)
{
foreach(DataTable t in data.Tables)
{
foreach(DataRow r in table.Rows)
{
Console.WriteLine("id = {0}", r["id"]);
}
}
}
}
using (SqlClient c = new SqlClient())
{
c.CommandText = "SELECT * FROM messages; SELECT * FROM users;";
DataSet data = c.GetData();
if(data.Tables.Count > 0)
{
foreach(DataTable t in data.Tables)
{
foreach(DataRow r in table.Rows)
{
Console.WriteLine("id = {0}", r["id"]);
}
}
}
}
Using c As new SqlClient()
c.CommandText = "SELECT * FROM messages; SELECT * FROM users;"
Dim data As DataSet = c.GetData()
If data.Tables.Count > 0 Then
For Each t As DataTable In data.Tables
For Each r As DataRow In table.Rows
Console.WriteLine("id = {0}", r("id"))
Next
Next
End If
End Using
Using c As new SqlClient()
c.CommandText = "SELECT * FROM messages; SELECT * FROM users;"
Dim data As DataSet = c.GetData()
If data.Tables.Count > 0 Then
For Each t As DataTable In data.Tables
For Each r As DataRow In table.Rows
Console.WriteLine("id = {0}", r("id"))
Next
Next
End If
End Using