Deploying VB .NET application WITH MS Access db

J

JOHN MALONEY

Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get the deployment to work right. I have added a SetUp project to the existing application. I also selected RELEASE as appropriate in the Application Folder and on the Users Desktop and Start menu. I didn't know whether the Project Output though would be enough or whether I would need to add the .mdb file to the Application folder too. I tested the deployment both ways though and in each case, when the user installs the application, they can see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and changing the db's File Path to just the name of the db but that also didn't work??

It seems to me that I need to figure out how to stipulate where to install the db on the clients machine? If that is the case, I can just type that file path into my data class module (I think)!!

Thanks in advance!!

John
 
M

m.posseth

well i use this


Friend Shared ReadOnly Property Assemblypath() As String

Get

Return
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

End Get

End Property

Me.Datasource = Path.Combine(Assemblypath, strDatasource)


strdatasource can be "\DATA\YOURDB.MDB"

so this results in the folowing path being built

full location path were your assembly is beeing deployed &
"\DATA\YOURDB.MDB"


hth

Michel Posseth [MCP]





Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get the
deployment to work right. I have added a SetUp project to the existing
application. I also selected RELEASE as appropriate in the Application
Folder and on the Users Desktop and Start menu. I didn't know whether the
Project Output though would be enough or whether I would need to add the
..mdb file to the Application folder too. I tested the deployment both ways
though and in each case, when the user installs the application, they can
see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and
changing the db's File Path to just the name of the db but that also didn't
work??

It seems to me that I need to figure out how to stipulate where to install
the db on the clients machine? If that is the case, I can just type that
file path into my data class module (I think)!!

Thanks in advance!!

John
 
J

JOHN MALONEY

Thanks very much for your HELP Michel,

Would you suggest that I post the code you mentioned in my data access class module?? I was thinking that I might be able to have the deployment include the installation of the .mdb file to the root of the C:// drive or something (but I didn't know how to configure the installation instructions). Either way, I will change the File Path in my current data access class and see if that helps? I will try your code in that class module this evening and let you know!! I guess where I'm having the difficulty is in figuring out where the deployment files go on the client and to code my data access class file path to agree with that path??

Thanks again!
--
John
well i use this


Friend Shared ReadOnly Property Assemblypath() As String

Get

Return
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

End Get

End Property

Me.Datasource = Path.Combine(Assemblypath, strDatasource)


strdatasource can be "\DATA\YOURDB.MDB"

so this results in the folowing path being built

full location path were your assembly is beeing deployed &
"\DATA\YOURDB.MDB"


hth

Michel Posseth [MCP]





Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get the
deployment to work right. I have added a SetUp project to the existing
application. I also selected RELEASE as appropriate in the Application
Folder and on the Users Desktop and Start menu. I didn't know whether the
Project Output though would be enough or whether I would need to add the
.mdb file to the Application folder too. I tested the deployment both ways
though and in each case, when the user installs the application, they can
see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and
changing the db's File Path to just the name of the db but that also didn't
work??

It seems to me that I need to figure out how to stipulate where to install
the db on the clients machine? If that is the case, I can just type that
file path into my data class module (I think)!!

Thanks in advance!!

John
 
M

m.posseth

Hello John ,,


yes it is alwaysbetter to use a sub directory under your assembly path as
the data directory
there are even ocasions wwre users have messed up there file system (
partitioning , changing harddisks) and do not even have a C:\ disk
with the described code you can determine the assembly path and so discover
the data dir

regards

Michel Posseth [MCP]



Thanks very much for your HELP Michel,

Would you suggest that I post the code you mentioned in my data access class
module?? I was thinking that I might be able to have the deployment include
the installation of the .mdb file to the root of the C:// drive or something
(but I didn't know how to configure the installation instructions). Either
way, I will change the File Path in my current data access class and see if
that helps? I will try your code in that class module this evening and let
you know!! I guess where I'm having the difficulty is in figuring out where
the deployment files go on the client and to code my data access class file
path to agree with that path??

Thanks again!
--
John
well i use this


Friend Shared ReadOnly Property Assemblypath() As String

Get

Return
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

End Get

End Property

Me.Datasource = Path.Combine(Assemblypath, strDatasource)


strdatasource can be "\DATA\YOURDB.MDB"

so this results in the folowing path being built

full location path were your assembly is beeing deployed &
"\DATA\YOURDB.MDB"


hth

Michel Posseth [MCP]





Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get
the
deployment to work right. I have added a SetUp project to the existing
application. I also selected RELEASE as appropriate in the Application
Folder and on the Users Desktop and Start menu. I didn't know whether the
Project Output though would be enough or whether I would need to add the
.mdb file to the Application folder too. I tested the deployment both ways
though and in each case, when the user installs the application, they can
see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and
changing the db's File Path to just the name of the db but that also
didn't
work??

It seems to me that I need to figure out how to stipulate where to install
the db on the clients machine? If that is the case, I can just type that
file path into my data class module (I think)!!

Thanks in advance!!

John
 
J

JOHN MALONEY

Thanks again Michel,

I was able to get my project deployed just by setting up the correct file path! I can see though that your code would be better because it allows the configuration to occur wherever the user wants and the db is still added on correctly!

--
John Maloney
UOP Online Faculty
(e-mail address removed)
(e-mail address removed) (alternate)
(954) 441-5091


yes it is alwaysbetter to use a sub directory under your assembly path as
the data directory
there are even ocasions wwre users have messed up there file system (
partitioning , changing harddisks) and do not even have a C:\ disk
with the described code you can determine the assembly path and so discover
the data dir

regards

Michel Posseth [MCP]



Thanks very much for your HELP Michel,

Would you suggest that I post the code you mentioned in my data access class
module?? I was thinking that I might be able to have the deployment include
the installation of the .mdb file to the root of the C:// drive or something
(but I didn't know how to configure the installation instructions). Either
way, I will change the File Path in my current data access class and see if
that helps? I will try your code in that class module this evening and let
you know!! I guess where I'm having the difficulty is in figuring out where
the deployment files go on the client and to code my data access class file
path to agree with that path??

Thanks again!
--
John
well i use this


Friend Shared ReadOnly Property Assemblypath() As String

Get

Return
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location())

End Get

End Property

Me.Datasource = Path.Combine(Assemblypath, strDatasource)


strdatasource can be "\DATA\YOURDB.MDB"

so this results in the folowing path being built

full location path were your assembly is beeing deployed &
"\DATA\YOURDB.MDB"


hth

Michel Posseth [MCP]





Hi Everybody,

I have created a three-tiered db application in VB .NET but I can't get
the
deployment to work right. I have added a SetUp project to the existing
application. I also selected RELEASE as appropriate in the Application
Folder and on the Users Desktop and Start menu. I didn't know whether the
Project Output though would be enough or whether I would need to add the
.mdb file to the Application folder too. I tested the deployment both ways
though and in each case, when the user installs the application, they can
see my GUI...but nothing populates in the combo boxes on form_load??

I also tried copying the .mdb file to the original projects BIN folder and
changing the db's File Path to just the name of the db but that also
didn't
work??

It seems to me that I need to figure out how to stipulate where to install
the db on the clients machine? If that is the case, I can just type that
file path into my data class module (I think)!!

Thanks in advance!!

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top