Home All Groups Group Topic Archive Search About

passing parameter to class from application

Author
16 Nov 2006 6:51 PM
Smile
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

Author
17 Nov 2006 6:00 AM
RobinS
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.
--------------------------
Show quoteHide quote
"Smile" <sm***@smile.com> wrote in message
news:OmdDlAbCHHA.204@TK2MSFTNGP04.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
>
>
Author
20 Nov 2006 5:02 PM
Smile
Thanks RobinS,

Sorry for multi-posting.
Thanks for reply.
Show quoteHide quote
"RobinS" <RobinS@NoSpam.yah.none> ¼¶¼g©ó¶l¥ó·s»D:RfGdnXeMRpRy0sDYnZ2dnUVZ_sWdn***@comcast.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" <sm***@smile.com> wrote in message
> news:OmdDlAbCHHA.204@TK2MSFTNGP04.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
>>
>>
>
>
>