当那里有用户ID时,我有数据库;我有一个 for 循环,我希望循环一直运行到最后一个 ID 示例:for (i=0; i > something; i++)
我的问题是这应该是什么?我也有代码的开头
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.OleDb;
public partial class _Default : System.Web.UI.Page
{
public string strLname;
public string strEmail;
public string strFname;
protected void Page_Load(object sender, EventArgs e)
{
string dbPath = Server.MapPath(@"App_Data") + "/my_site.mdb";
string connectionString = @"Data Source='" + dbPath + "';Provider='Microsoft.Jet.OLEDB.4.0';";
OleDbConnection con = new OleDbConnection(connectionString);
con.Open();
string QueryString = "SELECT * FROM tbl_users";
OleDbCommand cmd = new OleDbCommand(QueryString, con);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "tbl");
con.Close();
for (i=0; i < *something*; i++)
}
}