Home All Groups Group Topic Archive Search About

Deploying VB .NET application WITH MS Access db

Author
7 Jan 2006 2:04 AM
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

Author
7 Jan 2006 2:12 PM
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]





"JOHN MALONEY" <jmalon***@email.uophx.edu> wrote in message
news:uWggq5yEGHA.716@TK2MSFTNGP09.phx.gbl...
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
Author
7 Jan 2006 5:49 PM
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
  "m.posseth" <mich***@nohausystems.nl> wrote in message news:O4ULgR5EGHA.3856@TK2MSFTNGP12.phx.gbl...
  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]





  "JOHN MALONEY" <jmalon***@email.uophx.edu> wrote in message
  news:uWggq5yEGHA.716@TK2MSFTNGP09.phx.gbl...
  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
Author
8 Jan 2006 8:40 AM
m.posseth
Hello John ,,

>>Would you suggest that I post the code you mentioned in my data access
>>class module??


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]



"JOHN MALONEY" <jmalon***@email.uophx.edu> wrote in message
news:%23f319J7EGHA.984@tk2msftngp13.phx.gbl...
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
  "m.posseth" <mich***@nohausystems.nl> wrote in message
news:O4ULgR5EGHA.3856@TK2MSFTNGP12.phx.gbl...
  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]





  "JOHN MALONEY" <jmalon***@email.uophx.edu> wrote in message
  news:uWggq5yEGHA.716@TK2MSFTNGP09.phx.gbl...
  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
Author
8 Jan 2006 12:49 PM
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
jmalon***@email.uophx.edu
onlinep***@bellsouth.net (alternate)
(954) 441-5091
  "m.posseth" <mich***@nohausystems.nl> wrote in message news:ult$v8CFGHA.1028@TK2MSFTNGP11.phx.gbl...
  Hello John ,,

  >>Would you suggest that I post the code you mentioned in my data access
  >>class module??


  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]



  "JOHN MALONEY" <jmalon***@email.uophx.edu> wrote in message
  news:%23f319J7EGHA.984@tk2msftngp13.phx.gbl...
  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
    "m.posseth" <mich***@nohausystems.nl> wrote in message
  news:O4ULgR5EGHA.3856@TK2MSFTNGP12.phx.gbl...
    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]





    "JOHN MALONEY" <jmalon***@email.uophx.edu> wrote in message
    news:uWggq5yEGHA.716@TK2MSFTNGP09.phx.gbl...
    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