K
Keith
I'm having problems. I have a table set up in my Database
that stores the locations of the dlls to all my programs.
It loads the list into a menu and launches the program
based on what the User clicks. Here is what my onClick
looks like:
'GET A DATAROW FROM DATABASE OF THE PROGRAM
' THE USER CLICKS
Dim currRow = clsData.getProgram(intIndex)
Dim f As Form = Nothing
'CREATE ARGUMENTS
Dim args As Object() = {dsUser, strUser, strPass}
Dim myAssembly As [Assembly]
Dim a As [Assembly]
Dim t As Type
'str WILL HOLD THE PHYSICAL LOCATION OF THE DLL
Dim str As String = currRow("dll")
'LOAD DLL
a = myAssembly.LoadFrom(str)
t = a.GetType(currRow("form_name"))
f = CType(Activator.CreateInstance(t, args), Form)
'SHOW FORM
f.StartPosition = FormStartPosition.CenterScreen
f.Show()
Now the problem is... say the database has version 1 of a
program stored in it's own directory and I create a
version 2 and store it in it's own directory. If the user
has version 1 open and I change the database to now point
to version 2 this is what happens when the user closes
version 1 and tries to open that program again:
- the str variable now shows the version 2 location of
the dll (so far so good)
- But after the a = myAssembly.LoadFrom(str), the
assembly a loads version 1?? ie a.CodeBase points to the
version 1 folder and a.FullName has the old version...???
I'm not if I'm doing something wrong, or even approaching
it the wrong way... all I what to do is have an
application that is the starting point to all the
applications available.. and when I post a new update, the
user doesn't have to exit out of all the applications just
to get the new update...?
Sorry about the length.. I hope you understand..
thanks
Keith
that stores the locations of the dlls to all my programs.
It loads the list into a menu and launches the program
based on what the User clicks. Here is what my onClick
looks like:
'GET A DATAROW FROM DATABASE OF THE PROGRAM
' THE USER CLICKS
Dim currRow = clsData.getProgram(intIndex)
Dim f As Form = Nothing
'CREATE ARGUMENTS
Dim args As Object() = {dsUser, strUser, strPass}
Dim myAssembly As [Assembly]
Dim a As [Assembly]
Dim t As Type
'str WILL HOLD THE PHYSICAL LOCATION OF THE DLL
Dim str As String = currRow("dll")
'LOAD DLL
a = myAssembly.LoadFrom(str)
t = a.GetType(currRow("form_name"))
f = CType(Activator.CreateInstance(t, args), Form)
'SHOW FORM
f.StartPosition = FormStartPosition.CenterScreen
f.Show()
Now the problem is... say the database has version 1 of a
program stored in it's own directory and I create a
version 2 and store it in it's own directory. If the user
has version 1 open and I change the database to now point
to version 2 this is what happens when the user closes
version 1 and tries to open that program again:
- the str variable now shows the version 2 location of
the dll (so far so good)
- But after the a = myAssembly.LoadFrom(str), the
assembly a loads version 1?? ie a.CodeBase points to the
version 1 folder and a.FullName has the old version...???
I'm not if I'm doing something wrong, or even approaching
it the wrong way... all I what to do is have an
application that is the starting point to all the
applications available.. and when I post a new update, the
user doesn't have to exit out of all the applications just
to get the new update...?
Sorry about the length.. I hope you understand..
thanks
Keith