Forum Moderators: open

Message Too Old, No Replies

Question about MS SQL sever guest account and oledb connection

How to write the connection string for the guest account?

         

lichun

3:16 pm on Jul 7, 2007 (gmt 0)

10+ Year Member



Hello,

I am using a shared hosting which support ASP.NET and has a remote MS SQL server. For security reason, I'd like to use the SQL server built-in guest account to connect my database instead of using my login account. Is this possible? If yes, could someone please inform me what are the User Id and Password for the connection string? I am using the oledb connection and have tried

Conn=New OleDbConnection("Provider=SQLOLEDB;Data Source=<server ip> ; Initial Catalog=<my database>; User Id=guest; Password=")

and

Conn=New OleDbConnection("Provider=SQLOLEDB; Data Source=<server ip>;Initial Catalog=<my database>;กจ)

but none of the above works. Please advise, thanks.

aspdaddy

7:32 pm on Jul 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Shouldnt really give guest access to your db, guest just is for tempdb and master. If you want to do it though use sp_grantdbaccess but it will let any user login.

lichun

5:19 am on Jul 9, 2007 (gmt 0)

10+ Year Member



aspdaddy,

I see. Thank you very much for your help.