Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Connect to SQL with DSN without uid and password

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Connect to SQL with DSN without uid and password

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Connect to SQL with DSN without uid and password

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect to SQL with DSN without uid adn password augustus Excel Programming 0 February 24th 09 11:06 AM
Connect to MS Access with Password via VBA matelot Excel Programming 2 September 19th 06 03:55 PM
PASSWORD REMOVAL I have the password to open the file and the password to modify the file now how to remove them LJ[_4_] Excel Programming 0 April 27th 06 03:18 AM
using strDb to connect Excel to an FTP site w/password VBailey Excel Programming 0 August 2nd 05 09:26 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"