Dear Sir/Mad'm
> I am a new vb6.0 developer.i got a problem when
> i was doing a small application My problem is that
> table xyz
> col: a b
> 12 15
> table pqr
> col: p
> rs!a+rs!b
> i had to write code like this
> CN.Open "DSN=CONSOLIDATE;UID=SA;PWD=SA;"
> CMD.ActiveConnection = CN
> button_click event
> cmd.commandtext="select * from xyz"
> rs.open cmd,,adOpenDynamic, adLockOptimistic
> if(rs.eof=true)
> cmd.commandtext="select * from pqr"
> rs1.open cmd,,adOpenDynamic, adLockOptimistic
> dim c as integer
> while(rs1.eof=false)
> c=rs1!p ‘error message shows TYPE MISMATCH
> list1.additem c
> rs1.movenext
> wend
> end if
> but i was getting an error of type mismatch b’coz the statement rs1!p
is returning a string(rs!a+rs!b), is not accessing the value of rs!a and
rs!b . is not accessing a value of fist table xyz
> how could i resolve this query;
> i am very grategul if you will reply my
> query; i am waiting for ur response
thxxx for reply I have also done like this
but
not resolving this error. Plzz resolve this query ; I am very grateful to
you
if you will reply this query again.
with
regards
vikas kumar
gupta


|