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
C

chrisace

@chrisace
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Override Stored Connection String
    C chrisace

    Here is the solution as untyped datasets were not an option. http://kmccaa.blogspot.com/2007/07/how-to-move-typed-dataset-to-its-own_11.html[^]

    Database help csharp database visual-studio question

  • Override Stored Connection String
    C chrisace

    I have a Windows application that uses typed datasets. When setting up the datasets, Visual Studio asks if you want to remember the connection. This is helpful when making changes to the datatables or table adapters. Before filling the dataset, I programatically change the connection string of each table adapter so that it will connect to the remote database. Before this operation, it is set to the local database since that is the one I am developing on. All goes well except with one form. See the sequence of events below: First I change the connection string. Me.LocationsTableAdapter.Connection.ConnectionString = Database.gdbRemoteConnection.ConnectionString When calling the following fill method, it works as it should. Me.LocationDataTableAdapter.FillByLocationID(Me.DsLocations.LocationData, cmbTestLocation.SelectedValue) When calling the following fill method, it displays an error message saying the database location is not correct. It is referencing the local database even though I changed the connection string. Me.LocationDataTableAdapter.FillByEntryDate(Me.DsLocations.LocationData, dtmDateFrom.Value.Date, dtmDateTo.Value.Date) If I step through the code, it even shows the connection string set to the remote database when the fill method is called. Is this a known bug?

    Database help csharp database visual-studio question
  • Login

  • Don't have an account? Register

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