passing arrays from vb dll to vb form 
Author Message
 passing arrays from vb dll to vb form

after the RS.OPEN.....
X = rs.recordcount
redim Arr(x)
if x > 0 then
    rs.movefirst
    do while rs.eof = false
        ' move the data into the array
        arr(rs.absoluteposition) = rs.fields("NAME")
        rs.movenext
    loop
end if


Quote:
> hi all,
>        I am new to vb programming. i want to write
> functions in vb dll which takes some parameters in one
> dimensional array from vb form and from the dll the
> function has to insert the data retrieved from array in
> the database. Another function is return back all the
> records in a table in the form of 2 dimensional array.
> The easy way is using recordset as perameter. But i want
> to send back all the records in 2 dimensional arrays. How
> to do it. Can anybody suggest guide me to write the dll.
> with regards,
> vali



Wed, 30 Mar 2005 20:25:23 GMT  
 passing arrays from vb dll to vb form
You might have better luck with RS.GetRows(). It's faster, uses less
code, and gives the field names as well as values.

Check it out in the MSDN...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado2...

HTH

- Rick

Quote:

> after the RS.OPEN.....
> X = rs.recordcount
> redim Arr(x)
> if x > 0 then
>     rs.movefirst
>     do while rs.eof = false
>         ' move the data into the array
>         arr(rs.absoluteposition) = rs.fields("NAME")
>         rs.movenext
>     loop
> end if



> > hi all,
> >        I am new to vb programming. i want to write
> > functions in vb dll which takes some parameters in one
> > dimensional array from vb form and from the dll the
> > function has to insert the data retrieved from array in
> > the database. Another function is return back all the
> > records in a table in the form of 2 dimensional array.
> > The easy way is using recordset as perameter. But i want
> > to send back all the records in 2 dimensional arrays. How
> > to do it. Can anybody suggest guide me to write the dll.
> > with regards,
> > vali



Wed, 06 Apr 2005 03:18:22 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing array from VB to DLL and returning array

2. PB/DLL passing multidimensional VB arrays by pointers

3. Passing Array of data from DLL to VB

4. passing (string) arrays from VB to C-DLL and vice versa

5. Passing Multi-Dimension Arrays from VB to DLL

6. Pass array from ASP to VB ActiveX DLL

7. Passing array of strings to a dll in VB

8. Passing a binary array from VB to a DLL

9. Passing Arrays to Fortran DLL from VB

10. Passing arrays from VB to a DLL written in VC++

11. Passing arrays from FORTRAN dll from VB

12. Passing VB arrays to a dll written in C

 

 
Powered by phpBB® Forum Software