Click here to Skip to main content
15,897,718 members
Home / Discussions / C#
   

C#

 
QuestionRe: Determine which users have a file locked? Pin
Martin#18-Jun-07 0:16
Martin#18-Jun-07 0:16 
Generalthis.ServiceName Pin
CraigSch11-Mar-04 6:42
CraigSch11-Mar-04 6:42 
GeneralRe: this.ServiceName Pin
John Fisher11-Mar-04 16:32
John Fisher11-Mar-04 16:32 
GeneralBindtoObject translation Issues Pin
Tristan Rhodes11-Mar-04 5:39
Tristan Rhodes11-Mar-04 5:39 
General- Solved. - ref GUID? Pin
Tristan Rhodes12-Mar-04 1:02
Tristan Rhodes12-Mar-04 1:02 
GeneralRe: - Solved. - ref GUID? Pin
Mike Dimmick12-Mar-04 2:25
Mike Dimmick12-Mar-04 2:25 
GeneralRe: - Solved. - ref GUID? Pin
Tristan Rhodes12-Mar-04 3:20
Tristan Rhodes12-Mar-04 3:20 
Generalfill a textbox from a dataset Pin
krisman11-Mar-04 4:43
krisman11-Mar-04 4:43 
Hi. This is probably real easy, but I just can't seem to figure it out. I have a dataset that returns a unique value. I would like to move that value to a textbox. No matter what I try, I can't get my code to fill the textbox.

I use a dataadapter, dataset, sqlcommand and sqlparm to read a sql2000 stored procedure. I put in the city name and get out the unique city id number we use. I've run teh stored procedure separately and I know it works. Do I databind the textbox to the dataset?

This is the code I'm currently using:
da = new SqlDataAdapter("ap_prs_frm_addr_urbn_cmty_id", addr_urbn_conn);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
ds = new DataSet();
SqlParameter addr_urbn_parm;

addr_urbn_parm = new SqlParameter("@cmty_desc", System.Data.SqlDbType.VarChar);
addr_urbn_parm.Direction = ParameterDirection.Input;
addr_urbn_parm.Value = ddlAddrUrbnCmty.SelectedItem.Text;

addr_urbn_parm = new SqlParameter("@cmty_id", System.Data.SqlDbType.VarChar);
addr_urbn_parm.Direction = ParameterDirection.Input;
addr_urbn_parm.Value = ds.ToString();
da.SelectCommand.Parameters.Add(addr_urbn_parm);

addr_urbn_conn.Open();
da.Fill(ds);
addr_urbn_conn.Close();

this.txtAddrUrbnCmtyID.DataBind();

Help!!!!!!!



Krisman
GeneralRe: fill a textbox from a dataset Pin
Guinness4Strength11-Mar-04 4:47
Guinness4Strength11-Mar-04 4:47 
GeneralRe: fill a textbox from a dataset Pin
krisman11-Mar-04 5:28
krisman11-Mar-04 5:28 
GeneralRe: fill a textbox from a dataset Pin
partyganger11-Mar-04 5:56
partyganger11-Mar-04 5:56 
GeneralRe: fill a textbox from a dataset Pin
Edbert P11-Mar-04 16:22
Edbert P11-Mar-04 16:22 
GeneralRe: fill a textbox from a dataset Pin
krisman15-Mar-04 2:56
krisman15-Mar-04 2:56 
GeneralRe: fill a textbox from a dataset Pin
Edbert P15-Mar-04 11:11
Edbert P15-Mar-04 11:11 
GeneralRe: fill a textbox from a dataset Pin
krisman16-Mar-04 2:51
krisman16-Mar-04 2:51 
GeneralWindows XP and Shell Pin
Guinness4Strength11-Mar-04 4:11
Guinness4Strength11-Mar-04 4:11 
GeneralRe: Windows XP and Shell Pin
Mike Dimmick12-Mar-04 2:28
Mike Dimmick12-Mar-04 2:28 
Generalprinting Pin
cmarmr11-Mar-04 4:01
cmarmr11-Mar-04 4:01 
GeneralRe: printing Pin
Not Active11-Mar-04 4:30
mentorNot Active11-Mar-04 4:30 
QuestionLock a file? Pin
Anonymous11-Mar-04 3:29
Anonymous11-Mar-04 3:29 
AnswerRe: Lock a file? Pin
Heath Stewart11-Mar-04 5:25
protectorHeath Stewart11-Mar-04 5:25 
AnswerRe: Lock a file? Pin
Manster11-Mar-04 5:46
Manster11-Mar-04 5:46 
GeneralRe: Lock a file? Pin
astanley12-Mar-04 2:06
sussastanley12-Mar-04 2:06 
GeneralRe: Lock a file? Pin
Heath Stewart12-Mar-04 3:11
protectorHeath Stewart12-Mar-04 3:11 
GeneralLicenseManager, LicenseProvider Pin
claude12345678911-Mar-04 3:11
claude12345678911-Mar-04 3:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.