473,791 Members | 2,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: Option strict disallows late binding

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
1 2370
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.goog legroups.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1366
by: PatLaf | last post by:
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...
1
1639
by: Karl Lang | last post by:
Hi I've created a new configuration section in Web.Config to hold the connection string for my database. If I have Option Strict On I get a message "Option Strict On disallows late binding" when I try to retrieve the string. Now I'd rather not turn off option strict but I'd also prefer to have my connection string in one place. Does anyone have any ideas where I'm going wrong with this? This is the code In Web.Config (I've removed some...
12
1557
by: Daniel Klein | last post by:
I think I've done my homework and checked around on Google Groups but this seems to be a situation not yet covered. Here is the scenario... There are two classes, Foo and Bar (actually there are more than two classes involved but two will suffice to explain the problem), and each class has a Copy() method as follows: Public Function Copy() As Object Implements ICloneable.Clone
7
4869
by: CodeMonkey | last post by:
Hi All the following code generates an error with option strict on - Option strict disallows late binding. Can someone please help with what needs to be changed: Dim sweep, totalsweep As Integer Dim slices As Array = Split("26, 40, 34",",") Dim colors() As Color = { _ Color.Blue, Color.LimeGreen, _ Color.Purple}
4
8162
by: Heinz | last post by:
Hi all, I use VB.net 2003 and want to export data to Excel. Target PCs still have Office 2000 so I could not use Microsofts PIAs. Instead I use the included Excel 10 COM DLL from Microsoft. Everything works fine. Now I want to sign my application with a strong name. Therefore I also need to sign all DLLs. So I searched through the web and found information that I need to use tlbimp, and the source file is 'xl5en32.olb'. Now this also...
7
2131
by: Owen Mortensen | last post by:
(This code was working in asp.net 1.1 VS2003. After upgrade to VS2005, chokes): in the aspx file: <ItemTemplate> <asp:datagrid id="dg_instr" runat="server" AutoGenerateColumns="False" HeaderStyle-Font-Bold="True" CellPadding="0" CellSpacing="1" Font-Size="Small" BackColor="Transparent" ForeColor="Black"
7
3379
by: Lynn | last post by:
Hello, I have a website that is working fine. I have just turned on "option strict" and am getting an error with the parts of my code. I have fixed everything but this section, which has me baffled. I am getting the error "option Strict On disallows late binding", and the error is referring to this line of code: (3rd line in my sub below) Select Case sender.Parent.ID
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.