DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: help me,getting connection string from table

  1. #1
    sri Guest

    help me,getting connection string from table


    hello vb pro's,

    i have an application,what ihave to do is grab the connection string from
    table is in the FM database,with adodb or with any i want to connect the
    database and from that i want to connect the table in the same database.is
    this confused.what my main problem is they can't see my code,if they want
    to change server name etc..how can they do.
    i am trying with table like dsn,pws etc.. columns.is it possible.
    thanks.
    sri


  2. #2
    Michael Culley Guest

    Re: help me,getting connection string from table


    sri,

    >is
    >this confused


    Yes. But I think I know what you are after

    You want your user to be able to select the database path/filename, right?
    You can't store this in the database. I would store it in the registry. Just
    have a form so the user can specify the path to the DB. Then use SaveSetting
    to store the value they select.

    SaveSetting "MyApp","Misc","DBPath",txtDBPath.txt

    Use GetSetting to retieve it. If the setting is blank you can assume a default
    value.

    strDB=GetSetting("MyApp","Misc","DBPath",app.path & "\MyDB.mdb")

    Michael Culley

    "sri" <sri.kapa@figtreesys.com.au> wrote:
    >
    >hello vb pro's,
    >
    >i have an application,what ihave to do is grab the connection string from
    >table is in the FM database,with adodb or with any i want to connect the
    >database and from that i want to connect the table in the same database.is
    >this confused.what my main problem is they can't see my code,if they want
    >to change server name etc..how can they do.
    >i am trying with table like dsn,pws etc.. columns.is it possible.
    >thanks.
    >sri
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center