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
  1. Home
  2. General Programming
  3. C#
  4. call a conn. string

call a conn. string

Scheduled Pinned Locked Moved C#
4 Posts 2 Posters 0 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.
  • C Offline
    C Offline
    costavo
    wrote on last edited by
    #1

    hi what just i want to know : a connection string is already in the connection class and tested. i am adding a combo box in a new form ..... how i can call or create a new instance to call the connection string before i write myConn.open regards

    C 1 Reply Last reply
    0
    • C costavo

      hi what just i want to know : a connection string is already in the connection class and tested. i am adding a combo box in a new form ..... how i can call or create a new instance to call the connection string before i write myConn.open regards

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      What do you want to do exactly ? What connection class ? What does the combo box do ? You can't call a string.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      C 1 Reply Last reply
      0
      • C Christian Graus

        What do you want to do exactly ? What connection class ? What does the combo box do ? You can't call a string.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        C Offline
        C Offline
        costavo
        wrote on last edited by
        #3

        the idaea is i want to fill the combo box data from the database( sql 2000) i am working in c# the connection string exist in a class how i can open the connection from the form?

        C 1 Reply Last reply
        0
        • C costavo

          the idaea is i want to fill the combo box data from the database( sql 2000) i am working in c# the connection string exist in a class how i can open the connection from the form?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          OK, now it's starting to make sense. The reason to have the conection string in a class, is for that class to be part of the data layer. It should therefore expose methods to get the data you need, which can then be called to set the datasource of the combo box.

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          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