Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 26 total
Thread Help with basic
Mon, Feb 29 2016 7:18 AMPermanent Link

Riaz

Hi,

please could someone guide me how to update a dbsiam database

i have attached what i have done so far, click button 1 to populate the grid, that works

click update and i am trying to change only 1 field, but get error

Thank you
Riaz



Attachments: menutest.zip
Mon, Feb 29 2016 11:27 PMPermanent Link

Bruno Larochelle

Riaz.. looks like you forgot to include your source file (*.wbs) and form file (*.wbf) for us to look at.



Riaz wrote:

Hi,

please could someone guide me how to update a dbsiam database

i have attached what i have done so far, click button 1 to populate the grid, that works

click update and i am trying to change only 1 field, but get error

Thank you
Riaz

Bruno Larochelle
Logiciels Bitwise Software
Edmonton, AB, Canada
Tue, Mar 1 2016 6:05 AMPermanent Link

Riaz

Bruno Larochelle wrote:

Riaz.. looks like you forgot to include your source file (*.wbs) and form file (*.wbf) for us to look at.

Sorry Bruno, correct files attached now



Attachments: menutest.zip
Tue, Mar 1 2016 10:24 AMPermanent Link

Bruno Larochelle

hi Riaz

I played with this a bit.

Questions/comments

1. How did you add the TDataset to your project? Did you use the '+' on the Dataset manager? That's how I do it. Then I drag'n'drop that dataset on to the form.

2. When you deploy to the 'real' server (and I presume you are running an 'ewbsrvr'), then the configuration you did in the EWB IDE needs to be replicated on the EWB server.

3. I did not see any errors in your code. I ran it, it loaded properly, but the updates, as you reported, gave an error. I **think** that is because your server dataset is not properly configured (step 2 above).

Keep at it, once you get the plumbing right.. you will be amazed and pleased!

.. Bruno


Riaz wrote:

Bruno Larochelle wrote:

Riaz.. looks like you forgot to include your source file (*.wbs) and form file (*.wbf) for us to look at.

Sorry Bruno, correct files attached now

Bruno Larochelle
Logiciels Bitwise Software
Edmonton, AB, Canada
Tue, Mar 1 2016 10:32 AMPermanent Link

Riaz

Hi Bruno,

Thank you for your reply

here is the link http://epos2go.com/butts.html

i think its problem with ewbsrvr  loads ok, but updating, saving error

thank you,
Riaz
Tue, Mar 1 2016 10:48 AMPermanent Link

Bruno Larochelle

hi Riaz

1. I see it is loading properly. I guess that means the settings on the 'ewbsrvr' must be correct. Yet you get the error.

2. This is how I configure my dbisam DBs.. . A .. I set up a copy of my DB on my local development machine. I configure the DBs 'locally', and their location is the exact same location as on the eventual server. (example : c:\mydata\myproject\data\ .. on both my dev machine and my server). B .. I configure the datasets in the IDE. And I do exactly the same thing on the server. (if you dev machine and your server are one and the same.. then there is a button on the server GUI to copy it directly.. saves typing)

3. I do not have to set the URL of the datasets (as you were doing), as it defaults to the base URL where my web content is served (by the ewbsrvr).

I suspect you are doing 'remote' configurations of the DBs. And it appears you can do that, but I have eventually avoided doing that because I would get errors.. not unlike yours.

Hopefully someone else can shine some light! Smile

.. Bruno

/////////////////////////////////


Riaz wrote:

Hi Bruno,

Thank you for your reply

here is the link http://epos2go.com/butts.html

i think its problem with ewbsrvr  loads ok, but updating, saving error

thank you,
Riaz

Bruno Larochelle
Logiciels Bitwise Software
Edmonton, AB, Canada
Tue, Mar 1 2016 11:28 AMPermanent Link

Riaz

Bruno ,

Thank you for time and effort into helping me

regards,
Riaz
Tue, Mar 1 2016 11:30 AMPermanent Link

Raul

Team Elevate Team Elevate

On 3/1/2016 6:05 AM, Riaz wrote:
> Sorry Bruno, correct files attached now

Hi,

I have not had a chance to run this but looking at your code i would
suggest moving the "Database.StartTransaction;" after your do the record
search.

Dataset find causes the dataset to be put into special search mode and
new row gets added so i think this might interact with the transaction.

Something like this :


procedure TForm1.Button3Click(Sender: TObject);
begin
    try
      with mybutts do
      begin
      Columns['ID'].SortDirection:=sdAscending;
      SortCaseInsensitive:=True;
      Sort;
      InitFind;
      Columns['ID'].AsInteger:=1;
      if Find(False,True) then
         begin
     Database.StartTransaction;
   
         mybutts.Update;
         mybutts.Columns['butt_cap1'].Asstring := 'Riaz';
         mybutts.Save;
         end;
      end;
      Database.Commit;
      except
      Database.Rollback;
      raise;
   end;
end;



Raul
Tue, Mar 1 2016 11:37 AMPermanent Link

Riaz

Hi Raul,

thank you for your reply

i thin the error is this

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://epos4u.4irc.com:6005/datasets?method=commit. (Reason: CORS header 'Access-Control-Allow-Origin' does not match 'null, null').

Riaz
Tue, Mar 1 2016 12:07 PMPermanent Link

Raul

Team Elevate Team Elevate

On 3/1/2016 11:37 AM, Riaz wrote:
> Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://epos4u.4irc.com:6005/datasets?method=commit. (Reason: CORS header 'Access-Control-Allow-Origin' does not match 'null, null').

Riaz,

How are you hosting your EWB application exactly?

This error seems to indicate that you are serving your EWB application
from different web server than your data.

Either host it from the same web server or if you are using the Elevate
Web Builder Web server for data then enable the "Enable Cross-Origin
Resource Sharing" on the "content" tab of the EWB-Web Server

Raul
Page 1 of 3Next Page »
Jump to Page:  1 2 3
Image