Re: Dataset question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ignacio Machin \( .NET/ C# MVP \) ("Ignacio)
Date: 01/31/05


Date: Mon, 31 Jan 2005 09:29:02 -0500

Hi,

 IMO this is a very ineficient way of doing it, what if instead of returning
a dataset you just return a number SqlCommand.ExecutyScalar

It's more efficient and less confusing

cheers,

-- 
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Keith Smith" <keithsmith3@verizon.net> wrote in message 
news:5qqLd.2246$0O4.1917@trnddc03...
> For authentication purposes I query my Access database using a Username 
> and Password.  If the dataset turns up empty then the user does not have 
> access. If it shows up with a value in the dataset then the user is 
> authenticated.
>
> The problem I am having is that when I count the number of entries in my 
> dataset it always shows up as "1".  Even when I query the database with 
> values that aren't in the database.
>
> I am using this code...
> int RecordCount=dtSet.Tables.Count;
>
> Is there a better way to count the entries in a dataset?  Or perhaps a 
> better way of authentication all together?
> 


Relevant Pages

  • Re: Excel data consolidation question
    ... it would if you were so incompetent not to check all entries. ... If that's different from database, ... She adds a column called 'vacation hours' and emails it to her boss. ... better than Excel for this provided you can access the authentication ...
    (microsoft.public.excel)
  • Dataset question
    ... For authentication purposes I query my Access database using a Username and ... better way of authentication all together? ...
    (microsoft.public.dotnet.languages.csharp)
  • ODBC and subweb with anonymous browsing disabled problem
    ... I have a FrontPage 2002 web, which has a subweb with anonymous ... browsing disabled, requiring authentication. ... I have a System DSN for an Access database for the same site. ...
    (microsoft.public.frontpage.client)
  • authenticating for subweb breaks database calls
    ... I have a FrontPage 2002 web, which has a subweb with anonymous ... browsing disabled, requiring authentication. ... I have a System DSN for an Access database for the same site. ...
    (microsoft.public.frontpage.extensions.windowsnt)
  • RE: repeated conversion of data summarized into rows and columns
    ... the database name, table name and field names I used in the code. ... Dim currentUser As String ... ' Column Pointer to work through Hour entries ... Dates and to the HoursDates table and containing a usage entry. ...
    (microsoft.public.excel.misc)