Hidden VBA functions?

Stevenn

Active Member
Joined
Feb 8, 2012
Messages
259
I am looking in a VBA project I've downloaded and have found following code

Code:
SQL = "BEGIN budget_p.upload_from_excel(" & ... & "); END;"

I've looked through the entire project for the names "budget_p" and "upload_from_excel", but can't find anything. The project is helping me update and insert lines in an Oracle database. Is it possible that functions is located somewhere else than in my Excel project? The project is made for a bigger company, so I guess there are made some security settings.
 
The way it's written, that isn't 'code' per-se...it is a string of text. As if they were going to use it in a messagebox or something similar.
 
Upvote 0
The way it's written, that isn't 'code' per-se...it is a string of text. As if they were going to use it in a messagebox or something similar.

I know. But I've no experience with "BEGIN ? END;" in SQL, and the layout of the string is just like a function.
Code:
budget_p.upload_from_excel(x,y,z);
 
Upvote 0
Now you have (x,y,z). Maybe if you post the entire code, as is, it would help.

For the record, I have no exp. with SQL either, so if that's where this leads, I will be a quiet observer :).

It's possible SQL is a variable in the code, which is why it would help to see all of it.
 
Upvote 0
I don't know for sure, but could the "budget_p.upload_from_excel" be a stored procedure in the SQL database? I am not familiar with Oracle (or that much with other SQL DBs) but based on my experience I would look to the database for the function you are trying to find.
 
Upvote 0
I don't know for sure, but could the "budget_p.upload_from_excel" be a stored procedure in the SQL database? I am not familiar with Oracle (or that much with other SQL DBs) but based on my experience I would look to the database for the function you are trying to find.

Thanks for your answer. I guess you're right. It seems to be a stored procedure. Do you think it is possible to see the procedures without having permission directly to the Oracle database? I've got an username and password to use those stored procedures but are very curious of how the stored procedures look like :-)
 
Upvote 0
I've found that I can see the procedure by following sql code

Code:
SELECT TEXT FROM USER_SOURCE WHERE NAME = budget_p ORDER BY LINE;

but I get the error "'BUDGET_P' is not a procedure or is undefined". I've no other information except of "budget_p.upload_from_excel"
 
Upvote 0
SQL = "BEGIN budget_p.upload_from_excel(" & ... & "); END;"

Its a line of SQL (really!)
BEGIN END are transaction braces

budget_p.upload_from_excel probably represents a db based object, most likely a table budget_p and field upload_from_excel but could be a view or procedure ON THE DB


so you can stop looking in Excel!
 
Upvote 0
I've just tried to output "SELECT * FROM USER_SOURCE" but the only information I get is the names of the fields "name", "type", "line" and "text" and no records. So maybe it's not a procedure?
 
Upvote 0
I've just tried to output "SELECT * FROM USER_SOURCE" but the only information I get is the names of the fields "name", "type", "line" and "text" and no records. So maybe it's not a procedure?

I found it with "SELECT TEXT FROM ALL_SOURCE WHERE NAME = 'BUDGET_P'" :-)

But the only information I get is

PROCEDURE upload_from_excel(
x IN NUMBER,
y IN NUMBER DEFAULT NULL,
...
);

I thought I would find some INSERT INTO-operations and so on. Have I misunderstood something?
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top