Hiding an SQL connection string in an Excel macro

  • Thread starter Thread starter Bob Smith
  • Start date Start date
B

Bob Smith

Is there a technique for hiding the SQL connection string (ADO) in an Excel
macro? I think I already know the answer to that question (no), but I'm
just wondering if there's a trick that would accomplish it.

I'm authoring some macros for a client of mine and they need to communicate
with an SQL server account I have with my web hosting company and I
obviously don't want them to know my username and password.

Thanks in advance.
 
Hi

I think you may try to secure the VBA project via password, so that other
can not view the code in your vba macro.
You may try to open the vba project IDE where the macro locates and then
right click on the vba project, select VBAProject properties.
Select Protection Tab and check Lock Project and set the password.

XL97: How to Create an Add-in File in Microsoft Excel 97
http://support.microsoft.com/kb/156942/en-us

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Bob Smith said:
Is there a technique for hiding the SQL connection string (ADO) in an Excel
macro? I think I already know the answer to that question (no), but I'm
just wondering if there's a trick that would accomplish it.

I'm authoring some macros for a client of mine and they need to communicate
with an SQL server account I have with my web hosting company and I
obviously don't want them to know my username and password.

I don't think you want to use *your* username and password at all. The
following article may give you some ideas:

Establishing Application Security and Application Roles
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_security_89ir.asp

Jamie.

--
 
Back
Top