Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;datasource=d:\\nwind.mdb"
Dim sqlStr As String = "SELECT*FROMEmployees"
Dim conn As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(conStr)
Dim ds As DataSet = New DataSet()
Dim da As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(sqlStr, conn)
da.Fill(ds,"Employees")
Dim dm As NewFarPoint.Web.Spread.Model.DefaultSheetDataModel(ds, "Employees")
FpSpread1.ActiveSheetView.DataModel = dm
FpSpread1.ActiveSheetView.OperationMode = FarPoint.Web.Spread.OperationMode.RowMode
dm.ActiveRow = 2
conn.Close()
string conStr = "Provider=Microsoft.JET.OLEDB.4.0;datasource=d:\\nwind.mdb";
string sqlStr = "SELECT*FROMEmployees";
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(conStr);
DataSet ds = new DataSet();
System.Data.OleDb.OleDbDataAdapterda = new System.Data.OleDb.OleDbDataAdapter(sqlStr, conn);
da.Fill(ds,"Employees");
FarPoint.Web.Spread.Model.DefaultSheetDataModel dm = new FarPoint.Web.Spread.Model.DefaultSheetDataModel(ds, "Employees");
FpSpread1.ActiveSheetView.DataModel = dm;
FpSpread1.ActiveSheetView.OperationMode = FarPoint.Web.Spread.OperationMode.RowMode;
dm.ActiveRow = 2;
conn.Close();