Bound ComboBoxAdv Mapping Error

I have an application using bound controls connecting to a SQL Server update stored procedure. The app has about 30 controls of which one, cboprogID is a manually populated ComboBoxAdv control. I mapped the stored procedure''s @progID correctly (so it seems) along with the other 29 controls. cboprogID is bound by its text property. My DA''s select command thumbs thru data fine. When I try to perform an update I get the following error: Missing SourceColumn mapping for ''progID'' I have rearranged parameters and the problem follows progID. I have eliminated the problem in the stored procedure by including only variables in the procedure. I sure would appreciate some direction. Here is a bit of source: Me.cboProgID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DsStudents1, "spSelectCommand.ProgID")) Me.UpDateStudent.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ProgID", System.Data.SqlDbType.VarChar, 10, "ProgID"))

1 Reply

AR Anupama Roy Syncfusion Team January 16, 2006 01:42 PM UTC

Hi Tom, After setting up the command type and passing the parameters required for the stored procedure,have you specified any input/output parameter? Since you have just given a part of your code,I am not able to reproduce this issue here.Please try replacing your similar statement with the below given code snippet and see how it goes. Dim parm As SqlParameter parm = UpDateStudent.Parameters.Add(New SqlParameter("@ProgID", SqlDbType.VarChar, 10)) parm.Direction = ParameterDirection.Input; UpDateStudent.Parameters("@ProgID").Value = ProgID Since the Data Retrieval with stored procedures is the same as using standard SQL,I believe that the error is with either setting the query string or with the CommandType. Also please let me know whether you get the same error when you try binding with a .NET ComboBox? Thanks, Anu.

Loader.
Up arrow icon