Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Configuring adapters @ time of installation.

Configuring adapters @ time of installation.

Scheduled Pinned Locked Moved Visual Basic
sysadminhelptutorialquestion
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    work4me
    wrote on last edited by
    #1

    i have created a client/server application that stores some data to the databade @ the server,the problem is whenever i try to install the application on another system it shows an unhandled exception & states tht the particular field cannt be found but reconfiguring the data adapters solve the problem. How to overcome this situation.?????

    M 1 Reply Last reply
    0
    • W work4me

      i have created a client/server application that stores some data to the databade @ the server,the problem is whenever i try to install the application on another system it shows an unhandled exception & states tht the particular field cannt be found but reconfiguring the data adapters solve the problem. How to overcome this situation.?????

      M Offline
      M Offline
      mbuller
      wrote on last edited by
      #2

      you can use an application .config file to specify the location of the database then refer to the application .cofig file when pointing to the database with your connection string. To get to the app.config file ... right click, add new item, app.config... then open it you should see something like mine below. The easiest way to get a good connection string for Ex. Conn String (Access) "if need another database tell me..." 'Place This in a Module Public cnnRate As New OleDb.OleDbConnection Public odaCustomer As New OleDb.OleDbDataAdapter Public Sub Connect() Try cnnRate.ConnectionString = _ System.Configuration.ConfigurationSettings.AppSettings("odaCustomer.ConnectionString") Catch ex As Exception MsgBox(ex) End Try Michael

      M 1 Reply Last reply
      0
      • M mbuller

        you can use an application .config file to specify the location of the database then refer to the application .cofig file when pointing to the database with your connection string. To get to the app.config file ... right click, add new item, app.config... then open it you should see something like mine below. The easiest way to get a good connection string for Ex. Conn String (Access) "if need another database tell me..." 'Place This in a Module Public cnnRate As New OleDb.OleDbConnection Public odaCustomer As New OleDb.OleDbDataAdapter Public Sub Connect() Try cnnRate.ConnectionString = _ System.Configuration.ConfigurationSettings.AppSettings("odaCustomer.ConnectionString") Catch ex As Exception MsgBox(ex) End Try Michael

        M Offline
        M Offline
        mbuller
        wrote on last edited by
        #3

        Also ... if you have plans for deployment and other issue's let me konw so i can tell you about other small details that might get in your way. The idea above allows for configuring the connection string at any point after installation... you can simply open the app config file after install with notepad and change the small section refering to connection string. Then its fixed Michael

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups