+ Reply to Thread
Results 1 to 6 of 6

Thread: deploy database - where is my path?

  1. #1
    palawapaw is offline VB.NET Forum Newbie palawapaw is on a distinguished programming path ahead
    .NET Framework
    .NET 4.0
    Join Date
    Mar 2010
    Posts
    4
    Reputation
    0

    Unhappy deploy database - where is my path?

    guys, i am a newbie at vb.net i am using vb.net 2008, now
    i am having a big probLem about my Win-base appLication, i am trying to pubLish my project / make it an ".exe = executable" file, it is connected to an ACCESS DATABASE. The problem is that, after getting my application to a ".exe" form, it seems that the application recognize stiLL the original database, where is my path --> OleDb.OleDbConnection("Provider=Microsoft.ACE.oled b.12.0;Data source=C:\Users\x3r0\Desktop\vb_skuL\prog_sad_3_te st\products.accdb") <-- of the originaL database, when i try to input at the ".exe" file, the data are going to the originaL database, and when i tried to change the path, coz i am thinking of using another database, error says cannot find "C:\Users\x3r0\Desktop\vb_skuL\prog_sad_3_test\pro ducts.accdb"... before changing the databse, ofcourse i have changed that path already for my new database, but it shows an error for the database its using before.. guys,, heLp me.. T_T

  2. #2
    rcombs4 is offline VB.NET Forum Genius rcombs4 puts e.f. hutton to shame rcombs4 puts e.f. hutton to shame rcombs4 puts e.f. hutton to shame rcombs4 puts e.f. hutton to shame rcombs4 puts e.f. hutton to shame rcombs4 puts e.f. hutton to shame
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Aug 2008
    Posts
    167
    Reputation
    158

    Default

    Try adding an App.Config file to your project. Then add a key to the App.Config. in that key specify the connection string. That way when you publish your project all you have to edit is the App.Config file in order to change DBs.
    --Insert Clever Signature--

  3. #3
    palawapaw is offline VB.NET Forum Newbie palawapaw is on a distinguished programming path ahead
    .NET Framework
    .NET 4.0
    Join Date
    Mar 2010
    Posts
    4
    Reputation
    0

    Unhappy

    Quote Originally Posted by rcombs4 View Post
    Try adding an App.Config file to your project. Then add a key to the App.Config. in that key specify the connection string. That way when you publish your project all you have to edit is the App.Config file in order to change DBs.
    Sir.. there was aLready an App.COnfig.. and the path for the new database was aLready set, but when i run the program, error says,, cannot find "the path" where my originaL database is.. it is Looking for the database i used in the very beginning.. T_T

  4. #4
    r3plica's Avatar
    r3plica is offline VB.NET Forum Enthusiast r3plica done a little coding in his/her time r3plica done a little coding in his/her time r3plica done a little coding in his/her time
    .NET Framework
    .NET 3.5
    Join Date
    Mar 2010
    Age
    30
    Posts
    81
    Reputation
    63

    Default

    paste your app config please, so we can see it
    If I solve your issue or you are happy with my response, please provide me with reputation by clicking the reputation link at the top right of my posts - thanks

  5. #5
    palawapaw is offline VB.NET Forum Newbie palawapaw is on a distinguished programming path ahead
    .NET Framework
    .NET 4.0
    Join Date
    Mar 2010
    Posts
    4
    Reputation
    0

    Unhappy

    Quote Originally Posted by r3plica View Post
    paste your app config please, so we can see it
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <configSections>
    </configSections>
    <connectionStrings>
    <add name="dadz_2.My.MySettings.productsConnectionStrin g" connectionString="Provider=Microsoft.ACE.OLEDB.12. 0;Data Source=C:\Users\x3r0\Desktop\testing\prog_sad_3_te st\products.accdb"
    providerName="System.Data.OleDb" />
    <add name="dadz_2.My.MySettings.regConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12. 0;Data Source=|DataDirectory|\reg.accdb"
    providerName="System.Data.OleDb" />
    <add name="dadz_2.My.MySettings.Database1ConnectionStri ng" connectionString="Data Source=|DataDirectory|\Database1.sdf"
    providerName="Microsoft.SqlServerCe.Client.3.5" />
    </connectionStrings>
    <system.diagnostics>
    <sources>
    <!-- This section defines the logging configuration for My.Application.Log -->
    <source name="DefaultSource" switchName="DefaultSwitch">
    <listeners>
    <add name="FileLog"/>
    <!-- Uncomment the below section to write to the Application Event Log -->
    <!--<add name="EventLog"/>-->
    </listeners>
    </source>
    </sources>
    <switches>
    <add name="DefaultSwitch" value="Information" />
    </switches>
    <sharedListeners>
    <add name="FileLog"
    type="Microsoft.VisualBasic.Logging.FileLogTraceLi stener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
    initializeData="FileLogWriter"/>
    <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
    <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
    </sharedListeners>
    </system.diagnostics>
    </configuration>





    -----------> sir, anyway,, my probLem was soLved regarding the path of database, i have just made it run just now, thanks for your heLp.. now another probLem is that, when i pubLish the Program to make it ".exe" at the foLder where i pubLish it, the database are not there, is that normaL? or the database must aLso be at the Location where i pubLished my project..? how about if i Let another user at another PC, to use the ".exe" fiLe of my program? how wouLd the program recognize its database? or it will look for the location of the database itseLf?

  6. #6
    palawapaw is offline VB.NET Forum Newbie palawapaw is on a distinguished programming path ahead
    .NET Framework
    .NET 4.0
    Join Date
    Mar 2010
    Posts
    4
    Reputation
    0

    Default

    i have just noticed at the error List beLow the window of VB.NET after i successfully published my project and make it ".exe", it says

    1) Cannot publish because a project failed to buiLd..
    2) An error oCCurred whiLe signing: Signtool.exe not found..

    what does this error means? please explain it to me, i appreciate much your efforts in heLping me, thanks a Lot..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts