![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General Discussion » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Tue, Jul 8 2014 10:37 PM | Permanent Link |
Michael Riley ZilchWorks | I get an Error #1000 trying to update the Databases Table path in the
DataModule OnCreate event. Here is the exact error message: ElevateDB Error #1000 An error occurred with the cursor Databases (An attempt was made to update a read-only cursor) How do I get this UPDATE statement to work? *DFM* object ConfigurationQuery: TEDBQuery DatabaseName = 'Configuration' SessionName = 'CCMath' SQL.Strings = ( '') Params = <> Left = 360 Top = 32 end procedure TdmCCMath.DataModuleCreate(Sender: TObject); begin CCMathEngine.Active := True; CCMathSession.Connected := True; { TODO : Update configuration databases table set path = CSIDL_COMMON_APPDATA +'\Data' } with ConfigurationQuery do begin SQL.Text:='UPDATE Databases SET PATH = ''' + CCMathEngine.ConfigPath + '\Data'''; ExecSQL; end; end; -- Michael Riley GySgt USMC (Ret) www.zilchworks.com |
Wed, Jul 9 2014 4:03 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Michael
Assuming that you haven't deliberately set things up to be read only I'd guess that when you copied the stuff from CD god ol Windows has decided that since a CD is read only it will preserve that property on the copied files. You'll need to edit the properties in Explorer and set them back to non-read only. Roy Lambert |
Wed, Jul 9 2014 5:21 AM | Permanent Link |
Michael Riley ZilchWorks | Solved.
I needed to used the ALTER DATABASE command instead. procedure TdmCCMath.DataModuleCreate(Sender: TObject); begin CCMathEngine.Active := True; CCMathSession.Connected := True; with ConfigurationQuery do begin SQL.Text:='ALTER DATABASE "CCMath" PATH ''' + CCMathEngine.ConfigPath + '\Data'''; ExecSQL; end; end; http://www.elevatesoft.com/supportfaq?action=view&category=edb&question=change_database_path http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=ALTER_DATABASE -- Michael Riley GySgt USMC (Ret) www.zilchworks.com |
Wed, Jul 9 2014 5:29 AM | Permanent Link |
Michael Riley ZilchWorks | Roy Lambert wrote:
> Michael > > > Assuming that you haven't deliberately set things up to be read only I'd guess that when you copied the stuff from CD god ol Windows has decided that since a CD is read only it will preserve that property on the copied files. > > You'll need to edit the properties in Explorer and set them back to non-read only. > > Roy Lambert Roy< I needed to used the ALTER DATABASE command instead. procedure TdmCCMath.DataModuleCreate(Sender: TObject); begin CCMathEngine.Active := True; CCMathSession.Connected := True; with ConfigurationQuery do begin SQL.Text:='ALTER DATABASE "CCMath" PATH ''' + CCMathEngine.ConfigPath + '\Data'''; ExecSQL; end; end; http://www.elevatesoft.com/supportfaq?action=view&category=edb&question=change_database_path http://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=ALTER_DATABASE -- Michael Riley GySgt USMC (Ret) www.zilchworks.com |
Wed, Jul 9 2014 5:53 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Michael
That advice was based on not reading your post properly ![]() I shall give myself 3 house demerits Roy Lambert |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |