Select All Records from SQL Server Database selallsql Select All Records from SQL Server Database C# .Net Fun - http://www.dotnetfun.com - Michael G.
strConn System.String Your SQL connection string. "Data Source=HOSTNAME; User ID=userid; Password=password; Initial Catalog=Database;" strSQL System.String Your SQL command string. "SELECT * FROM MyTable;" TableName System.String The name of the DataSet/database table. "MyTable" DataSet System.Data.DataSet The DataSet object that will hold an in-memory representation of your table. new DataSet()