Results 1 to 2 of 2

Thread: ADO.NET

  1. #1
    Join Date
    Dec 1969

    Default ADO.NET

    I am trying to write the code to connect to my DB. I used to use ADO with asp and I am now using c# and ADO.NET with aspx pages. I even bought the book Programmers Reference ADO.NET. There is alot of info in there and I have figured out a few things, but I am very confussed between DataAdapters, DataViews, DataTables, etc....<BR><BR>I understand objects and such, so i got a little ways into the code, but the way you do things now and the way that I used to is way different. I want to make sure that the user name and password that a user supplies is correct.<BR><BR>Here is the code that I have so far:<BR><BR>SqlConnection dbConn = new SqlConnection("server string...");<BR>SqlDataAdapter daLogin = new SqlDataAdapter("sql querry string...");<BR>dtLogin = new DataTable("Login");<BR>daLogin.FillSchema(dtLogin, SchemaType.Source);<BR><BR>This is as much as I have got from the book. If I understand this code correctly, I created a connection object to my sql server. I then created a data adapter object that holds my sql query. I then create a DataTable??? Is that a recordset? from the login DB. I then run the querry on the data table with the daLogin.FillSchema method. What does that command actually do and does it store the output in daLogin? Also how do you access the data that it retreives from the DB? I want to make sure that it did in fact find a record that had the correct user name and password that was in my sql querry.<BR><BR>Thanks,<BR>Patrick

  2. #2

    Default RE: ADO.NET

    Hi,<BR>There is an SQLHelper in Microsoft Application Blocks for .NET .<BR>It will make data access seem familiar in .NET<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts