[求助]这段C#的code如果要换成VB的话是不是这样呢?
c#的:for (int x = 0; x < objDT.Rows.Count; x++) {
string sql = "INSERT INTO product (ID, Categories) VALUES ('" + objDT.Rows[x]["Quantity"].ToString() + "', '" + objDT.Rows[x]["Product"].ToString() + "')";
// execute sql here
}
换成VB:
Dim x as integer
Dim sql as String
for x = 0 to objDT.Rows.Count
sql = "INSERT INTO product (ID, Categories) VALUES ( objDT.Rows[x]["Quantity"].ToString() , objDT.Rows[x]["Product"].ToString())"
是不是这样呢?