Visual studio .net Recordset

How can I create a recordset into asp.net project
chouprouteAsked:
Who is Participating?
 
brdrokCommented:
ok...try this:

//set your sql statement
string sql = "SELECT * FROM Customers";

//setting up your connection object assuming it's njot a trusted connection
SqlConnection m_cn = new SqlConnection(@"Server=xxx.xx.x.xxx;Database=myDatabaseName;User  ID=userName;Password=yourPassword;Trusted_Connection=False");

//setting up your dataAdapter
SqlDataAdapter daCustomers = new SqlDataAdapter(sql, m_cn);

//create your dataset here
DataSet dsCustomer = new DataSet();

//fill your dataSet with customers rec ords.
daCustomers.Fill(dsCustomer, "Customers");

check out this link below.  i found it to be really useful to get the in and out of ado.net in general

http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/ADOPlusOverview.aspx
0
 
brdrokCommented:
what do you mean by creating a recordset into a asp.net project?

Do you mean creating a DataSet inside an asp.net project?  
0
 
ovalsquareCommented:
A record set is used in asp classic/vb etc. It has since been replaced by datatables, datasets (in memory results sets that can actually be a collection of more than one table, with relationships etc. - dumbed down explanation) and the datareader (not in memory, forward only). Benefits and drawbacks to all, but considerable improvement over the old way.

Ted
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
chouprouteAuthor Commented:
Can you explain how to work with Dataset,
just an example of code to help me to start.
0
 
chouprouteAuthor Commented:
HOw thanks a lot,
Is there any way with VB.NET to create a "browsable" datagrid(when we put the mouse over a line in the datagrid, she became on other color, and when we click on it,  a new page appear)

thanks

Marco
0
 
brdrokCommented:
check this link out.

http://aspnet.4guysfromrolla.com/articles/072104-1.aspx

there was one other site that had a dll file that one only needs to import it via "Add/Remove Items" and voila.  It's free too but can't seem to find it.  Gimme your e-mail and i'll sent it to you.

hope i'm not breaking any laws... =)


0
 
chouprouteAuthor Commented:
I already read the first link it dooesn't seem to work.....


my mail is tech.microage@globetrotter.net

Thanks again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.