Need answers on sql connection

Posted by Sathya4260 under ASP.NET on 12/26/2010 | Points: 10 | Views : 1287 | Status : [Member] | Replies : 3
Hi experts,

Did you can give me difference between difference between sqldataadapter,sqlcommand,dataset,sqldatareader

In which scenario we should use sqldataadapter and command.

Did we can call the stored procedure for select statement without any input parameter...

Sathish Kumar S


Responses

Posted by: Laghaterohan on: 12/26/2010 [Member] Starter | Points: 25

Up
0
Down
Hi Satish,

For SqlCommand u can refer : http://dotnetperls.com/sqlcommand

For DataReader, DataSet and DataAdapter refer : http://geekswithblogs.net/ranganh/archive/2005/04/25/37618.aspx

you can always browse the MSDN for detail information..!

I guess you atleast get a rough idea from above links.


Thanks!!

Happy Coding:)



Best Regards,
Rohan Laghate

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 12/26/2010 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi Sathish,

SqlCommand & SqlDataReader objects are Connected architecture and SqlDataAdapter and DataSet objects are disconnected architecture.
If we using Connected architecture, must be open a connection after process to close the connection.In disconnected architecture using fill method its also to be open and close a connection.

For more info...http://www.dotnetspider.com/forum/140104-Differences-between-connected-disconnected-arc.aspx
http://msdn.microsoft.com/en-us/magazine/cc188717.aspx

Without parameter we can call the procedure...Ex:Select statement....

Cheers :)


Thanks,
T.Saravanan

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sathya4260 on: 12/27/2010 [Member] Starter | Points: 25

Up
0
Down
Thanks a lot for ur timely response..

Sathish Kumar S

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response