Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
PROBLEM 1:
----------
i have 2 function that use paramaray as argumentFUNCTION func1(Paramarray arg())
//some code here
func2 arg
//more code here
end functionFUNCTION 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 functioni 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.

![]() |
![]() |
![]() |

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