Solved

Datareport in visual basic 6.0

Posted on 2002-06-14
5
225 Views
Last Modified: 2013-11-25
i am inserting few records in a table through prog, then i display those records in report. when a new set of records are inserted then i try to display the records i get old set of records in report rather than a new set of records what sort of changes i should make to retrieve new set of records?
0
Comment
Question by:krishnarao-kr
[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
5 Comments
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 7077562
Close the Report, clear the memory (if needed) before open it again.
0
 
LVL 2

Accepted Solution

by:
RSivakumar_Sofil earned 50 total points
ID: 7078038
Add the following 3 lines of code in the calling place of the report.

DataEnvironment1.rsAuthors.Open strSql,DataEnvironment1.Connection1, adOpenDynamic
   
DataReport1.Show vbModal

DataEnvironment1.rsAuthors.Close


I assume that the report is bound to DataEnvironment1 as DataSource and Authors as Datamember.


cheers.
0
 
LVL 4

Expert Comment

by:gencross
ID: 7078064
If these do not work post the code you are using to open the report.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7900270
Hi krishnarao-kr,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: ryancys and RSivakumar_Sofil

krishnarao-kr, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7978311
SpideyMod
Community Support Moderator @Experts Exchange

ryancys points for you at:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20519684.html
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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.
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

738 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