adding data

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Selen (skiyanc_at_yahoo.com)
Date: 03/02/04


Date: Tue, 2 Mar 2004 12:00:00 +0200

Hello,
I add my data from sqlserver to dropdownlist on formload.I wanted it doesnt
load data every time on form load.I made if session is null then load if
session isnt null dont load.I add to sqlserver a new data ans I make session
is null.But in dropdownlist I coudnt see my new data.I use below code for
adding.I make logic error. Is Using Session logic true? or I have to refresh
sql data if so how can I do this...
SqlConnection conn=new SqlConnection ();

conn.ConnectionString
="server=(local)\\sql2000;database=db_Kalite_Data;uid=sa;pwd=antalya";

SqlCommand cmd=new SqlCommand ();

cmd.Connection =conn;

string str="insert ........................";

cmd.CommandText =str;

conn.Open ();

cmd.ExecuteNonQuery ();

conn.Close ();

Thanks...



Relevant Pages

  • Re: adding data
    ... > I add my data from sqlserver to dropdownlist on formload.I wanted it ... > load data every time on form load.I made if session is null then load if ... > session isnt null dont load.I add to sqlserver a new data ans I make ...
    (microsoft.public.dotnet.framework.aspnet)
  • adding data
    ... I add my data from sqlserver to dropdownlist on formload.I wanted it doesnt ... load data every time on form load.I made if session is null then load if ... session isnt null dont load.I add to sqlserver a new data ans I make session ... SqlCommand cmd=new SqlCommand; ...
    (microsoft.public.sqlserver.programming)
  • adding data
    ... I add my data from sqlserver to dropdownlist on formload.I wanted it doesnt ... load data every time on form load.I made if session is null then load if ... session isnt null dont load.I add to sqlserver a new data ans I make session ... SqlCommand cmd=new SqlCommand; ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: ASPSTATE issues
    ... The application used sqlserver connections to a certain ... Are you using the SQLServer as the ASP.NET web application's Session ... here are some tech articles on server process monitor and ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: adding data
    ... >> I add my data from sqlserver to dropdownlist on formload.I wanted it ... >> load data every time on form load.I made if session is null then load ... > I think the problem is, that you must re-bind the dropdownlist after ...
    (microsoft.public.dotnet.framework.aspnet)