PC Review


Reply
Thread Tools Rate Thread

Connect to SQL with DSN without uid and password

 
 
augustus
Guest
Posts: n/a
 
      24th Feb 2009
Hi,

I'm trying to connect to SQL Server 2005 with SQL server driver (not
everyone in the company have the SQL Native Client driver) under ODBC, from
an Excel VBA spreadsheet.

I have setup a DSN connection, and did the test, everything is working.

Our SQL setup is authenticate by SQL Server.

My questions are

1) How to connect to the SQL server via DSN without username and password?
(I thought that if I have setup a DSN inside DSN, I shouldn't need to supply
a username and password inside the connection. I manage to connect to the SQL
server with uid and password.)

2) What I'm trying to do is connect to SQl without user requring to know thr
password/uid, and without having this info inside the VBA (after all, this
day, a file can be easily copied to anywhere). What options have I got?

Thanks in advance.

Regards
augustus108
 
Reply With Quote
 
 
 
 
Jim Thomlinson
Guest
Posts: n/a
 
      24th Feb 2009
So you want a secure system that does not require any password
authentication? You can't have it both ways. Either you set up a proxy ID in
your SQL security and use that as your user name and password or you require
the user to supply a password.

--
HTH...

Jim Thomlinson


"augustus" wrote:

> Hi,
>
> I'm trying to connect to SQL Server 2005 with SQL server driver (not
> everyone in the company have the SQL Native Client driver) under ODBC, from
> an Excel VBA spreadsheet.
>
> I have setup a DSN connection, and did the test, everything is working.
>
> Our SQL setup is authenticate by SQL Server.
>
> My questions are
>
> 1) How to connect to the SQL server via DSN without username and password?
> (I thought that if I have setup a DSN inside DSN, I shouldn't need to supply
> a username and password inside the connection. I manage to connect to the SQL
> server with uid and password.)
>
> 2) What I'm trying to do is connect to SQl without user requring to know thr
> password/uid, and without having this info inside the VBA (after all, this
> day, a file can be easily copied to anywhere). What options have I got?
>
> Thanks in advance.
>
> Regards
> augustus108

 
Reply With Quote
 
Member
Join Date: Apr 2008
Posts: 66
 
      24th Feb 2009
I suggest you put the password/uid in the VBA but password-protect the VBA. That way nobody except you will be able to see it (unless possibly they crack the VBA password but that would be a lot of effort).
You can protect your VBA code by right-clicking on any object in Project Explorer and choosing VBA Project Properties. On the Protection tab check the 'Lock Project for Viewing' check box and set a password.
HTH
 
Reply With Quote
 
augustus
Guest
Posts: n/a
 
      24th Feb 2009
Hi,

Let me clarify,I have setup a DSN, and during the setup and testing, it
asked for username and password. I thought this info stay inside the DSN. If
this info doesn't stay inside the ODBC\DSN, then what's the purpose of DSN?

What i'm trying to do is:
1) Connect to SQL Server from VBA
2) I don't want to leave a username and password inside VBA (I think this is
way too unsecure, as file could be easily copied)
3) I don't want user to know the uid/password; or that they have to type in
one.

Regards
augustus108
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista will not let Save User Password Appear when user name and password required - Connect to screen dvanthull Windows Vista Administration 4 30th Jun 2008 11:31 AM
>> dao connect with password =?Utf-8?B?Sm9uYXRoYW4=?= Microsoft Access VBA Modules 4 5th Aug 2007 09:26 PM
Can't connect to local machine with anything except IE Other browsers can't connect without password Otis Mukinfus Microsoft ASP .NET 3 8th Jul 2005 04:54 AM
Connect Password Pop Up sarah Windows XP Security 1 12th Sep 2003 08:35 PM
can not connect password larry Windows XP Messenger 0 9th Jul 2003 01:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:06 AM.