When I asigne a Rdo Resultset variable data,this data is lost when I excecute a other function . Why do I loos the assigned data and how I can't lose it?
Sub Consult()
    Dim Rs As rdoResultset
    Dim clsEntins as New CLAENTI

     Set Rs = clsEntins.metLeerEntins("sp_SEL_Uc_ENT_INSC")
     If Not(Rs.EOF And Rs.BOF)

        TxtCoenti.text = Trim$(Rs!EIN_COENTI)
        TxtEdad.text=TRIM$(RS!EDAD)  'I loose RS!EDAD Why??
end Sub

Thank you very much, Sorry my English I speak spanish
Who is Participating?

Improve company productivity with a Business Account.Sign Up

cognitionConnect With a Mentor Commented:
    Dim s1 as string
     Dim s2 as string
     Dim s3 as string

     Set Rs = clsEntins.metLeerEntins("sp_SEL_Uc_ENT_INSC")
     If Not(Rs.EOF And Rs.BOF)

        s1 = Trim$(Rs!EIN_COENTI)

        TxtCoenti.text = Trim$(s1)


Alternatively create another connection, and use that in the BUSCAR function.

Is RS!EDAD a Text datatype ?

If it is try removing the Trim$().

If it is SQL server and a TEXT field, then you may need to use getchunk, appendchunk functions.
if the buscar function opens a rdo recordset on the same connection the previous recordset is closed.  This is by design.  If you want to have two recordsets open at the same time setup another connection.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

euge092598Author Commented:
I don't open a new RdoResultsets in the buscar function and I don't know about the getchunck() function. Please can you response
you need to provide more info, what type of DB, what are the field types, what is the select statement?
euge092598Author Commented:
I use SQL SERVER DB, and "buscar function" opens a new rdoresultset
You tell me I loose the first one, How can I preserve that data?

euge092598Author Commented:
Adjusted points to 160
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.