Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object variable or With block variable not set
Message
From
23/01/2011 13:11:34
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01497018
Message ID:
01497072
Views:
47
>All .net types have default values. An integer, for example, defaults to 0 ; any object to a null value (Nothing in VB)
>So there is absolutely no difference between 'Dim loRow As DataRow' and 'Dim loRow As DataRow = Nothing' except the warning in the IDE. And it *is* only that - just a reminder that you may have intended to assign a value to it at that point or later. The choice of syntax there can have no bearing on the cause of the error since whether you explicitly assign the null value or let the compiler do it for you the outcome is the same.

Correct, for visually representing better what the property or variable does as well as avoiding those warnings.

>If the error is related to a DataRow you need to look at where it should be assigned an actual value. Maybe you are somehow trying to select a row that doesn't exist?

When this is the case, I would get an object not found. I remember having gotten that one a while ago when a method was returning a different type than what it was defined for. This is what I am trying to see.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform