Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I get "Option Strict disallows late binding" error on the lines shown. What am I doing wrong?

Dim dr As DataRow

dr = ddlDC.DataSource.Tables(0).NewRow

dr.Item(0) = "ALL"

dr.Item(1) = "ALL"

ddlDC.DataSource.Tables(0).Rows.InsertAt(dr, 0)

Posted

dr = ddlDC.DataSource.Tables(0).NewRow

 

this sets dr as a typed datarow...a class that is dynamically created when you filled the dataset

 

Changing the declaration should fix the problem.

 

Dim dr As ddlDC.DataSource.Tables(0).NewRow

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...