Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a variable declared as a char that is going to hold a value in a table (for which the column is char(1)).

 

I populate a dataSet with that table, and I try to assign the value to the variable as:

cCriteriaTypeAbbrev = DirectCast(tblDetail.Rows(j).Item("CriteriaTypeAbbreviation"), Char)

But I get an invalid cast exception. I stepped through the code, and in the command window, i typed

? tblDetail.Rows(j).Item("CriteriaTypeAbbreviation"), and the command window said that it was a string variable?

 

Does anyone know why this is?

 

Thx for your time...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...