Computing.Net > Forums > Database > Ms Access Paramarray Usage

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Ms Access Paramarray Usage

Reply to Message Icon

Name: reno
Date: January 3, 2009 at 05:20:23 Pacific
OS: XP
CPU/Ram: P4 & 1GB
Product: Asus / -
Subcategory: General
Comment:

PROBLEM 1:
----------
i have 2 function that use paramaray as argument

FUNCTION func1(Paramarray arg())
//some code here
func2 arg
//more code here
end function

FUNCTION func2(Paramarray arg())
Dim strArray() as string
redim strArray(ubound(arg))
if Ubound(arg) <> -1 then
for i=0 to ubound(arg)
strArray(i) = "prefix" & arg(i)
next i
end if
END function

i use macro to call func1:
- func1("string1","string2","string3")
- func1("some","string")
- func1()

here is the problem:
1. the arg is passed to "func2" as a 2-dimensional array, instead as 1-dimesional array. so i cannot access with arg(i) and have to workaround with arg(0)(i).
how do i pass it as 1-dimesional array???

2. if i dont pass any argument to "func1", how do i test if strArray() is null.
i try the following code, and its not working
- if IsNull(strArray) then cancel=true
- if strArray=nul then cancel=true
- if ubound(strArray)=-1 then cancel=true
none of the above code is working.


PROBLEM2:
--------
i have this database that links to an external .csv file. the .csv file is updated daily from a dos-batch-code that connect to internet. the problem is the .csv file have grown up to 20MB in size (>5years stock data), and my query takes more than 5minutes to execute. is there any way to optimize this? the query involves a lot of calculation such as %increase in 1day, 7days, 30days, 52weeks. Historical High-Low price in 1day, 7d, 30d, 52weeks.

in case i dont describe it clearly, please let me know.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Database Forum Home


Sponsored links

Ads by Google


Results for: Ms Access Paramarray Usage

MS Access 2003 & Time Query www.computing.net/answers/dbase/ms-access-2003-amp-time-query/90.html

Hiding VB Code MS Access www.computing.net/answers/dbase/hiding-vb-code-ms-access/178.html

MS Access 2000 export a record www.computing.net/answers/dbase/ms-access-2000-export-a-record/193.html