bb.donnay-software.com

Donnay Software Web Forums
It is currently Wed Aug 12, 2020 2:02 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: ADS SQL problem
PostPosted: Mon Jun 08, 2020 3:55 am 
Offline

Joined: Thu Mar 28, 2019 4:41 am
Posts: 6
I have tested Donay's Datadict.prg using ADS SQL with eXpress++ and everything is ok...
I was modify BROWSE object for Editing ceels:

@ 1,0 DCBROWSE oBrowse ALIAS cAlias SIZE 100, 20 ;
EDIT xbeBRW_ItemSelected; ;//added;
PRESENTATION DC_BrowPres() ;
FONT '9.Lucida Console'

I found a problem

For SQL commands: SELECT * FROM CUSTOMER .... ORDER BY.... WHERE... etc. everything is ok... I can Edit ceels

For SQL commands which contains: LIKE .... filtering is ok, but I can't Edit ceels... I'm getting a message:
Record has been locked by another user. Retry?

What is problem?


Attachments:
Screenshot_1.png
Screenshot_1.png [ 81.78 KiB | Viewed 914 times ]
Screenshot_2.png
Screenshot_2.png [ 112.84 KiB | Viewed 914 times ]
Screenshot_3.png
Screenshot_3.png [ 213.25 KiB | Viewed 914 times ]
Top
 Profile  
 
 Post subject: Re: ADS SQL problem
PostPosted: Wed Jun 10, 2020 12:46 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
This is because the LIKE clause may return a STATIC cursor, which is not writable.

Which version of eXpress++ are you using?
The most current version has a utility called SqlQuery.
It is much advanced over that little utility you are using and can give some more info.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
 Post subject: Re: ADS SQL problem
PostPosted: Fri Jun 12, 2020 12:56 pm 
Offline

Joined: Thu Mar 28, 2019 4:41 am
Posts: 6
Hi Roger,

I looked your utility SqlQuery... It is very nice but as you say: "I'm too old to learn how to fly a plane".
I want something simpler... I want to add only a few line of SQL code for resolving proglems of SET FILTER TO.... (in large database) or SEARCH large database....
Dbseek() working very fast but you must have an index.... SQL comands for example: SELECT * FROM xxxx WHERE yyy LIKE '%abc%' is simply beter...
I don't want much to change my code...

I am using Express++ ver. 266

Best regards,


Top
 Profile  
 
 Post subject: Re: ADS SQL problem
PostPosted: Mon Jun 15, 2020 6:39 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
I will look into this and see if I can find a solution for you.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
 Post subject: Re: ADS SQL problem
PostPosted: Mon Jun 15, 2020 9:33 am 
Offline

Joined: Thu Mar 28, 2019 4:41 am
Posts: 6
Thanks advance


Top
 Profile  
 
 Post subject: Re: ADS SQL problem
PostPosted: Mon Jun 15, 2020 12:46 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
When I looked in my code to see how I did updates in SQLQuery, I remembered that I had to use a SQL UPDATE whenever I had a static cursor, therefore it WAS possible to do a record update.

In order to do this, however, I always edited a RECORD OBJECT, rather than trying to edit the record directly.

When you edit a record object, you are only editing what is in memory, and then writing out the object to the database using DC_DbGather().

If you are trying to do cell-editing, then that will not be possible.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
 Post subject: Re: ADS SQL problem
PostPosted: Mon Jun 15, 2020 1:37 pm 
Offline

Joined: Thu Mar 28, 2019 4:41 am
Posts: 6
Ok Roger,thank you very much for your explain...

Lots of greetings and health :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group