1
Answer

SQL Server installation problems !!!

csharp rocks

csharp rocks

16y
2k
1
hi guys..i tried installing sql server 2000 , but in the beginning it showed the following error... "microsoft sql server 2000 standard edition server component is not supported on this operating system.only client components will be available for installation" ...then i tried sql server 2005 express, it gets installed , but not able to connect to a server.. server components r not installing properly.... my system has full configuration ..but no idea why its not getting installing properly..... guys pls help... i should some how install sql server 2005 and should "connect" to run a application..
Answers (1)
0
Lalit M

Lalit M

NA 6.7k 48k 15y
Bind the DropDownList like normal (set DataSourceID, DataTextField, DataValueField), and <%BIND%> the SelectedValue field. AutoPostBack should be enabled. In the OnSelectedIndexChanged:

 protected void DropDownSelectedIndexChanged(object sender, EventArgs e)
{
    //http://programming.top54u.com/post/GridView-DropDownList-Update-SelectedValue-All-At-Once.aspx
    //http://www.codeproject.com/KB/webservices/db_values_dropdownlist.aspx

    DropDownList d = sender as DropDownList;
    if (d == null) return;

    //grab row that contains the drop down list
    GridViewRow row = (GridViewRow)d.NamingContainer;

    //pull data needed from the row (in this case we want the ID for the row)
    object ID = gridEntries.DataKeys[row.RowIndex].Values["tableID"];


    SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SiteSqlServer"].ConnectionString);
    conn.Open();

    SqlCommand c = new SqlCommand("UPDATE table SET value = @v WHERE tableID = @id", conn);

    SqlParameter p = c.Parameters.Add("@id", SqlDbType.Int);
    p.Value = Convert.ToInt32(ID);

    p = c.Parameters.Add("@v", SqlDbType.Int);
    p.Value = Convert.ToInt32(d.SelectedValue);

    c.ExecuteNonQuery();

    //databind the gridview to reflect new data.
    gridEntries.DataBind();
}

more info