DAL and Execute AS USER = 'myuser'

A

Avi

Hi all,



I'm using DAL auto generated code. Is it possible for me to have the same
connection string for all my transactions but to execute the command
"Execute AS USER = 'myuser'" (SQL Server 2005) before each execution. Where
I control the name of the user.



Thanks,

Avi
 
N

Nicholas Paldino [.NET/C# MVP]

Avi,

To do this, I would issue the command against the database when you
create and open the command. Then I would issue your other commands, as
needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top