开发者

fill dataset with data from SQLDataSource asp.net c#

I've created a SQL data source which gets data from a Interbase database, I now need to manipulate some of the data I was wondering if any one knew how I can get the data from the data source into a dataset.

Any ideas or even another ways would be gr开发者_JS百科eat.

UPDATE

so far I have managed to open a connection to the database using the following

    OdbcConnection conn = new OdbcConnection();
    conn.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString2"].ConnectionString;

    DataSet ds = new DataSet();

the query I want to get the data for is

SELECT NAME, SORG_GP, EXPEND, INV_GP, SRTN_GP FROM MTD_FIGURE_VIEW1


Is this working?

OdbcCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT NAME, SORG_GP, EXPEND, INV_GP, SRTN_GP FROM MTD_FIGURE_VIEW1";
new OdbcDataAdapter(cmd).Fill(ds);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜