Solved

"RDORESULTSETS""

Posted on 1999-01-13
7
159 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
  • 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now