Re: Are Macros Evil?
- From: lyle fairfield <lylefa1r@xxxxxxxx>
- Date: Thu, 10 Apr 2008 18:53:01 GMT
timmg <tmillsgroninger@xxxxxxxxx> wrote in news:53e37725-06bf-4497-971a-
ac0901e156ca@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
On Apr 10, 11:21 am, "Larry Linson" <boun...@xxxxxxxxxxxxx> wrote:
"timmg" <tmillsgronin...@xxxxxxxxx> wrotety
> As to evil, I like Oscar Wilde's quote "There is no good or evil.
> There's only charming or tedious."
No evil? What about the Windows Registry and non-relational functionali
grafted into a relational database? <GRIN>
Tedious. I'd say that the Windows Registry is definately tedious
<VERY BIG GRIN>
Tim Mills-Groninger
I'm growing fond of the registry.
Consider an ADP. The production connection string and the development
connection string and the test machine base connection string are unlikely
to be the same. How to deal with this? Here's one way. We save the base
connection string to the user's registry, (just once). After that, we
connect using that string, which will always be correct. We do the same
thing for the development copy and the test copy. The code is quite short
and we run the function from the autoexec macro.
Public Function BaseConnect()
Dim ConnectionString$
Dim ProjectName$
ProjectName = Split(CurrentProject.Name, ".")(0)
On Error Resume Next
ConnectionString$ = _
GetSetting(ProjectName, "Startup", "BaseConnectionString")
With CurrentProject
If .IsConnected Then
If .BaseConnectionString <> ConnectionString Then _
SaveSetting ProjectName, _
"Startup", "BaseConnectionString", .BaseConnectionString
Else
If Len(ConnectionString) > 0 Then _
.OpenConnection ConnectionString
End If
End With
End Function
Initially I saved the various property items (and their values) of the base
connection string to an XML file. I had a production xml file, a
development xml file and a test xml file. EEEEWWWWW!
Using the registry is way simpler and the base connection string is as
secure as the user's registry, which in this case is probably safe enough.
.
- Follow-Ups:
- Re: Are Macros Evil?
- From: (PeteCresswell)
- Re: Are Macros Evil?
- From: Larry Linson
- Re: Are Macros Evil?
- References:
- Are Macros Evil?
- From: timmg
- Re: Are Macros Evil?
- From: timmg
- Are Macros Evil?
- Prev by Date: Re: Are Macros Evil?
- Next by Date: Please help, i'm very confused about tables & queries!
- Previous by thread: Re: Are Macros Evil?
- Next by thread: Re: Are Macros Evil?
- Index(es):
Relevant Pages
|