By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,859 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,859 IT Pros & Developers. It's quick & easy.

Error: Option strict disallows late binding

P: n/a
Hi All,

I've just converted a solution from .Net v1.1 to v2.0, by allowing
Visual Studio 2005 to do the conversion.

Since doing so, I am getting a compilation error as follows:

"Option Strict On disallows late binding."

This references line 1, which is my page directive:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="perf_man.sbp3"
Trace="True" CodeFile="sbp3.aspx.vb" %>

Any ideas?

Thanks!
Simon.

Oct 3 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
it refers to line one because it cames from sbp3.aspx.vb file and that file
is in line 1

so the problem is inside that file

Late Binding means a lot of things, for example using arrays (like old vb6)

dim a as array
a = split( myString, " ")

if you use

something = a(0)

you will get that error, because you are binding the index 0 of the array
after seting it up, I know it's crazy, but now I understand the concept
under vb.net 2.0 (after long hours searching for an answer)

late binding means also like:

dim myObject

myObject = new String

you are binding the myObject as a String after you set it.
you need to look to your code and see what in the code could be wrong, if
you use strict on on that .vb file and if you are using Visual Studio 2005
it will point out the error in Warnings/Errors in the Error List menu (Ctrl
+ E)

--

Bruno Alexandre
KÝbenhavn, Danmark

"a portuguese in Denmark"
"Adotek" <ad****@adotek.co.ukescreveu na mensagem
news:11**********************@e3g2000cwe.googlegro ups.com...
Hi All,

I've just converted a solution from .Net v1.1 to v2.0, by allowing
Visual Studio 2005 to do the conversion.

Since doing so, I am getting a compilation error as follows:

"Option Strict On disallows late binding."

This references line 1, which is my page directive:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="perf_man.sbp3"
Trace="True" CodeFile="sbp3.aspx.vb" %>

Any ideas?

Thanks!
Simon.

Oct 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.