Re: Please Help Me in Visual Basic 6.0 SP6
- From: "Michael Cole" <noone@xxxxxxxxxx>
- Date: Fri, 5 Aug 2005 11:01:01 +1000
d_harry45 wrote:
> Public Sub setdbpswd()
> Dim dbPath As String
> Dim dbConn As String
>
> dbPath = App.Path & "\database\jheks" & "\pswdjheks.mde"
> dbConn = "provider=Microsoft.Jet.OLEDB.4.0;data source=" & dbPath
> & ";Jet OLEDB:database password ="
> dbpswd.ConnectionString = dbConn
> dbpswd.CursorLocation = adUseClient
> dbpswd.CommandTimeout = 30
> dbpswd.Open
> End Sub
> --------------------------------------------------------------------------
----------
>
> Above is my programming where in this programming, we indicate that
> where the database location using App Path. But, using this same
> programming or others, how can i indicate myself which one i'm gonna
> insert to the database. It's seems like to have an input first before
> we can establish the connection to the particular database chosen.
Yes you will. Pop up a screen asking for which database, and then use that
selection to open the connection.
> The case is like this, I will have the path like "\database1\jheks",
> "\database\jheks", \database2\jheks" and so on. The case and the
> problem is, i want my user to indicate which database folder they
> refer to insert, and then my application will connect to it.
Ask the user. Stick up a screen and ask them. What is difficult about
this.
>But I
> don't know how to done that. For your infomation, this folder
> "\database" will refer to which batch of file will gonna insert to
> the database.
>
> I've information where to select the database is using
> listbox/combobox, or also can using Windows Common Dialog. But, how
> to hold the selection and where to put it? Any tutorial that can help
> me?
Put it in a string variable - that's what they are for. You can either use
a global variable, or pass it as a parameter to the database connection
procedure. This is pretty basic stuff. What specifically is the problem?
--
Regards,
Michael Cole
.
- References:
- Please Help Me in Visual Basic 6.0 SP6
- From: d_harry45
- Re: Please Help Me in Visual Basic 6.0 SP6
- From: Michael Cole
- Re: Please Help Me in Visual Basic 6.0 SP6
- From: d_harry45
- Re: Please Help Me in Visual Basic 6.0 SP6
- From: Michael Cole
- Re: Please Help Me in Visual Basic 6.0 SP6
- From: d_harry45
- Re: Please Help Me in Visual Basic 6.0 SP6
- From: Paul Clement
- Re: Please Help Me in Visual Basic 6.0 SP6
- From: d_harry45
- Please Help Me in Visual Basic 6.0 SP6
- Prev by Date: Re: Please Help Me in Visual Basic 6.0 SP6
- Next by Date: Re: Best Book(s) to Learn Basic in Visual Studio .Net 2003 ?
- Previous by thread: Re: Please Help Me in Visual Basic 6.0 SP6
- Next by thread: Re: Datagrid to refresh automatically
- Index(es):
Relevant Pages
|
Loading