from 2003-2005: How do i get a form's dialogresult now and how to use cursor.current + declare a connectionstring
Posted on 2006-07-04
my project works in 2003
cursor.current does not work at all now.
it gives me the error:
Access of Shared Member,constant member,enum member or nested type through an instance; qualifying expressin will not be validated
dim frmA as new frmMyForm
if frmA.dialogresult= dialogresult.ok then
this gives me the error:
Access of shared member,constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.
i have a connection string which i use AND DECLARE on every single page.
Dim mySqlConnection As SqlConnection
mySqlConnection = New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString"))
a) is there a way i can only declare this once in the project and use it throughout?
b) how will this look in 2005?
i get the error:
'Public Shared ReadOnly Property AppSettings() as System.collection.specialized.namevalueCollection' is obsolete:
This Methid is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.Appsettings.
c) can i somehow use this new method in my 2003 so that hte upgrade part will be quicker?
i just wanna confirm : in a non MDI child environment,
would it ever make sense to use
Me.globalform = Me (in the load section of a form)
i want to delete it out of the whole project.