Re: Please Help Me in Visual Basic 6.0 SP6
- From: d_harry45 <mfmz78@xxxxxxxxxxx>
- Date: Thu, 4 Aug 2005 17:53:48 -0700
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.
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. 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?
Thanks in advance.
"Paul Clement" wrote:
> On Wed, 3 Aug 2005 20:51:51 -0700, d_harry45 <mfmz78@xxxxxxxxxxx> wrote:
>
> ¤ i'm not meant to ask for a free service here..but i am searching for a
> ¤ solution where as somebody can help me where to start. Because, in this case,
> ¤ i've no idea on how to start it. Is it using Connectionless or others.
> ¤
> ¤ My opinion is, how to make the connection string to the database as a
> ¤ variable? Because this is when the user select the database from combobox or
> ¤ listbox, so the selected database file will be the string to make the
> ¤ application to connect to. Because, I just know we can hard code it in our
> ¤ programming, but i don't want that.
> ¤
> ¤ Any suggestion? Many thanks in advance.
>
> You could use the SaveSetting and GetSetting functions to store part of your connection string in
> the Registry.
>
> Maybe you could indicate where you are stuck so that we can answer specific questions.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>
.
- Follow-Ups:
- Re: Please Help Me in Visual Basic 6.0 SP6
- From: Michael Cole
- Re: Please Help Me in Visual Basic 6.0 SP6
- 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
- Please Help Me in Visual Basic 6.0 SP6
- Prev by Date: Re: PageFile control
- Next by Date: Re: Please Help Me in Visual Basic 6.0 SP6
- Previous by thread: Re: Please Help Me in Visual Basic 6.0 SP6
- Next by thread: Re: Please Help Me in Visual Basic 6.0 SP6
- Index(es):
Relevant Pages
|