Solved

"RDORESULTSETS""

Posted on 1999-01-13
7
165 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
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!

 

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 160 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month11 days, 8 hours left to enroll

623 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