Re: DataAdapter Select with Parameters
From: One Handed Man \( OHM - Terry Burns \) ("One)
Date: 07/02/04
- Next message: Ken Tucker [MVP]: "Re: Label control border color"
- Previous message: Supra: "Re: SMTPMail.Send(MailMessage) - deliberately slow?"
- In reply to: jack: "Re: DataAdapter Select with Parameters"
- Next in thread: jack: "Re: DataAdapter Select with Parameters"
- Reply: jack: "Re: DataAdapter Select with Parameters"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 2 Jul 2004 14:26:56 +0100
OK, I think I see what your trying to do then.
So, on the event for textChanged or under a button
Dim SQLString = "SELECT . .. . . . . . .
DataAdapter.Clear()
DataAdapter.Fill( DataSet, TableName )
You dont need to rebind it.
Then is should be a simple matter of tuning your select statement.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"jack" <jack@sonomaenterprises.com> wrote in message
news:252b001c46035$d2500810$a401280a@phx.gbl...
> I removed the where clause and it returns all the records
> with out error.
>
> This is a windows application (not web), it a windows form
> with a datagrid on the form.
>
> I am sure once I understand the details of data access
> in .NET it will be an improvement from V6, but right now
> this is sooo frustrating. I spend hours getting basic
> things working that took minutes in v6.......
>
>
> >-----Original Message-----
> >In the absence of a DataBind() statement, I assume you
> are using Windows
> >Forms. If this is the case, the bound data will be
> reflected in the DataGrid
> >each time it is changed.
> >
> >Your problem, looks as if its more related to the data
> you are selected. For
> >a test, try hard coding the select statement to retreive
> known ' or all '
> >values and then take it from there.
> >
> >HTH
> >
> >--
> >
> >OHM ( Terry Burns )
> > . . . One-Handed-Man . . .
> >
> >Time flies when you don't know what you're doing
> >
> >"Jack" <Jack@sonomaenterprises.com> wrote in message
> >news:2525e01c4602f$6b2f5510$a501280a@phx.gbl...
> >> I have the following:
> >>
> >> * An OLEDBCommand with command text "SELECT CAMPAIGN,
> >> DAY_OUT WHERE (CAMPAIGN LIKE '@campaign')"
> >> * A DataAdapter that point the select to the above
> command
> >> * A data grid that I use to display the data
> >> * form load code to populate the controls:
> >> DsCampaign1 = New DataSet
> >> cmdProActiTmp_Sel.Parameters.Item("@Campaign").Value = _
> >> Trim(txtcampaign.Text())
> >> DataAdapter1.Fill(DsCampaign1)
> >> DataGrid1.SetDataBinding(DataAdapter1, _
> >> cmdProActiTmp_Sel.ToString)
> >>
> >> The issue:
> >>
> >> I always get a zero result set, regardless of what the
> >> value of txtcampaign.
> >> TxtCampaign is null when the form first loads but
> changes
> >> based upon events on the form. How do I get the
> datagrid
> >> to refresh and use the value?
> >
> >
> >.
> >
- Next message: Ken Tucker [MVP]: "Re: Label control border color"
- Previous message: Supra: "Re: SMTPMail.Send(MailMessage) - deliberately slow?"
- In reply to: jack: "Re: DataAdapter Select with Parameters"
- Next in thread: jack: "Re: DataAdapter Select with Parameters"
- Reply: jack: "Re: DataAdapter Select with Parameters"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|