Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Dinuraj

@Dinuraj
About
Posts
8
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Local IIS locaton not showing
    D Dinuraj

    Hi, I just install Visual Studio 2005 in my System.I tries to create Web application but i am not gatting Local IIS in Location drop down. My system already install VS 2002 and i want to continue with both the version. Help me to get Local IIS option in my VS 2005. Need Help!!!

    ASP.NET visual-studio csharp windows-admin help announcement

  • session variables
    D Dinuraj

    Session varable stored on server memory their is no performance issue but using number of session variable is depend upon the server configarion and volume of user in appication. Dinuraj

    ASP.NET question

  • how does cookieless = true work
    D Dinuraj

    how does cookieless = true work.What is the advantage. Can anyone help me

    ASP.NET help question

  • T-SQL transaction vs ADO.NET transactions
    D Dinuraj

    T-SQL transaction vs ADO.NET transactions What is the better to use between them? waiting for prompt reply

    ASP.NET question csharp database visual-studio

  • update database using dataset need help!!!
    D Dinuraj

    Hi, I am trying to bulk update database using dataset.I think so i have to pass update sql statement but i dont have idea. Can anyone hepl me... i am sending aspa page code as well code behind.. Please send me code not description.... <%@ Page language="c#" Codebehind="DataSetTest.aspx.cs" AutoEventWireup="false" Inherits="RnD.DataSetTest" %> DataSetTest

    Code Behind:-- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using Sy

    ASP.NET database csharp graphics design help

  • DataSet bulk update problem
    D Dinuraj

    Hi, I am developing a web appication using asp.net with c#. I am updating Dataset using datgrid EditItemTemplate and storing in cache. finally i want to update my table using SqlAdaptor Update mathod but i am gatting error.Please help me.. This is my Dataset Update mathod: public void grdEmployee_Update(Object o,DataGridCommandEventArgs e) { int id = (int)grdEmployee.DataKeys[e.Item.ItemIndex]; TextBox txtName,txtDesignation,txtSex,txtAge,txtSalary; txtName =(TextBox)e.Item.Cells[0].Controls[0]; txtDesignation =(TextBox)e.Item.Cells[1].Controls[0]; txtSex =(TextBox)e.Item.Cells[2].Controls[0]; txtAge =(TextBox)e.Item.Cells[3].Controls[0]; txtSalary =(TextBox)e.Item.Cells[4].Controls[0]; if (Cache["EMPCACHE"]!=null) { DataSet dsUpdate= (DataSet)Cache["EMPCACHE"]; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["NAME"]=txtName.Text; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["DESIGNATION"]=txtDesignation.Text; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["SEX"]=txtSex.Text; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["AGE"]=Convert.ToInt32(txtAge.Text); dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["SALARY"]=Convert.ToSingle(txtSalary.Text); dsUpdate.AcceptChanges(); Cache["EMPCACHE"]=dsUpdate; grdEmployee.EditItemIndex = -1 ; grdEmployee.DataSource = dsUpdate; grdEmployee.DataBind(); }} Finally i am going to update on Database using this code private void btnDatabaseUpdate_Click(object sender, System.EventArgs e) { try { string strConnection= System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString"); SqlConnection con = new SqlConnection(); con.ConnectionString = strConnection; SqlDataAdapter sda = new SqlDataAdapter("select ID,NAME,DESIGNATION,SEX,AGE,SALARY from EMPLOYEEDETAILS",con); SqlCommandBuilder scb = new SqlCommandBuilder(sda); sda.Fill(dsObj,"EMPLOYEEDETAILS"); DataSet dsUpdate = (DataSet)Cache["EMPCACHE"]; dsObj = dsUpdate.Copy(); int success=sda.Update(dsObj,"EMPLOYEEDETAILS"); dsObj.AcceptChanges(); grdEmployee.DataSource = dsObj; grdEmployee.DataBind(); } catch (Exception ex) { Response.Write(" " + ex.Message.ToString()); } } I am gatting this error: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information. waiting for promp reply

    ASP.NET help csharp database asp-net announcement

  • Selected index change
    D Dinuraj

    try this TextBox2.Text = DropDownList1.SelectedIndex.Text;

    ASP.NET csharp database

  • Need Help !!! Bult Update with Dataset
    D Dinuraj

    Hi, I am developing a web appication using asp.net with c#. I am updating Dataset using datgrid EditItemTemplate and storing in cache. finally i want to update my table using SqlAdaptor Update mathod but i am gatting error.Please help me.. This is my Dataset Update mathod: public void grdEmployee_Update(Object o,DataGridCommandEventArgs e) { int id = (int)grdEmployee.DataKeys[e.Item.ItemIndex]; TextBox txtName,txtDesignation,txtSex,txtAge,txtSalary; txtName =(TextBox)e.Item.Cells[0].Controls[0]; txtDesignation =(TextBox)e.Item.Cells[1].Controls[0]; txtSex =(TextBox)e.Item.Cells[2].Controls[0]; txtAge =(TextBox)e.Item.Cells[3].Controls[0]; txtSalary =(TextBox)e.Item.Cells[4].Controls[0]; if (Cache["EMPCACHE"]!=null) { DataSet dsUpdate= (DataSet)Cache["EMPCACHE"]; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["NAME"]=txtName.Text; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["DESIGNATION"]=txtDesignation.Text; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["SEX"]=txtSex.Text; dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["AGE"]=Convert.ToInt32(txtAge.Text); dsUpdate.Tables[0].Rows[e.Item.ItemIndex]["SALARY"]=Convert.ToSingle(txtSalary.Text); dsUpdate.AcceptChanges(); Cache["EMPCACHE"]=dsUpdate; grdEmployee.EditItemIndex = -1 ; grdEmployee.DataSource = dsUpdate; grdEmployee.DataBind(); }} Finally i am going to update on Database using this code private void btnDatabaseUpdate_Click(object sender, System.EventArgs e) { try { string strConnection= System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString"); SqlConnection con = new SqlConnection(); con.ConnectionString = strConnection; SqlDataAdapter sda = new SqlDataAdapter("select ID,NAME,DESIGNATION,SEX,AGE,SALARY from EMPLOYEEDETAILS",con); SqlCommandBuilder scb = new SqlCommandBuilder(sda); sda.Fill(dsObj,"EMPLOYEEDETAILS"); DataSet dsUpdate = (DataSet)Cache["EMPCACHE"]; dsObj = dsUpdate.Copy(); int success=sda.Update(dsObj,"EMPLOYEEDETAILS"); dsObj.AcceptChanges(); grdEmployee.DataSource = dsObj; grdEmployee.DataBind(); } catch (Exception ex) { Response.Write("
    " + ex.Message.ToString()); } } I am gatting this error: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information. waiting for promp reply

    ASP.NET csharp database help asp-net announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups