Solved

"RDORESULTSETS""

Posted on 1999-01-13
7
164 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
Independent Software Vendors: 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

751 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