Solved

Operation must use an updateable query

Posted on 2003-11-25
14
361 Views
Last Modified: 2010-05-03
dear all,
can anyone tell me why every time after i open any report then my ado  become read only mode..

top urgent!!!

my report procedure:

  With CrsRpt
      .ReportFileName = App.Path & "\Report\1.rpt"
      .PrintFileODBCSource = GV_ODBC$
      .PrintFileODBCTable = "mytablename"
      .ParameterFields(0) = "CompanyName;" & GV_COMP$ & ";true"
      .ParameterFields(1) = "UserName;" & GV_USER$ & ";true"
      .Action = 1
end with

after report showing .. all my adodc.recordset become not updateable
eg:
  adodc1.recordset.update

not only my adodc...
i cant even create new database
eg:\
    dba.Execute "Select * into [Temp_table] from " & tblname
   
   runtime error '3027'
cannot update. database or object is read only


thanks
0
Comment
Question by:delphikit
  • 6
  • 3
  • 2
  • +1
14 Comments
 
LVL 1

Expert Comment

by:anaadoul
ID: 9816408
i'v run into this trouble before but in ASP
it was solved by the folloing


right click on the database
click the security tab

make it everyone full control


hope it works

---------------------------------
There Are 10 Kind OF People
Those Who Understands Binary AND Those Who Don't
0
 

Author Comment

by:delphikit
ID: 9816498
hi anaadoul,
thanks for reply...

i am using DBF table...and Crystal report 8.5 with VB6
0
 
LVL 18

Expert Comment

by:Sethi
ID: 9816532
This is because you are passing the name of the table as record source to the report and the report is holding the table and would not allow and editing options on that table. There are two ways to workaround this problem:
1. Use recordset as a source to the report
2. Set the report variable to nothing before making any changes to the respective table.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:delphikit
ID: 9816554
dear Sethi,
i cannt understand your anwser...
can u give me some example...


thanks
0
 

Author Comment

by:delphikit
ID: 9816610
dear all,
my ODBC connect was

z$ = "ODBC;DATABASE=" & GV_ODBC$ & ";UID="";PWD="";DSN=" & GV_ODBC$

GV_ODBC is DSN name

dont know why ,... after opening report... all my table locked...

0
 
LVL 18

Expert Comment

by:Sethi
ID: 9816624
What Reporting tool and Database are you using and are you comfortable with ADO?
0
 

Author Comment

by:delphikit
ID: 9816648
dear all,
i'm using crystalReport compoment, and DBF table,....
i am do updating, insert and delete mode with Ado b4 i open any report...
but once i open report, all the DBF table locked...

using crystalReport 8.5

thanks
0
 
LVL 18

Expert Comment

by:Sethi
ID: 9816814
Sorry, no idea about DBF. I assumed Access as your backend
0
 

Author Comment

by:delphikit
ID: 9817606
dear all,
anyone can slove my problem? top urgent
i willing to give more points

thanks

0
 
LVL 1

Expert Comment

by:anaadoul
ID: 9817834
what happens after you close the report is the table still locked?


---------------------------------
There Are 10 Kind OF People
Those Who Understands Binary AND Those Who Don't
0
 

Author Comment

by:delphikit
ID: 9856800
dear all
thanks for everything..

problem solved... cos of ODBC driver
  before =  "driver of Microsoft dbase (*.dbf)

should use "Microsoft FoxPro VFP driver (*.dbf)

0
 

Accepted Solution

by:
amp072397 earned 0 total points
ID: 10618785
PAQed, with points refunded (250)

Thanks very much!
amp, ee admin, amp*at*experts-exchange.com
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

810 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