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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting parameters to bound data sources

Status
Not open for further replies.

huggyboy

Programmer
Feb 7, 2003
108
GB
For the last few weeks I have been using datasets populated by calls to stored procedures passing them parameters then manually moving to fields on a form or binding the dataset to the control (all in the vb) - all fine.

However I am now trying to do it the less manual way (using the inbuilt facilities in VS2008) by creating the (say) combobox in the screen designer then using the 'use data bound items' and 'data binding mode' specifying the stored procedure in 'data source' and the field i want in the combobox in 'display member' - works ok if the stored procedure has no parameters but cant find where you specify the parameter values to pass into the store procedure - for instance from a text box control on the screen.
The 'preview data' option works if i supply the parameter value so stored procedure works fine but when the program runs the combobox is empty (obviously)

The most frustrating thing is that in the XML i can see where the parameter is defined but cant work out how to get at it using VS2008 screen designer.
Apologies if I am being stupid here
 
Had to get it working so did it in the code on an event -
TableAdapterName.Fill(datasetname, Textbox1.Text)
with both adapter & dataset being generated by VS2008 screen designer
Still interested how to do it in VS2008 without writing any code, though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top