Get name of current procedure in VBA? [duplicate] - vba

This question already has answers here:
Get Name of Current VBA Function
(12 answers)
Closed 7 years ago.
For Error handling, I would like to have the current procedure name pushed into a call stack.
Is there any simple way to accomplish this outside of having to hard-code the name as a local variable for each subroutine?

Unfortunately, no. VBA code has no access to the call stack. A decent technique is here under Advanced Error Handling: https://www.fmsinc.com/tpapers/vbacode/Debug.asp

Related

Got 'Enter values for precautions" popup in Oracle Developer [duplicate]

This question already has answers here:
How to avoid variable substitution in Oracle SQL Developer
(5 answers)
Closed 1 year ago.
I'm using Oracle Developer to execute the SQL queries. I got this popup:
Enter value for precaution
when I'm trying to execute an insert query. Does anyone know why I'm getting this popup?
It would be simpler to answer if you posted statement you ran.
Meanwhile, that's probably because insert contains & which indicates a bind variable. Something like this:
insert into test (name) values ('Is this what&precaution?');
What to do? Run set define off first, then run the insert.

PLSQL packages with procedures in data dictionary [duplicate]

This question already has answers here:
How to get list of all the procedure inside a package oracle
(4 answers)
Closed 8 years ago.
How can i get list of packages with their procedures inside, with help of data dictionary views?
I need to get this list for a user lets say 'HR' , and to be listed like:
PackageName1: Procedure1, Procedure2,...
PackageName2: Procedure1, Procedure2,...
I used this line statement but i couldn't figure out how to get procedure lists inside of those packages:
select distinct name, type
from all_source
where owner ='HR'
and type='PACKAGE';
You can use this answer to get packages and procedure details
How to get a list with description of all dba packages
to get idea how to extract info
and then reformat output using LISTAGG function

How to Check the given string is a reserved keyword in sql server [duplicate]

This question already has answers here:
Check if string is SQL Server Reserved Keywords or not
(3 answers)
Closed 8 years ago.
How to check whether the given string is a reserved keyword in sql server.
I checked a lot in google ,but i didn't find one!!
for eg: If i am giving the input String as 'Order',sql statement should
return whether it is reserved keyword.
Is there any built-in stored procedures or function to do this? Any help would be appreciated.
There is no built-in function to do that.
Here is the list of the known identifiers.
http://technet.microsoft.com/en-us/library/ms189822.aspx
I suggest to put these in an table and use it in a function / stored procedure.

Create custom configuration functions in SQL SERVER [duplicate]

This question already has answers here:
Create a global static variable in SQL Server?
(4 answers)
Closed 9 years ago.
I want a function similar to ##servername to be created. So, the new ##mycustomname will return something I set up and then I can use ##mycustomname in my deployed T-SQL Scripts.
Is there a way to do it?
No you can't. These are reserved keywords.
What you want to be somewhat equivalent to global variables, which unfortunately does not exists.
The best you can do is declare a function.

IS vs AS keywords for PL/SQL Oracle Function or Procedure Creation [duplicate]

This question already has answers here:
What is the difference between "AS" and "IS" in an Oracle stored procedure?
(6 answers)
Closed 9 years ago.
I have been trying to find out what the difference is between the IS and AS keywords in PL/SQL when creating an Oracle function or procedure.
I have searched and have been unable to find any information on this. Does anyone know the difference?
I've never known there to be a difference. The Oracle documentation implies that they are synonyms:
The function body begins with the keyword IS (or AS) and ends with the keyword END followed by an optional function name.
Same as DISTINCT and UNIQUE in select statements.
i.e, there is no material difference between 'IS' and 'AS'.
Backwards compatibility and meeting standards