Re: Are Macros Evil?



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> wrote

 > 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
ty
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.
.



Relevant Pages

  • Re: NT AUTHORITYANONYMOUS LOGON --- SQL server
    ... I have worked around the registry problem and added the computer name to the ... SQL as a valid log in with access to the correct databases. ... Now I have the following error message from the connection string: ... > NetworkService is designed to work across the network, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Are Macros Evil?
    ... connection string to an 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. ...
    (comp.databases.ms-access)
  • Re: Protecting Connection String Data from End-Users
    ... You could store the connection string in an encrypted format in the ... application configuration file or the registry and store the registry ... reference in your configuration file. ...
    (microsoft.public.sqlserver.programming)
  • Re: How to use ADO fast?
    ... I used to do the Registry thing but a lot of our clients don't ... config files. ... >> Cor, hardcoding connection string is silly by any mean, trust us. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: SQL connection string security
    ... There is a scriptable com object that can read from the registry which is ... We use appropriate permissions on both the registry ... > keys themselves (along with the obscurity of an attacker having ... > With the importance of not letting the connection string used to ...
    (Focus-Microsoft)