passing parameter to class from application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Smile

    #1

    passing parameter to class from application

    Hi there,

    I have a question, please give me some idea. Thanks in advance!

    Solution1
    |
    |---DBLogic (class library)
    | |
    | |-dblogic (class) which defines ConnString, functions to create
    DataTable by sqlstr
    |
    |
    |---DBObjects (class library)
    | |
    | |-dbClients
    | |
    | |-dbEmployees.. etc
    |
    |
    |---UI (main application/start project)
    | |
    | |-Forms and UI
    | |-StartForm

    my questions is, the ConnString is hard-coded in the DBLogic class, with
    "server = xxx; database=xxxx; uid=sa; pwd=sapass", as said by the book i am
    reading,

    is it possible for me to read-in a text file with the UI\StartForm, and pass
    those
    information to dblogic class? and howto?

    i am doing that way becuase i want to modify the sa password from time to
    time, so
    that all i have to change is the text file after change the sa's password.

    Thanks again.


    Smile


  • RobinS

    #2
    Re: passing parameter to class from application

    I posted a response to this in the other newsgroup
    where you posted this.

    Please don't multi-post. Cross-post instead.
    This means if you are going to post something in
    multiple newsgroups, post it to all of them at
    one time. That way, if somebody in one group
    resolves your problem, people in the other groups
    know about it, and can help somebody else.

    Robin S.
    --------------------------
    "Smile" <smile@smile.co mwrote in message
    news:OmdDlAbCHH A.204@TK2MSFTNG P04.phx.gbl...
    Hi there,
    >
    I have a question, please give me some idea. Thanks in advance!
    >
    Solution1
    |
    |---DBLogic (class library)
    | |
    | |-dblogic (class) which defines ConnString, functions to create
    DataTable by sqlstr
    |
    |
    |---DBObjects (class library)
    | |
    | |-dbClients
    | |
    | |-dbEmployees.. etc
    |
    |
    |---UI (main application/start project)
    | |
    | |-Forms and UI
    | |-StartForm
    >
    my questions is, the ConnString is hard-coded in the DBLogic class, with
    "server = xxx; database=xxxx; uid=sa; pwd=sapass", as said by the book i
    am reading,
    >
    is it possible for me to read-in a text file with the UI\StartForm, and
    pass those
    information to dblogic class? and howto?
    >
    i am doing that way becuase i want to modify the sa password from time to
    time, so
    that all i have to change is the text file after change the sa's password.
    >
    Thanks again.
    >
    >
    Smile
    >
    >

    Comment

    • Smile

      #3
      Re: passing parameter to class from application

      Thanks RobinS,

      Sorry for multi-posting.
      Thanks for reply.
      "RobinS" <RobinS@NoSpam. yah.none¼¶¼g©ó¶ l¥ó·s»D:RfGdnXe MRpRy0sDYnZ2dnU VZ_sWdnZ2d@comc ast.com...
      >I posted a response to this in the other newsgroup
      where you posted this.
      >
      Please don't multi-post. Cross-post instead.
      This means if you are going to post something in
      multiple newsgroups, post it to all of them at
      one time. That way, if somebody in one group
      resolves your problem, people in the other groups
      know about it, and can help somebody else.
      >
      Robin S.
      --------------------------
      "Smile" <smile@smile.co mwrote in message
      news:OmdDlAbCHH A.204@TK2MSFTNG P04.phx.gbl...
      >Hi there,
      >>
      >I have a question, please give me some idea. Thanks in advance!
      >>
      >Solution1
      > |
      > |---DBLogic (class library)
      > | |
      > | |-dblogic (class) which defines ConnString, functions to create
      >DataTable by sqlstr
      > |
      > |
      > |---DBObjects (class library)
      > | |
      > | |-dbClients
      > | |
      > | |-dbEmployees.. etc
      > |
      > |
      > |---UI (main application/start project)
      > | |
      > | |-Forms and UI
      > | |-StartForm
      >>
      >my questions is, the ConnString is hard-coded in the DBLogic class, with
      >"server = xxx; database=xxxx; uid=sa; pwd=sapass", as said by the book i
      >am reading,
      >>
      >is it possible for me to read-in a text file with the UI\StartForm, and
      >pass those
      >information to dblogic class? and howto?
      >>
      >i am doing that way becuase i want to modify the sa password from time to
      >time, so
      >that all i have to change is the text file after change the sa's
      >password.
      >>
      >Thanks again.
      >>
      >>
      >Smile
      >>
      >>
      >
      >
      >

      Comment

      Working...