I need a help.. How binding C1WebDataSet direct on DB?

Legacy

A description has not yet been added to this group.

I need a help.. How binding C1WebDataSet direct on DB?

  • rated by 0 users
  • This post has 2 Replies |
  • 2 Followers
  • Hi~

    I'm begginig Developer for asp.net.

     I have many problems.. so, ask for your help.

     please see the source

             SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            SqlCommand cmd = new SqlCommand("select * from products",con);
            SqlDataAdapter ad = new SqlDataAdapter();
            ad.SelectCommand = cmd;
            DataSet ds = new DataSet();
            ad.Fill(ds);
     and..      

            C1WebDataSet.????= ds.Tables[0].Rows[0]["productid"] <---what i do??

    and..

     

    -- i will convert DataSet to C1WebDataSet like this source ... so what i do??

        public static void Bind( DataSet dSet, C1WebDataSet GDS )
        {
            GDS.addDataColumnsHeader(dSet.Tables[0]);
            GDS.addDataColumnEnd();
            foreach ( DataRow Row in dSet.Tables[0].Rows )
            {
                foreach ( DataColumn column in dSet.Tables[0].Columns )
                {
                    GDS.addDataRowValue(column.ColumnName, Row[column.ColumnName]);
                }
                GDS.addDataRow();
            }
            GDS.end();
        }

     

    -Pai

     

     

     

  • Use the DataSet object instead of C1WebDataSet. Why do you want to
    convert it to a C1WebDataSet? I don't see what are you trying to do.
  • dear Andrey 

    thank you for your answer.

    -Pai

     

     

Page 1 of 1 (3 items)