Execute As

Greetings.
I have 2 Databases with 2 different sets of users, and thus 2 different sets 
of permissions.  Certain actions on Database A fires a trigger that executes 
a stored procedure on database B.  If the user in Database A doesn't have 
permission on Database B, then the procedure fails, and the User gets an 
error.  I have been experimenting with the EXECUTE AS function, but it 
doesn't seem to work as I had expected.  Can anyone give me some tips or 
point me in the direction of some holiday reading material?  Thanks in 
advance.

Matthew Vandermolen
Solutions Architecht
Worktech Inc. 

0
Matt
12/24/2007 8:35:50 PM
access.queries 6343 articles. 1 followers. Follow

0 Replies
984 Views

Similar Articles

[PageSpeed] 54

Reply:

Similar Artilces:

DoEvents and Execution
I'm using AC2003. I have FormA which has two subform controls on it which do not have a SourceObject assigned to them. I do that in the form_open event, see below. What I'm trying to do is to open a simple OneMomentPlease form that has several colored labels used to indicate progress. As I understand it, a DoEvents statement should force all statements prior to it to execute before any following statements to execute. However, it's not working that way. When FormA is opened it runs through all statements. Each sourceobject contains a fairly complex chart and ta...

Program stops executing
I have an instance such that any VB program will not work on a certain PC. It used to, but now the VBNET2005 generated executable will now not execute. I have tried creating a simple project with just a form on it with Hello World in a textbox and even that will not execute in runtime. There is no question of the framework not being installed because it comes standard in the Windows XP SP2 and I have SP3 installed on the PC. I have uninstalled and reinstalled the DotNet framework and this has NOT resolved the issue. Can anyone please shed some light on this matter for me a...

Execute As
Greetings. I have 2 Databases with 2 different sets of users, and thus 2 different sets of permissions. Certain actions on Database A fires a trigger that executes a stored procedure on database B. If the user in Database A doesn't have permission on Database B, then the procedure fails, and the User gets an error. I have been experimenting with the EXECUTE AS function, but it doesn't seem to work as I had expected. Can anyone give me some tips or point me in the direction of some holiday reading material? Thanks in advance. Matthew Vandermolen Solutions Architecht Worktec...

Mem Usage increase while while executing dialog box
Dear All, Hope I have posted to the correct topic area. Need some help here. 1. I have created a simple dialog box using Visual Studio C++ 6.0, the dialog box contains an multiline read-only Edit Box, a Start Button and a Stop Button. 2. When the Start Button is clicked, the program will execute and the Edit Box will just print out the following text - "Line XX", where XX is the number 3. Problem is that when the program is executed and using Windows Task Manager to monitor the process, there is a high usage of Memory (ranges from 3636K to as high as 40000K). 4. Question ...

Server execution failed
Am trying to play WMV clips. I keep getting Server Execution Failed messages. What's the fix? Thanks. -- James Never mind. Fixed it by running a registry cleaner. Odd. -- James "James Ko" <iamwho@hawaii.rr.com> wrote in message news:uhbKodidKHA.6096@TK2MSFTNGP02.phx.gbl... > Am trying to play WMV clips. I keep getting Server Execution Failed > messages. What's the fix? Thanks. > > -- > James ...

Updating Form Field During Execution
I have a textbox field on a form in which I enter the number of times to execute a particular loop in my program. If I enter 2000, I would like for the field to change, maybe every 100 executions, to show how many remaining executions there are. I am changing the value (textbox.value = xx) after each 100 executions, but the field on the form does not refresh until all 2000 loops have been executed. Is there some way to accomplish this? -- Bill @ UAMS This is a userform? Try changing your value: me.textbox.value = clng(me.textbox.value) - 100 me.repaint BillCPA wrote: >...

Execute an executable program.
How can I in code (VB.NET 2008) execute another executable program ? Thanks :) On Mar 26, 11:21=A0am, "Mr. X." <nospam@nospam_please.com> wrote: > How can I in code (VB.NET 2008) execute another executable program ? > > Thanks :) Process.Start("path_of_exe") http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.as= px is what you want. HTH, Onur G=FCzel Am 26.03.2010 10:21, schrieb Mr. X.: > How can I in code (VB.NET 2008) execute another executable program ? 'System.Diagnostics.Process.Start' or &#...

EXECUTE
HOW DO YOU DO AN EXECUTE? could you please be a bit more specific? what is your question? execute what? "AS" wrote: > HOW DO YOU DO AN EXECUTE? I AM DOING AN ADO IN DEXTERITY CALLING A STORED PROCEDURE AND WOULD LIKE TO EXECUTE THE COMMAND. WHAT DO I DO? "26point2er" wrote: > could you please be a bit more specific? > > what is your question? execute what? > > > > "AS" wrote: > > > HOW DO YOU DO AN EXECUTE? Stop SHOUTING, for one thing. "AS" <AS@discussions.microsoft.com> wrote in message news:675...

execute $variable LATER
$a = "$computer `t $computer_lastlogon `t $computer_pwdlastset" | out-file -filepath c:\results1.txt -append =================================== I wish to store the above statement in a variable, and to EXECUTE LATER. How do i prevent $a from execution until i decided to put in somewhere in my script as $a ? If I follow: PS>$a = "$computer `t $computer_lastlogon `t $computer_pwdlastset|out-file ...." wait PS>invoke-expression "$a" "IT Staff" <jkklim@hotmail.com> wrote in message news:OcNiG6BwKHA.5036@TK2MSFTNG...

Event Execution
I have a form that contains 3 charts on it. The form works fine except it takes about 2-4 seconds for each of the charts to appear. The charts are fairly complicated. All of the tables/queries have been analyzed and optimized. What I am looking for is the proper event that I can use that tells me that all 3 charts have been populated/displayed. I want to display a field that says "One Moment Please" until the 3 charts have been displayed. I've tried the AfterRender, AfterFinalRender, AfterLayout events but none of them fire. Is there an event that I can use...

executing..............
when i sync, the box comes up showing status. when it gets to download all messages from gmail, the status shows "executing". no tasks below this have any status update. Am i to assume it is constantly executing this? I ask because when i send a mail, it sits in outbox until i close this box by pressing stop. This causes it to purge the outbox, sending my mail. it is a pain and sometimes I forget, thus, mail sits there forever without being sent. Help!!! Look at Tools (ALT+T), Options, General. Do you have it set to check for messages every xx minutes? If s...

Running an executable with dependencies from a network folder
I have an excel 2010 workbook located in a network directory and a .exe program in the same directory, along with a number of its dependencies (data files). I'd like to run the exe program from within a VBA subroutine using a shell command. Current code is as follows [code] Sub RunModel() ReturnValue = Shell("model.exe") MsgBox ReturnValue End Sub [/code] This fails as I need to change directories to the network drive and set the current working directory to ActiveWorkbook.Path, so the shell command can find the exe file which in turn can find its dependencies. N...

how execute Adobe Reader and sendkeys?
Thanks in advance. I want to open Adobe Reader with a file already in the command line (using shell) and then sendkeys to it to highlight (CTRL-A) the file, copy it (CTRL-C), then quit (CTRL-Q) (which I don't know how to do). Then I plan to open Word and paste into another file (which I will worry about later). I have tried this: Dim testvar as variant testvar = Shell("C:\Program Files\Adobe\Acrobat 5.0 \Reader\acrord32.exe c:\pier.pdf", vbNormalNoFocus) AppActivate testvar, False DoEvents SendKeys "^(a)", True 'this is CTRL+A SendKeys "^a", False &...

Execute Macro
Hello, Is there a way to execute a macro in a formula ?? For example a need to execute a macro if the value in a cell is out of range. Many thanks for your help Yves Hi not directly, you can however, put worksheet change code against the sheet to read the result of the formula and run appropriate code, e.g. ------ Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" And Target.Value < 4 Then Application.EnableEvents = False Call Macro1 Application.EnableEvents = True End If End Sub ------- if you'ld like help ...

Executables
Hello - I have a general question re executables. If users have a shortcut to an executable that resides on an application server, where is the application actually "running" from? Does it "run" on the client computer? Does a copy of it "run" on the client computer? How many people can run a shortcut that points to one executable at the same time? -- Sheldon =?Utf-8?B?U2hlbGRvbg==?= <Sheldon@discussions.microsoft.com> wrote in news:F3F8089C-11E8-4DDF-98D8-3B4133E6E328@microsoft.com: > Hello - > > I have a general question...

MFC executable is 100% slower on faster machine
I recently upgraded my computer hardware from a 2.4 Ghz Celeron to a 2.66 Ghz Core i5 and an MFC application that I developed runs only half as fast on the faster machine. What could be causing this? Both machines have identical sata hard-drives, and the fast machine has much faster RAM 1333 ddr3 and 4.0 GB. The slower machine has 2.0 GB of 333 ddr RAM. Why is the slower machine twice as fast on the same executable? Is the application multithreaded? Is it floating-point intensive, memory-intensive, and what else? "Peter Olcott" <NoSpam@SeeScreen.com> ...

How to automatically allow JavaScript but NOT (other) ActiveX execution on web pages?
When I visit web pages with embedded JavaScript then currently always a yellow bar at the top of the browser window appears telling me something about ActiveX and security risks. Ok, I can click manually on a submenu and allow the execution. But this is somehow annoying on the long run. How EXACTLY can I always automatically allow JavaScript scripts BUT NO OTHER ActiveX component execution? Is this possible at all or are the permissions undividable linked together? Brian ...

Replace the Icon of an executable
Hi Is there any way to change the existing icon of an application with another one. I have to do it at run time and not at compile time. Any advice how to do it in VC++. Regards Usman "Usman Jamil" <usman@advcomm.net> wrote in message news:eUPuuYdzHHA.4712@TK2MSFTNGP04.phx.gbl... > Hi > > Is there any way to change the existing icon of an application with > another one. I have to do it at run time and not at compile time. Any > advice how to do it in VC++. > The icon is stored in the application's resources. If the application is not running...

path to dll currently executing
How would I obtain the path to the DLL which contains the code which is currently executing ? This is a Web Services project, and so the \bin\ folder is obviously at a different path design-time v run-time. Thanks. On 1/6/2010 9:12 PM, John Grandy wrote: > How would I obtain the path to the DLL which contains the code which is > currently executing ? > > This is a Web Services project, and so the \bin\ folder is obviously at a > different path design-time v run-time. > > Thanks. > > System.Reflection.Assembly.GetExecutingAssembly().Locati...

Execute excel macro based upon cell condition
There must be a simple answer to this, but I haven't been able to figure it out. How can I run a macro based upon a cell's condition. For example: Run a specific macro when cell A1=1. I would really appreciate help with this question. I'm trying to enhance a workbook that I use to teach students. Thank you! Robert K. Griffin UMass Prof Hi formulas can't be used to initiate macros, however you can use a worksheet_change event which when anything happens on the sheet, checks to see if the condition has been met and then will run the code. to use a worksheet_change even...

mailmerge execute
Hi using Word 2003. Maybe there is a better way to do this. Please let me know how to do it if there is. I have set up a template that has an Excel workbook as its data source. I would now like to automate merging data to a new document. With wdApp Set wordTemplate = .Documents.Open(letterTemplate) wordTemplate.mailmerge.Execute (True) Set wordDocument = .ActiveDocument ... End With The line where the template is opened triggers the following message. 'Opening this document will run the following SQL command... Data from your database...

Evaluate execution time
I need to evaluate the time a procedure takes to run so that I can compare 2 procedures... I was wondering if there was any advice on how it should be done. My initial idea was to simply create 2 variables: startime & endtime and place the startime at the very beginning and the endtime at the very end and equate them equal to time(). Finally end the procedure by debug.print endtime-startime. Does this make sence? Is there another approach I am missing? Perhaps a tool already exists to do this type of thing that I am not aware of? Thank you QB This API call sho...

Executing Powershell over SSH
I have a hybrid SSH/Powershell process that I am supporting. The user has an R script that invokes SSH commands to send a .tar file over SCP and then sends a command to untar the files. After that they are attempting to execute a Powershell script on the remote system (it's delivered in the .tar) and we are running into trouble with this. In an interactive session when you execute powershell with the script file and it's arguments, nothing happens until you enter a carriage return. At that point the script executes as expected until it's finished. After the script...

executibles
Is there a way to make an excel workbook into an executible? currently the user only sees forms and they input data into the forms. the data is dumped into the spreadsheets so that i can get the data. however, i am having the problem that the users have macros disabled and dont know how to enable, or some are really scared of the work "excel". so i was hoping that there is some way that i can make it into a standalone application that will still provide for me all the data that i need. is there any way to do this? Thank you, tkaplan -- tkaplan -------------------------------...

Re: too long execution time and access violation error
Oh ... and one more thing ... is CPlex one of your classes? If it is here's the problem ... CPlex::FreeDataChain() line 45 + 15 bytes It appears it's doing a delete that is causing the access violation. KS "KS" <ks@blah.com> wrote in message news:... > The reason why it's taking 55 seconds is because you're running the > application in debug. When running in debug, MFC has A LOT of overhead if > you're doing a lot of new's or a lot of delete's. This is a because MFC > does a lot of error checking to make sure you're not deletin...