This cmbClientList.SelectedValue.ToString() is suppose to be my value, how else should i set the value? Thanks
This cmbClientList.SelectedValue.ToString() is suppose to be my value, how else should i set the value? Thanks
Sorry, I blinked and missed it. The Fill method is executed off the DataAdapter--not the Command. It expects a SelectCommand to be populated with the CommandText that has the SQL SELECT query and the SelectCommand.Parameters collection to be populated with Parameters. Let's see the real code. -- ____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP INETA Speaker www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________
DataSet d = new DataSet("DataSet"); IDataAdapter apt = IDataAdapter GetAdapter(<SqlStatement>, CommandType.StoredProcedure ); apt.Fill(d); return d;
1.Passing parameter for Stored Procedure to Data Adapter/Data Set
Hey all, I'm trying to pass a parameter into my Stored procedure to be accessed by my data adapter into a dataset db2.AddParameter("@intClientID", cmbClientList.SelectedValue.ToString()); DataSet rsDataset = db2.Fill("spListMappingDetails", CommandType.StoredProcedure); However, when i try to run it, it gives me an error {"Procedure 'spListMappingDetails' expects parameter '@intClientId', which was not supplied."} Any help is appreciated. I used a executescalar and executequery function and it has no problem. thanks in advance
2.Table Adapter Configuration Wizard replaces data table name with stored procedure's
Hi When using Table Adapter Configuration Wizard if 'Use SQL Statements' is selected as Command Type, the data table's name in dataset is retained and only its data adapter's select statements are replaced. If however 'Create new stored procedures' is selected as Command Type, the data table name in replaced by the name of the newly created select stored procedure. Problem with this is that the data table's name needs to be put back manually. Is there a way to keep the data table name the same and just stored procedures are assigned to the data table's data adapter? Thanks Regards
3.Need practical advice on using single stored procedure to process data adapter commands
Im trying to minimize the number of stored procedures and was wondering if there is any downside to using a single stored procedure to handle the select,insert,update, and delete commands for a data adapter. I create the sql dataadapter using system tables to generate the parameters and add an additional parameter to denote the type of process. Would appreciate any experienced criticisms.....thanks
4.Assign new stored procedure to data adapter
Hi NG, can I assign another stored procedure as select statement to a data adapter during runtime ? thanxx for answer P@rick
5.Customizing stored procedure generated by data adapter wizard.
Is it possible to customize the stored procedures that are generated by the Data Adapter wizard? I do not mean afterwards but I would like to customize the template (if any) that the Data Adapter Wizard uses to generate this code. Thanks, Patrick
6. use existing stored procedure in data adapter configuration wizard is disabled
7. passing parameters for insert command of data adapter bound to a g
Users browsing this forum: No registered users and 70 guest