SqlDataSource or ObjectDataSource [Resolved]

Posted by Thiru under ASP.NET on 8/22/2011 | Points: 10 | Views : 4560 | Status : [Member] | Replies : 3
Hi,
We can code using SqlDataSource or ObjectDataSource -- generally programmer will follow one method right ?
If so, to which one i can concentrate to proceed further - expecting your suggestion.

Can you give some example site using SqlDataSource and ObjectDataSource.
Like: for shopping cart site -- sqldatasource or objectdatasource
Pls. give atleast two site in each case.




Responses

Posted by: Vuyiswamb on: 8/23/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 50

Up
0
Down

Resolved
Look at this
http://www.codeproject.com/KB/vb/N-Tier_Application_VB.aspx

http://www.codeproject.com/KB/cs/NTier.aspx

http://www.codeproject.com/KB/cs/N-Tier22.aspx

Thank you for posting at Dotnetfunda
[Administrator]

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

Posted by: Vuyiswamb on: 8/22/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
hi Thiru

i am better now, just had sinusses, i heard you were looking for me. well to asnwer your question,

i neither use both of those controls, i call them wizard, i dont use wizards to do my database work. i write my datalayer and the business layer myself and this makes me understand my system better. well i have not started that way , i started writting my database layers using wizards as you used but i hit a wall because they have limitations especially when you need to to join tables , the Update statement wont work because the adapter wont know which table to Update.

But to asnwer your questions.

SQlDataSource you will use it when you have a storedprocedure or a Query that to retrieve data from the database , so this wizards do the connection string for you and do the Update statements, the Delete and the selects for you. they are are cool if you use them well(time savers) , You can normaly use this with your dataset or Datatable.

The ObjectDataSource is maily use the the source of data is something like a class , so you will be like receiving a list of objects that you can bind to a control like a grid or a list or a dropdown.

Hope this is what you were looking for.

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

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

Posted by: Thiru on: 8/23/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Vuyiswa,
Its nice to see your reply. Thanks for your information here.

You have mentioned that you write your datalayer and business layer by yourself - can you show any example/sample.

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

Login to post response