Re: Dataset question
From: Ignacio Machin \( .NET/ C# MVP \) ("Ignacio)
Date: 01/31/05
- Next message: Helge Jensen: "Re: distinct selection(collection)"
- Previous message: Brian Brown: "RE: connect to mySQL"
- In reply to: Keith Smith: "Dataset question"
- Next in thread: Cor Ligthert: "Re: Dataset question"
- Reply: Cor Ligthert: "Re: Dataset question"
- Reply: Keith Smith: "Re: Dataset question"
- Messages sorted by: [ date ] [ thread ]
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? >
- Next message: Helge Jensen: "Re: distinct selection(collection)"
- Previous message: Brian Brown: "RE: connect to mySQL"
- In reply to: Keith Smith: "Dataset question"
- Next in thread: Cor Ligthert: "Re: Dataset question"
- Reply: Cor Ligthert: "Re: Dataset question"
- Reply: Keith Smith: "Re: Dataset question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|