Error: "Query: dataset not in Edit mode": in delphi code for Rave Report [Edit]

I am trying to write a Delphi code (Delphi 2010) to print a rave report from the access database; I am using RVSystemprint method; q1 is a query name.
I get error message " q1: dataset not in edit or insert mode", at the line: while not q1.Eof.
Even though I added q1.Edit or q1.insert, it doesn't work.  Database's readonly property is FALSE.
What is missing in the code? Thanks.

procedure TForm1.rsysPrint(Sender: TObject);
begin
with Sender as TBaseReport do begin
.....
q1.Open;
    q1.Edit;
     q1.first;
    while not q1.Eof do begin
     ...
    end;
....

End;
0
Shobha
7/28/2010 8:23:21 PM
embarcadero.delphi.reporting 487 articles. 0 followers. Follow

3 Replies
2610 Views

Similar Articles

[PageSpeed] 18

> {quote:title=Shobha Choudhari wrote:}{quote}
> I am trying to write a Delphi code (Delphi 2010) to print a rave report from the access database; I am using RVSystemprint method; q1 is a query name.
> I get error message " q1: dataset not in edit or insert mode", at the line: while not q1.Eof.
> Even though I added q1.Edit or q1.insert, it doesn't work.  Database's readonly property is FALSE.
> What is missing in the code? Thanks.
> 
> procedure TForm1.rsysPrint(Sender: TObject);
> begin
> with Sender as TBaseReport do begin
> ....
> q1.Open;
>     q1.Edit;
>      q1.first;
>     while not q1.Eof do begin
>      ...
>     end;
> ...
> 
> End;
0
Shobha
7/30/2010 3:44:19 PM
I replaced ADOQuery with ADODataset and everything worked.


> {quote:title=Shobha Choudhari wrote:}{quote}
> I am trying to write a Delphi code (Delphi 2010) to print a rave report from the access database; I am using RVSystemprint method; q1 is a query name.
> I get error message " q1: dataset not in edit or insert mode", at the line: while not q1.Eof.
> Even though I added q1.Edit or q1.insert, it doesn't work.  Database's readonly property is FALSE.
> What is missing in the code? Thanks.
> 
> procedure TForm1.rsysPrint(Sender: TObject);
> begin
> with Sender as TBaseReport do begin
> ....
> q1.Open;
>     q1.Edit;
>      q1.first;
>     while not q1.Eof do begin
>      ...
>     end;
> ...
> 
> End;
0
Shobha
7/30/2010 3:46:26 PM
> {quote:title=Shobha Choudhari wrote:}{quote}
> I replaced ADOQuery with ADODataset and everything worked.
> 
> 
> > {quote:title=Shobha Choudhari wrote:}{quote}
> > I am trying to write a Delphi code (Delphi 2010) to print a rave report from the access database; I am using RVSystemprint method; q1 is a query name.
> > I get error message " q1: dataset not in edit or insert mode", at the line: while not q1.Eof.
> > Even though I added q1.Edit or q1.insert, it doesn't work.  Database's readonly property is FALSE.
> > What is missing in the code? Thanks.
> > 
> > procedure TForm1.rsysPrint(Sender: TObject);
> > begin
> > with Sender as TBaseReport do begin
> > ....
> > q1.Open;
> >     q1.Edit;
> >      q1.first;
> >     while not q1.Eof do begin
> >      ...
> >     end;
> > ...
> > 
> > End;

I did not see a q1.close; That might have something to do with it.

George
0
George
7/30/2010 8:19:10 PM
Reply:

Similar Artilces:

"Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of Reporting Services
Hi My project is in .NET 2003 i.e. framework 1.1 and database in SQLServer 2000. But the reports have been developed using SQLServer 2005 Reporting Services. Now when I am trying to deploy them through deployment project of .NET its giving me following error:"Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of Reporting Services.  Now I am really confused with this. Can any one please guide me regarding this ASAP. Thanks, Falguni    You will need to use the SQL Server ...

Convert my reports from "Active Reports" to "Crystal Reports"
Hello, I discovered data dynamics active reports product a year ago while I was starting a new asp.net project and decided to use it as the reporting tool, it's a very nice product and have a lot of advantages over many other products in the market. However...I also discovered that although they clearly declare that they support Right To Left languages, they have a BIG issue when using Right To Left languages in ASP.NET.I've been writing them posts about this problem and asking when they are going to fix it for 8 months, and yet they did not give me an estimate time frame for fixing this i...

How can I make a report with "Chart" on it by using "Rave Report"?
Dear All: How can I make a report with "Chart" on it by using "Rave Report"? Just like we did with "TQRChart" in "QuickReport". Thanks, Michael ...

Delphi XE HTTP: error "Socket Error #10054 Connection reset by peer" [Edit]
Communication type is set to HTTP, LifeCycle is set to Invocation. Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle? Hi Irina, > Communication type is set to HTTP, LifeCycle is set to Invocation. > > Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other proper...

"Resolved in Build" when QC report has status "Resolved" [Edit]
Hi all, my question is to know the "Resolved in Build" value when QC report status has been marked as "Resolved" For an example of this, look here -> http://qc.embarcadero.com/wc/qcmain.aspx?d=121986 Note that the question has already been posted in QC here -> http://qc.embarcadero.com/wc/qcmain.aspx?d=83341, but without response If the answer would be "in the next release", then my question can be "how to know when the next release will be published?" Thanks for your help Didier Didier Cabalé wrote: > my question is to know the ...

ANN: Delphi HTML Reports preview
Very simple to use - buid complex reports in 10 minutes. All you need to know - SQL, HTML, CSS. Use all power of HTML4 and CSS3 in any part of report. Features: Barcodes Multiline headers Groups Cross-tabs (any level) Transformations (cross-tab with range) Pictures (+from database) Master/Detail (any level) Supports all databases and db-libraries (writing adapter for any db-acess library takes only 5 minutes) Standalone reports - no need for delphi forms/datasets. 100% native Delhi code. All Delphi versions - from Delphi 6 to XE6 (VCL). 32/64 bit. Supports Unicode for...

"Edit" Vs"Edit Mask"
Are there any potential problems changing a datawindow date field from "edit" to "edit style" and vice versa? I have over 100 datawindows and who knows how many of them have date fields. Question is if I change the edit style from "Edit" to "Edit Mask" of dd/mmm/yyyy. Will this cause any kind of problems? TIA Well we changed ours from editmask to edit (partly because of the large numbers of bugs in edit masks in early builds of PB7, partly because our customers found editmasks unfriendly to use) and it didn't cause any problems. So hopefully changing in the other direction shouldn't give you any problems either - (caveat): though it depends on your code to some extent ;-) -- Simon Caldwell Get Real Systems Ltd Holtby Manor, Stamford Bridge Road, York, YO19 5LL Tel 01904 481999 Fax 01904 481666 Visit us at www.getrealsystems.com Specialists in e-Procurement and supply chain technology <Anonymous@sybase.com> wrote in message news:EE61AD5B3AF131A200778E3B852569A7.00778E48852569A7@webforums... > Are there any potential problems changing a datawindow date field from > "edit" to "edit style" and vice versa? > > I have over 100 datawindows and who knows how many of them have date > fields. Question is if I change the edit style from "Edit" to "Edit Mask" > of dd/mmm/yyyy. Will this cause any kind of problems? > > TIA ...

DataControlRowState is "Edit" or "Alternate, Edit"
In the Gridview RowDataBound event, I check for the state of the row to cast some controls and manipulate with them:Protected Sub gvAutori_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then            If e.Row.RowState = DataControlRowState.Normal Or e.Row.RowState = DataControlRowState.Alternate Then             ...            ElseIf e.Row.RowStat...

What is with the " [Edit] [Edit] [Edit]" posts?
Don't know where I should post this, hopefully a short thread here is okay. But, at least with my newsreader, Agent 6, longer threads tend to get broken into pieces, with "[Edit]" attached to the topic name. And sometimes longer threads then get [Edit] [Edit] and then [Edit] [Edit] [Edit] For example, here is a current thread: FastMM 4.96 available [Edit] [Edit] [Edit] How does this happen? Can I make them show up as one thread? Paul Doland wrote: > Don't know where I should post this, hopefully a short thread here is > okay. But, at least with my...

[Delphi XE2] "Search projects" missing in "Add to Project" dialog box [Edit]
"Search projects" missing in "Add to Project" dialog box when using windows classic theme (windows 7 64bits). Notepad on the contrary still have the "Seacrh ..." box in its open file dialog. Check the images below(they are not mine but show the issue) This one does have the "search document" box in the upper right corner. http://img98.imageshack.us/img98/9518/dialog2.png This one does not have it. http://img291.imageshack.us/img291/4793/dialogl.png Any help on this matter will be greatly appreciated. ...

ADOQuery "Dataset not in edit or insert mode" when higher lev query inserts
I have a series of ADOQueries which all have their Data Sources linked to the query "above" them. So changing what I am viewing in my highest level query will cascade down and display multiple levels of data. The problem I am having now is that when I try to perform an insert on my top level Query (using the DBNavigator component) the Query right below it gives the error: "ADOQuery2: Dataset not in edit or insert mode". It throws this error twice and then proceeds to let me enter new information in all queries. So basically, it does what I want, it just throws up an...

How do I set a home page. Traffic Swarm says just click "edit" then "preferences," but there is no "preferences," under "edit."
Name: Theodore Pong Email: theodorepongatyahoodotcom Product: Firefox Summary: How do I set a home page. Traffic Swarm says just click "edit" then "preferences," but there is no "preferences," under "edit." Comments: How do I set a home page. Traffic Swarm says just click "edit" then "preferences," but there is no "preferences," under "edit." Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 From URL: http://hendrix.mozilla.org/ ...

How to create a Delphi 7 ADO "LIVE" (auto update) query to SQL Server [Edit]
How to create a Delphi 7 ADO "LIVE" query (one SQL Server table only) that once a table field is edited - the underlying query results are updated. Kind of like the "LIVE" query concept from the BDE etc. Below is the ADO query that I am using and it generally *seems* to work well where once a field is edited (via TADOQuery.Edit, .Post etc), the query result are also changed. I think it is true that after an edit the change is always visible in the same program using the same query object. {code}procedure ExecuteQryTable( Connection: TADOConnection; Qry: TADOQuery; Sql: string; Params: Variant; OpenQuery: Boolean ); begin assert( Connection <> nil); assert( Qry <> nil); assert( Sql <> ''); if Qry.Active then Qry.Close; Qry.Filtered := False; Qry.Filter := ''; Qry.SQL.Text := Sql; AddParametersToQry(Connection, qry, Params); Qry.Connection := Connection; //qry.CursorLocation := clUseClient; // Default Qry.CursorType := ctDynamic; // Dynamic cursor: data modifications, deletions, and insertions by other users are visible; scrolling forward and back allowed. Qry.LockType := ltOptimistic; // Optimistic locks: locked are initiated on a record-by-record basis, but only when updates are applied and a record is being updated. if OpenQuery then Qry.Open; end; {code} However, I am ...

Open QC 43964 "Edit this report" in webclient does not handle double quotes correctly
You should consider to open this report Report No: 43964 Status: Reported "Edit this report" in webclient does not handle double quotes correctly http://qc.codegear.com/wc/qcmain.aspx?d=43964 This report has still 22 votes. I haven't votes for it yet, because I don't use the webclient anymore, but if I would vote it could easily have 42 votes. I can't try if this has already been fixed, because I can't selected the "Test project". The link is http://qc.codegear.com/wc/qcmain.aspx?da=24009 and I get an exception. -- Uwe Hello, ...

"Query Engine Error...." in reports
Hi I am facing a problem with Crystal Reports which shows 'Query Engine Error....'. I have developed several reports and these were working properly in our previous version of custom solution. But currently when I am trying to run the same reports in our latest version of solution it is giving following error message "Query Engine Error: C:\WINNT\TEMP\temp_989a307b_0a11_4864_a197_8f570972ff50.rpt". This message is shown for all the reorts only the rpt file getting changed. I have developed these reports in Crystal Reports 9.1.3300.0 which comes with .NET. I had this same erro...

Change from Edit Style "Edit" till "DropDownDW" at runtime
Is it possible to change the edit style from "Edit" till "DropDownDW" at runtime? I want a DropDownDataWindow to appear when in query-mode only. How do I do it ? Thanks for any help! Turid Have you tried to use the Modify command? I didn't look up the syntax for this but it would be something like : dw_1.Modify("column_name.dddw.Name='d_list'") dw_1.Modify("colun_name.dddw.DataColumn='list_id'") You will need to GetChild() on "column_name" to retrieve the list but I'm sure you get the idea. HTH Turi...

"Entity Attribute" List Report
This is a multi-part message in MIME format. ---=_forums-1-dub4d25ff13 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit RE: PD 15.2.0.3060 EBF1 For an "Entity Attribute" List Report, we can report that an attribute is a Primary Identifier and a Foreign Identifier. How do I report that an attribute is an "Alternate Identifier", i.e. marked as "<ai>" in a diagram? I've attached a screen snapshot of the List Report Wizard. Thank you in advance for your assistance. -- Peter ---=_forums-1-dub4d...

Crsytal report error"Load Report Fail"
i have face this error "Load Report Fail" when open the report. but my report is work for a few month already, sunddenly my report cant show at today. Then the above of my report will show "Load Report Fail ". Please advice me. Try to verify database on report, sometime report lost connection to database, maybe this is a reason my connection is not problem. moreover this report is already upload into server by a few month past. Just sunddenly all the user cant load the report succesfully. i dont know where is the problem come from? is it got related to the windows update? but i already check the server temp folder is already full shared (include write and read permission).  Finish solve by restart IIS. I'm having the same issue and restarting the World Wide Web Publishing Service does fix the problem. But it's not a great solution for a production server. My customers can access the reports for weeks then this problem rears it's ugly head. So it's not permissions on the c:\windows\temp directory. Has anyone else found a solution for this?I did find that the report object was getting set to nothing in the finally block so I changed it to:If objReport IsNot Nothing Then    objReport.Close()    objReport.Dispose()    objReport = Nothing    System.GC.Collect()End If (Please MARK this post as ANSWERED, if you find it helpful)...

Report synchronization status reports, error: "-633"
--____RFZDUBLRLPUZMSROMHBQ____ Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; modification-date="Wed, 29 Aug 2006 06:02:59 -0500" Recently had two drives that began to go bad in our Master of the root = partition. Got replacement drives and rebuilt them. Recently tried to = run an unattended full repair, but it could not run do to lack of space on = sys. We added more space from the pool to the sys volume, but since then, = we're having login problems at various locations that map to this ser...

Getting Error [BRCC32 Error] "brcc32" exited with code -1073741819. [Edit]
I have installed RAD Studio XE2 and when in run simple program(e.g "Hello World") i am getting error like: Checking project dependencies... Compiling Project1.dproj (Debug, Win32) brcc32 command line for "Project1.vrc" c:\program files\embarcadero\rad studio\9.0\bin\cgrc.exe -c65001 Project1.vrc -foProject1.res [BRCC32 Error] "brcc32" exited with code -1073741819. Failed Elapsed time: 00:00:01.9 My prject _>optiin setting is • Project->option->Resource complier (we have two option) o Borland resource Compiler(brcc32.exe)"(I think ma...

Crystal Report give error "Load Report Failed"
Helloi in my Project I m using Crystal report,My Crystal report is Export in PDFi Have 150 fileapplication is first file export in pdf,then second file export pdf,in same say may be 30-40 file export in pdfbut after they give error load report faild, why this error will come.for run that application agian i have closed my VS and start again applicationwhy this will happen?  Nothing is really over,untill the moment stop trying for it...Amitsp(MCTS,MCP)sqlreporting.blogspot.com...

Change to "Report" for Reports
I am trying to change the first page of a report "REPORT" to something else e.g. Entity Attribute Description Report. How do you do this ? I have read the manual but cannot figure it out. Walt In the Report Editor, select the Report menu and then select the "Title Page" menu item. You can now change the title. This is documented in the Report User's Guide on page 91 in the 7.5 guide and page 90 in the 7.0 guide. HTH, Anthony Hill PowerDesigner Product Support On Wed, 18 Oct 2000 09:37:48 -0400, walt@lehman.com wrote: >I am trying to chan...

Detecting the "Update" button was pressed in a detailsview "Edit Mode"
I have a detailsview that has editing turned on.  So, of course when the user clicks edit, the buttons displayed are are changed to "Update" and "Cancel".   I need to perform additional steps once the update is sent. For instance, I'm going to have it email out changes on top of updating the database.  How do I detect in my code behind that this particular button was pressed.  I've done several searches for a solution here and elsewhere, but nothing seems to come up to explaine what I'm looking for.  So, if anyone can point me in ...

Having problems with the Delphi "Custom Styles" or skins [Edit]
I started a new app in Delphi XE2. I added a TStaticText which was tall enough to show 4 lines of text. Then I added a TLabel. Depending on what the user does, the TLabel can display Yes or *No* where 'No' is bolded and red in color. When I apply any skin at all, the TStaticText no longer word wraps (which is not a property I can set or override). It only shows one line of text and the other three dissapear off to the right. When I apply my skin, the TLabel still allows bolding, but my font color does not work. A skin should only override system colors like clBtnFace. It sh...

Web resources about - Error: "Query: dataset not in Edit mode": in delphi code for Rave Report [Edit] - embarcadero.delphi.reporting

Resources last updated: 3/9/2016 11:15:33 AM