vb6 - byRef argument type mismatch help anyone -


my supervisor asked me debug recent program in vb6. have basic knowledge in vb. when try run program byref argument mismatch shown. can me this. i'll appreciate comments.

public sub s2_sort()  'loop day dcnt = 1 ubound(s2.day())     redim s2.day(dcnt).tlist(0)      'loop shift     tcnt = 1 ubound(taskid())         redim preserve s2.day(dcnt).tlist(tcnt)         redim preserve s2.day(dcnt).tlist(tcnt).slist(0)         'dicshift.removeall          'loop task         scnt = 1 ubound(shift())             redim preserve s2.day(dcnt).tlist(tcnt).slist(scnt)             redim preserve s2.day(dcnt).tlist(tcnt).slist(scnt).taskreclist(0)              'query paramaters project, datetime, , taskid              strquery = "select * prod_db project_id = '" & inpproject & "'" & _                     " , " & gettimestamp(s2.day(dcnt).dayval, shift(scnt).nextday, true, shift(scnt).starthour, _                     shift(scnt).hourlen) & _                     " , task_id = '" & taskid(tcnt).taskid & "'" & _                     " order start_time, task_id"             set rstinfo = adoconn.execute(strquery)              if not (rstinfo.eof , rstinfo.bof)                 rstinfo.movefirst                 wcnt = 0                 until rstinfo.eof                     wcnt = wcnt + 1                     redim preserve s2.day(dcnt).tlist(tcnt).slist(scnt).taskreclist(wcnt)                     'save records arraylist datarecord                     call setdatarecord(rstinfo, wcnt)                      'then compute, work time number , list on stlist                     s2.day(dcnt).tlist(tcnt).slist(scnt).val = s2_compute(s2.day(dcnt).tlist(tcnt).slist(scnt).taskreclist(wcnt), s2.day(dcnt).tlist(tcnt).slist(scnt).val)                     s2.day(dcnt).tlist(tcnt).val = s2_compute(s2.day(dcnt).tlist(tcnt).slist(scnt).taskreclist(wcnt), s2.day(dcnt).tlist(tcnt).val)                     's2.day(dcnt).tlist(tcnt).mstunit = datarecord(x).measurementunit                     's2.day(dcnt).tlist(tcnt).cost = datarecord(x).cost                     s2.day(dcnt).tlist(tcnt).resourcename = s2.day(dcnt).tlist(tcnt).resourcename + s2.day(dcnt).tlist(tcnt).slist(scnt).taskreclist(wcnt).resourcename                     s2.day(dcnt).val = s2_compute(s2.day(dcnt).tlist(tcnt).slist(scnt).taskreclist(wcnt), s2.day(dcnt).val)                      rstinfo.movenext                 loop             end if             set rstinfo = nothing         next scnt 'next shift     next tcnt 'next task next dcnt 'next day end sub 

the byref argument mismatch error simple mismatch between type of argument passsed sub expects different type. variable declarations not present in code, impossible tell.

the call sub see call setdatarecord(rstinfo, wcnt) line.

so check type of rstinfo , wcnt against type of arguments setdatarecord expects.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -