Re: Why can't i find a row in a dataset?

From: VJ (vijaybalki_at_yahoo.com)
Date: 03/17/05


Date: Thu, 17 Mar 2005 09:47:32 -0600

See below

"Paul Custance" <paul@sendmeanemail.net> wrote in message
news:%23A6O2gwKFHA.4092@tk2msftngp13.phx.gbl...
> Hi,
>
> Currently had a Dataset that has information from the Northwind database,
> Customers table in it.
>
> I have created my update and select commands and they work fine.
>
> When I go to update a row in the data set I use this
>
> //Get the datarow to edit
> DataRow[] adrEdit = ds.Tables["Customers"].Select("CustomerID =
> 'txtCustomerID.Text'");

- Replace with

DataRow[] adrEdit = ds.Tables["Customers"].Select("CustomerID = '" +
txtCustomerID.Text + "'");

>
> However this returns nothing, but if I do it explicitly like this
>
> //Get the datarow to edit
> DataRow[] adrEdit = ds.Tables["Customers"].Select("CustomerID = 'ALFKI'");
>
> It works fine, why when I enter ALFKI in txtCustomerID.Text is it not
> making a match in the Dataset?
>
> any help appreciated
>
> Paul Custance



Relevant Pages

  • Re: SQL 2005 - audit SELECT statements?
    ... name in the Northwind database. ... Start the trace, and create the following trigger using Query Analyzer: ... FROM Customers ...
    (microsoft.public.sqlserver.security)
  • Re: i would like to see who executed a select statement on a specific table
    ... name in the Northwind database. ... and create the following trigger using Query Analyzer: ... FROM Customers ... FROM Customers c INNER JOIN Orders o ...
    (microsoft.public.sqlserver.security)
  • Re: Linq Sum() Question
    ... I made a console application that makes use of Northwind database. ... Made a dbml file of the database whith the designer and now I want to ... see the total of all orders of the customers. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Coding file into 4ths
    ... Customers in the Northwind database based on their customer id: ... MS Access MVP ... >> HTH, ...
    (microsoft.public.access.queries)
  • Re: How can I pass parameter to Typed Dataset in VB.Net 2005?
    ... Now how can I pass the parameter "ALFKI" at runtime. ... In the visual Dataset Designer, right click the Customers tableadapter, ... arguments corresponding to the parameters in the SQL statement. ...
    (microsoft.public.dotnet.languages.vb)