Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

"RDORESULTSETS""

Posted on 1999-01-13
7
Medium Priority
?
166 Views
Last Modified: 2010-05-03
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)
        CboRazSoc.text=BUSCAR(RS!EIN_CODIGO)
        TxtEdad.text=TRIM$(RS!EDAD)  'I loose RS!EDAD Why??
     EndIf
end Sub

Thank you very much, Sorry my English I speak spanish
0
Comment
Question by:euge092598
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 3

Expert Comment

by:cognition
ID: 1456097
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.
0
 

Expert Comment

by:sbgross
ID: 1456098
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.
0
 

Author Comment

by:euge092598
ID: 1456099
I don't open a new RdoResultsets in the buscar function and I don't know about the getchunck() function. Please can you response
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Expert Comment

by:sbgross
ID: 1456100
you need to provide more info, what type of DB, what are the field types, what is the select statement?
0
 

Author Comment

by:euge092598
ID: 1456101
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?

0
 
LVL 3

Accepted Solution

by:
cognition earned 480 total points
ID: 1456102
    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)
        s2=RS!EIN_CODIGO
        s3=TRIM$(RS!EDAD)  

        TxtCoenti.text = Trim$(s1)
        CboRazSoc.text=BUSCAR(s2)
        TxtEdad.text=TRIM$(s3)  

     EndIf


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

0
 

Author Comment

by:euge092598
ID: 1456103
Adjusted points to 160
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question