Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FormView, can it be double bound?

Status
Not open for further replies.

Valeriya

MIS
Jan 9, 2006
138
US
Hello guys! I'm using a FormView to Update(Edit) records in my database. Here is my problem. My FormView is bound to the stored procedure that based on the 3 parameters updates a record in the data base. First parameter is a filter to go to the specific record and the other two will take on the new values that user will supply. Thus, I want my FormView to go to the specified record, user would update the values and then click on the "Edit" button(that comes standard on the FormView) so that the changes are propagated to the database. Would my FormView have to be "double" bound, once to the store procedure that would work as a filter to find the specified record and the other to the "Update" stored procedure? ....or is it at all possible to do something like "double binding"?...The way it is right now, basically I'm either bound to the stored procedure that is a parameterized select statement that brings up the needed record in the FormView, in which case I can't click "Edit" button since FormView is not bound to the stored procedure that does the Update, or (the other option) to bind to the Update stored procedure, in which case I can't have the filter that I need to go to specific record in order to update...I hope I'm making myself clear. I'm new to ASP.net and feel a bit lost. Thanks much! Valeriya
 
You can use a SQLDataSource and set it's SelectCommand and UpdateCommand to the relevant Stored Procedures. Then, you just bind the FormView to the SQLDataSource.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I'm using an ObjectDataSource...Would that be handled differently? Thanks...Valeriya
 
No, it should be the same as the ObjectDataSource has both the properties that I mentioned above.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top