ComboBoxEdit Requery Event Failing


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Time to get some help on this.

I have a comboboxedit control that has a requery event taking three integer parameters.  The FillDataTable method in the BO looks like this:

public void FillByOrderIndex(int pPLType, int pMasterIndex, int pAddrIndex)
{
   
SqlParameter mPLType = new SqlParameter("@pltype", pPLType);
   
SqlParameter mMasterIndex = new SqlParameter("@masterindex", pMasterIndex);
   
SqlParameter mAddrIndex = new SqlParameter("@addrindex", pAddrIndex);
    FillByStoredProcedure(
"spx_GetOrderItemList", mPLType, mMasterIndex, mAddrIndex);
}

This actually works (thanks for the help earlier this week!).  The problem comes in when the combobox hits one of the resulting columns.  It is the "orderid" field.  It gets to the following code:

[
Browsable(false),
BusinessFieldDisplayInEditor(),
Description(""),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public System.Int32 orderid
{
   
get
   
{
       
return (System.Int32)this.CurrentRow["orderid"];  <--*** OFFENDING CODE ***
    }
   
set
   
{
       
this.CurrentRow["orderid"] = value;
    }
}

The get_orderid() method kicks out a "Specified cast is not valid" error.  If I place the parameters into the SQL Query Analyzer, I get a result set that does have an orderid and it is an integer value.

Any ideas about what I should do or where to look for a solution?

Thanks!!
Bill



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Bill Cunnien - 17 Years Ago
Greg McGuffey - 17 Years Ago
Bill Cunnien - 17 Years Ago
Bill Cunnien - 17 Years Ago
Greg McGuffey - 17 Years Ago
                         Still broken. I am still trying tochange one thing at a time to...
Bill Cunnien - 17 Years Ago
                             Here is the error report: InvalidCastException Specified cast is not...
Bill Cunnien - 17 Years Ago
                                 Did you set the FieldPropertyDescriptor for this property?
Greg McGuffey - 17 Years Ago
                                     Not exactly sure what you are talking about...sorry. After you...
Bill Cunnien - 17 Years Ago
                                         Take a look at this post, you've got the property setup, just...
Greg McGuffey - 17 Years Ago
                                             I am defining the table in DDT, creating a BO, then pointing the BO to...
Bill Cunnien - 17 Years Ago
                                                 The BO isn't even completed with the data retrieval method and I get...
Bill Cunnien - 17 Years Ago
                                                     Added a watch to the variable loValue (which looked like it had a...
Bill Cunnien - 17 Years Ago
                                                         The table in SQL Server has the orderid field defined as INT. That...
Bill Cunnien - 17 Years Ago
                                                             [quote]Now, it works. This is a SQL Server 2000 application. Could...
Trent L. Taylor - 17 Years Ago
                                                                 Thanks for the response. I long to be on SQL Server 2008. Our adoption...
Bill Cunnien - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search