Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object variable or With block variable not set
Message
De
23/01/2011 13:11:34
 
 
À
23/01/2011 05:04:18
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01497018
Message ID:
01497072
Vues:
48
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform