I have used VS.NET 2003 extensively and exploited all features like drag and drop functions for creating components, drag and drop data access components...For example VS.NET 2003 allows creating sqldataadapter for table mapping , stored proc parameters mappings etc..
We can drag pretty much any object on component designer....
Not it seems like all that gone...
VS.NET 2005, there is no way we can drag the typed dataset, sqldata adapter, sqlcommand on forms designer . There is no concept of component. There is no component designer any more....
Biggest flaw i found is sqldatasource and objectdatasrouce doesn't support transaction anymore...
there is no way to supply any current live db transaction to these objects...How can you imagine any app without transaction.
Please share ideas...
gotech.
![]() |
0 |
![]() |
Hi GoTech,
I made a blog post about how to create Strongly Typed DataSets, TableAdapters and DataTables last week that you can read here: http://weblogs.asp.net/scottgu/archive/2006/01/15/435498.aspx. I'd recommend checking it out to learn about new ways to build DAL components in VS 2005. I think you'll find this solution actually much better than adding the SqlDataAdapters directly on your forms -- since you can re-use them across multiple pages.
Hope this helps,
Scott
![]() |
0 |
![]() |
See... these are very common answers that i gone thru many times...i already used the same for my own app..
Here are the major limitaitons...
1.This new Dataset/tableadapter works great -but tightly integreted with database....Sometime i want to creat manually dataset/tables without back end database...then i like to bind this dataset(structure) t ogridview or other ...on asp.net page on design time....(like vs2003)...I don't see that is possible here .....
2.Even if i achive the above somehow using the objectdatasource...that biggest problem is objectdatasource doesn't support the transaction....
I have case where there are 6 objectdatasources....and i want to achieve transaction across all of them...there is no way to assign or pass current transaction to these xxxDatasource controls...they are really sucks and seems to be marketing hype....
3.
![]() |
0 |
![]() |
#1 If you drag the "DataTable" component from the toolbox on the DataSet designer, you can define the DataTables/DataSets independent of the database.
#2 You can use the TransactionScope feature in code to scope multiple updates/operations into a single atomic transaction. These can span multiple TableAdapters.
Hope this helps,
Scott
![]() |
0 |
![]() |
Is there anyway to drag typed dataset/tables (created mannualy withthout tablAdapter-no select query) on asp.net form designer and bind it to controls?
I really appreciate this help?
gotech
![]() |
0 |
![]() |
Hi Gotech,
There is no automatic way to drag/drop them onto the form designer. What you can do though is this:
1) Create a class with methods to return and update values into the dataset/table. This would replace the need for a TableAdapter.
2) Add an ObjectDataSource control to the page, and then pick the class you created in step #1 to get/update the data.
3) You can then databind controls on the page to the objectdatasource.
Hope this helps,
Scott
![]() |
0 |
![]() |
Thank you scott!
Is this limitation of not allowing drag feature of dataset/table on asp.net is by design?
Is there anyway i can disable ObjectDataSource.GetData() method firing automatically on load?
I want it to fire only on particular event....?
![]() |
0 |
![]() |
Hi GoTech,
If you only want to cause the GridView to bind when a ceretain event happens, you can just right code like this:
GridView1.DataSource = MethodToGetYourDataTable()
GridView1.DataBind()
Hope this helps,
Scott
![]() |
0 |
![]() |
I know that part...my question is ...how to stop xxxDatasource loading data by itself- i don't want data load event to trigger unlesss i want it....
This seems to default behaviour - it alwasy laods data on page load....
![]() |
0 |
![]() |
By default it will databind when it needs data (which is why it is firing on the initial page_load). If you want more control you can do one of two things:
1) explictly databind it like I showed above
or
2) you can handle the "selecting" event on the Objectdatasource and optionally change the eventargs value to e.Cancel = true if you want to prevent a databind action from occuring. That way you can selectively cancel a databind depending on the circumstances of how it fires.
Hope this helps,
Scott
![]() |
0 |
![]() |