Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Circumventing the Late Binding prohibition with Option Strict On

Circumventing the Late Binding prohibition with Option Strict On

Scheduled Pinned Locked Moved Visual Basic
csharpdatabaseoraclewpfwcf
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AhClem
    wrote on last edited by
    #1

    I'm trying to add support for Oracle ODP.Net Bulk Data Binding to an existing component that looks a lot like the Data Access Application Block in Patterns & Practices' Enterprise Library. My problem is that an unknown (at compile time) number of arrays of unknown types can be passed in based on the database columns that are to be populated. When I try to cast an array element to String: dbParam.ArrayBindSize(i) = Convert.ToString(dbParam.Value(i)).Length or dbParam.ArrayBindSize(i) = CType(dbParam.Value(i), String).Length or dbParam.ArrayBindSize(i) = dbParam.Value(i).ToString()).Length to get it's length, the compiler complains: Option Strict On Disallows Late Binding. I know I'll get a lot of resistance if I suggest turning Option Strict Off. Is ther any other way to circumvent the compiler? Thanks In Advance. Will

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups