Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to trap COM instantiation
Message
From
31/07/2003 16:58:11
 
 
To
31/07/2003 16:18:31
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00815490
Message ID:
00815632
Views:
14
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform