Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to trap COM instantiation
Message
De
31/07/2003 16:58:11
 
 
À
31/07/2003 16:18:31
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00815490
Message ID:
00815632
Vues:
15
Hi Plamen,

Thanks for your patience.
Ok, I see what you mean now for the declaration.
private void Form1_Load(object sender, System.EventArgs e)
{
	ADODB.ConnectionClass adocnnTest;
	try
	{
		// Do this:
                  adocnnTest = new ADODB.ConnectionClass();

		// Do NOT do this:
                  // ADODB.ConnectionClass adocnnTest = new ADODB.ConnectionClass();
	}
	catch
	{
		MessageBox.Show("Error", "Error: Missing Required Files", MessageBoxButtons.OK, MessageBoxIcon.Stop);

		return;
	}

	adocnnTest.ConnectionString = "bla-bla";  //<- Use of unassigned local variable 'adocnnTest'

}
Using the above example, do you get
Use of unassigned local variable 'adocnnTest'
at the point of setting the ConnectionString?



- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform