Using sp_addlogin in a Sproc

Using sp_addlogin in a Sproc

Post by Arvind Raj » Thu, 09 Apr 1998 04:00:00



I am trying to write a sproc which will create a server login and
database user id when a record is inserted into a user table called
user_profile.  But I get and error message saying that "sp_addlogin
cannot be run within a transaction".  Is there a workaround for this?

Basically, the adding of new users is being forced from a front end
application. The server is Sybase ASE 11.5./ Application is PB5.

Any suggestions?

Thanks


 
 
 

Using sp_addlogin in a Sproc

Post by Andrew Prosse » Fri, 10 Apr 1998 04:00:00



>I am trying to write a sproc which will create a server login and
>database user id when a record is inserted into a user table called
>user_profile.  But I get and error message saying that "sp_addlogin
>cannot be run within a transaction".  Is there a workaround for this?

>Basically, the adding of new users is being forced from a front end
>application. The server is Sybase ASE 11.5./ Application is PB5.

>Any suggestions?

>Thanks




relevant portions of the procedure that you need if you feel lucky.

You would still have the problem of having to add the login in the master db
and then change context to the required user db,

Regards
--
Andrew Prosser

 
 
 

1. Using sproc resultset in another sproc

Hi all,

This may be a dumb question, but here goes anyway:

We have an existing sproc (which we should NOT modify in any way: it
is maintained by another project), that returns a result set.

We now want to call that sproc from another sproc and use the result
set for additional querying (it needs to be joined).

Is it possible to direct the result set into a temp table (from the
calling sproc!), or do we have to modify the original sproc so it
directs its result set to a (predefined) temp table?

Any help is appreciated.

Regards,

Jean-Marc.

   /--- #include: <disclaim.std> ----------------------------/

 /ingbank.com            /                                 /
/----- (there is no xxremovexx in my address) ------------/

2. Data load - Test Results

3. error using sp_addlogin in vb

4. Universe on Linux Mandrake 7.1 & numbers

5. Trigger using sp_addlogin

6. NT 4.0 Install problem -topology.ora

7. Execute a SPROC in another SPROC

8. Index forst few characters of field

9. How to embed CreateTrigger into a sproc or otherwise script it into a sproc

10. Exec sproc from sproc

11. Calling Sproc from Sproc

12. sproc reading tables from another sproc

13. Exec SProc from SProc (output parameter question)