473,396 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

procedure parameter question

I have created a procedure called TableFlattening(). When running it
thru a macro, I call this procedure via a function

Public Function DoFlatten()
Call TableFlattening
End Function.

Everything works fine. However, inside the proc I have been using a
hardcoded value for a table name. Now I need it to make it a variable,
and I would like to pass the name of the table to the procedure.

I have changed the signature of the proc to TableFlattening(ATableName
as String).
What I can't figure out is what do I need to do the function that calls
the procedure.

TIA

Pete

Nov 13 '05 #1
2 1373
pe***@garlic.com wrote:
I have created a procedure called TableFlattening(). When running it
thru a macro, I call this procedure via a function

Public Function DoFlatten()
Call TableFlattening
End Function.

Everything works fine. However, inside the proc I have been using a
hardcoded value for a table name. Now I need it to make it a variable,
and I would like to pass the name of the table to the procedure.

I have changed the signature of the proc to TableFlattening(ATableName
as String).
What I can't figure out is what do I need to do the function that calls
the procedure.

TIA

Pete


Public Function DoFlatten()
Call TableFlattening
End Function.

Public Sub TableFlattening(ATableName as String)
....process code
End Sub

You can pass the table name in DoFlatten
Public Function DoFlatten()
Call TableFlattening "NewTableName"
End Function.

Or pass the name to DoFlatten
Public Function DoFlatten(strTableName As String)
Call TableFlattening strTableName
End Function.

and do something like
=DoFlatten "NewTableName"

I'm not sure why DoFlatten is a function since you aren't returning a value.
Nov 13 '05 #2
The way I understand it, is that if you want to execute a procedure
from a macro, you can not do it directly. What you have to do is call a
function using the RunCode action; the function, in turn, invokes the
procedure you want to run.

Please correct me if this is wrong. I would be more than glad to modify
things. And thank you for your tips; I will test them out, and report
back.

Thanks,

Pete

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raquel | last post by:
Have a question on the Stored procedure method code generated by DB2 development center for Java stored procedures. Suppose I have a requirement to return the resultset consisting of FIRSTNME,...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
11
by: Leroy | last post by:
Hello, I have a question regarding the maximum number of parameters that can be passed to a procedure. In VB 6 the max was 60. What is the max for Dot Net? please and thanks.
22
by: M K | last post by:
Heres my SP: ( i am trying to add more than 1 field but get the same error no matter how many i try to add, i thought i would try to insert the primary key only and work up from there but the...
9
by: Leedrick | last post by:
Hi, In the past I have been dealing mainly with sql server, and recently been given the task of supporting software that uses db2 on as400. Simple tasks such as executing a stored procedure...
7
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason...
5
by: ric_deez | last post by:
Hi there, I would like to create a simple search form to allow users to search for a job number based on a number of parameters. I think I understand how to use parameteres associated with Stored...
4
by: Pakna | last post by:
Hi, is there any way to call a JAVA stored procedure from a SQL Trigger? We are having difficulties with this and cannot verify whether DB2 even *has* this capability? Thank you very much....
3
by: .Net Sports | last post by:
I need to call an stored procedure from an asp script, I don't need to do an Output parameter, only input parameters on 3 vars, but I get a "BOF EOF not true or record has been deleted" error when...
6
Soniad
by: Soniad | last post by:
Hello, I am excecuting a stored procedure in my ASP page , it has one out parameter (@confirm) . after executing the procedure i want to retreive this out parameter and assign it to variable...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.