i am working in VB6
anyway,1 of my fren told me tat there is no such thing as constructor in VB6..so i hv continue it by coding another function to handle it. :)
however,i hv came across another problem...hehe..
---------------------------------------------------
dim adoRS As New ADODB.Recordset
adoRS.CursorType = adOpenDynamic
adoRS.LockType = adLockPessimistic
example 1:
=============
a = Array("ID", "address", "date")
b = Array("a", "b", "c")
adoRS.AddNew a, b
example 2:
============
dim a(2), b(2) As String
a(0) = "ID"
a(1) = "address"
a(2) = "date"
b(0) = "a"
b(1) = "b"
b(2) = "c"
adoRS.AddNew a, b
------------------------------------
i just can't get it, why example 1 can run but example 2 have error:
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
can any1pls kindly give some advice?
thanks,
snowbelly.
|