MartyConnelly
martyconnelly at shaw.ca
Tue Jan 3 15:57:02 CST 2006
I am assuming you do not want to use the classes from the System.Data.SqlClient namespace, but ADO directly Writing Provider-Independent Data Access Code with ADO.NET 2.0 http://www.devx.com/dotnet/Article/27297 or Streamline your Data Connections by Moving to MARS http://www.devx.com/dbzone/Article/30132 Lots of other articles with code here on ADO.Net 2.0 John Colby wrote: >I am having a hard time getting started with ADO.net 2.0. I need example >code for SOMETHING (anything) that looks up data in a table, preferably in >an sql server db. > >As an example, I have a the "login form" that the wizard builds in VB.Net >2.0. It has two text boxes for username and password, and an OK and Cancel >button. No code. > >I have a user table in a SQL Server database, with a UserName and >PasswordHash field. > >I need to accept the user's input of the username and look it up in the user >table in the SQL, retrieving the passwordhash. > >I can do everything except get the data. Frustrating. I could do it in 1.x >(which still works) but I understand that there is a >"newer/better/faster/easier" way to do this stuff in 2.0. The only problem >is getting examples. As you probably know all anyone is interested in is >binding controls to data which isn't what I want. I need to know how to do >it all in code. > >Eventually (soon thereafter) I will want to pull an entire set of tables, >iterating the tables, populating classes with the data in the tables. The >data in the classes will be changing so I need the classes to be able to >write the data back out to the tables as well. Again, what I need in this >instance is an example, from the start, of dimming all of the objects >required, then reading data out of a given table, and writing data back into >that same table. > >If anyone has example code that they wrote, or a web page that does this >programmatic manipulation, from start to finish, I would be forever >grateful. > >John W. Colby >www.ColbyConsulting.com > >Contribute your unused CPU cycles to a good cause: >http://folding.stanford.edu/ > >_______________________________________________ >dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > > > > -- Marty Connelly Victoria, B.C. Canada