string strConn = "data source = 127.0.0.1;initial catalog=Pubs; integrated security = SSPI";
string sqlStr = "SELECT * FROM Authors; Select * From Titles";
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(sqlStr, strConn);
DataSet ds = new DataSet();
da.Fill(ds);
FarPoint.Web.Spread.Model.IDataSourceSupport dss;
dss = (FarPoint.Web.Spread.Model.IDataSourceSupport)FpSpread1.ActiveSheetView.DataModel;
dss.AutoGenerateColumns = true;
dss.DataSource = ds;
dss.DataMember = "Table";
dss.DataKeyField = "auid";
int i;
i = dss.GetDataColumnFromModelColumn(2);
Response.Write("The data column is " + i.ToString());