Re: Programatically using Datasets

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

From: Brian Conway (Brian.Conway_at_qwest.com)
Date: 06/08/04


Date: Tue, 8 Jun 2004 09:33:56 -0600

Is there a way to convert that to UpperCase?

"Martin Marinov" <memmarinov@mecrossroad.bg> wrote in message
news:u1aqJqWTEHA.1232@TK2MSFTNGP09.phx.gbl...
> it is not a problem with the event,
> you have to implicity cast, e.g. :
>
> txtLastName.Text = (string)CUID.Tables[0].Rows[0]["sn"];
>
> Martin
>
> "Brian Conway" <Brian.Conway@qwest.com> wrote in message
> news:#h5KFgWTEHA.3336@TK2MSFTNGP10.phx.gbl...
> > Thanks for the response.
> >
> > I put that in there however, I am getting an error message from it. Can
> this
> > not go in the click event? The error I am getting is Cannot implicity
> > convert type object to string. I have included the whole section of code
> > that I have for my click event. I am using the datagrid right now for
> > testing to be sure I am getting a single record return which I do.
> >
> > private void btnAutoFill_Click(object sender, System.EventArgs e)
> >
> > {
> >
> > {
> >
> > Conference_Request.LDAP.AuthenticationServices User = new
> > Conference_Request.LDAP.AuthenticationServices();
> >
> > DataSet CUID = new DataSet();
> >
> > CUID = User.getUserInfo(txtCUID.Text);
> >
> > DataGrid1.DataSource = CUID.Tables[0];
> >
> > DataGrid1.DataBind();
> >
> >
> > txtLastName.Text = CUID.Tables[0].Rows[0]["sn"];
> >
> > }
> >
> > }
> >
> > "Martin Marinov" <memmarinov@mecrossroad.bg> wrote in message
> > news:%23F6lF$VTEHA.2236@TK2MSFTNGP09.phx.gbl...
> > > You have to do it manually. If you sure that you will receive only one
> > > record you can do this
> > >
> > > TextBox1.Text =
> dataSet.Tables[0].Rows[0]["The_column_name_for_TextBox1"];
> > > Label1.Text = dataSet.Tables[0].Rows[0]["The_column_name_for_Label1"];
> > >
> > > if you can receive more than one record use Rows[index_of_the_row]
> > >
> > > Regards
> > > Martin Marinov
> > >
> > > "Brian Conway" <Brian.Conway@qwest.com> wrote in message
> > > news:uDnCv0VTEHA.3988@tk2msftngp13.phx.gbl...
> > > > I am trying to dynamically generate a dataset that pulls back
> > information
> > > > based off of a login id, once it has the dataset I want to take
> > > information
> > > > from the dataset and populate editable fields on a form. So far I
> know
> > > that
> > > > the click event works based off of the login id, because I can get a
> > > > datagrid to populate with the correct information. However, I don't
> > want
> > > to
> > > > use a datagrid, I want to be able to use the dataset and bind the
data
> > > from
> > > > the dataset columns which will only return one record to particular
> > > textbox
> > > > fields on the form. How do I do this. This is for a Webform.
> > > >
> > > > I have tried this, but it kicks back several errors. (sn for some
> > reason
> > > is
> > > > what they called lastname)
> > > > txtLastName.DataBindings.Add(new DataBinding("Text", CUID, "SN"));
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Exceptions and Error Handling
    ... > user with an error message is `never'. ... Why is "abort, retry, fail" not a good example? ... For example, in one program, I was loading a Help system. ... have cookies turned on and that was the code's response in that situation. ...
    (comp.lang.java.help)
  • RE: Update Combo Box
    ... Response As Integer) ... Response = acDataErrContinue ... ElseIf intresult = vbYes Then ... 'Continue without displaying default error message ...
    (microsoft.public.access.formscoding)
  • RE: Update Combo Box
    ... Response As Integer) ... Response = acDataErrContinue ... ElseIf intresult = vbYes Then ... 'Continue without displaying default error message ...
    (microsoft.public.access.formscoding)
  • Re: svc host message error? what can i do?- official response!
    ... you might see the error message every time you start up your computer. ... We will include a link to the article in this response when the solution becomes available. ... to reinstall XP which resulted in my having to reinstall a lot of ... In my case is always the on board sound card that seems ...
    (microsoft.public.windowsupdate)
  • Re: Advanced Filter Issue
    ... You are right, Martin. ... The error message is ... Does Advanced Filter behave properly now? ... I tried with the heading-row included and excluded but the result doesn't ...
    (microsoft.public.excel.misc)