Page 1 of 2

WebClientAPI

Posted: Tue Oct 22, 2019 12:47 am
by daongochoanganh
Hi Simon,

I'm reading the code from the WebClientAPI and see that the code is to update the .DB file
I want to understand how we can ask the Simulator to use the .DB files for loading the Roster & the Lines?

Thanks a lot

Re: WebClientAPI

Posted: Tue Oct 22, 2019 9:51 am
by SimonT
There.

You either do it manually by download the .DB file in your input folder OR you do it automatically by selecting the "Load SQLite Database from Website before Loading Lines Files" option and making sure your Website URL is correct in the output option.

Re: WebClientAPI

Posted: Tue Oct 22, 2019 8:49 pm
by daongochoanganh
Hi Simon,

Let me rephrase if I understand it’s correctly or not.
1. After simulation the DB at the Output folder
2. Assume that copy .DB file to the Input folder & point point the API to this .DB
3. When I simulate, the lines change will be effected after I simulate & we repeat the step 1.

Thanks Simon

Re: WebClientAPI

Posted: Wed Oct 23, 2019 1:04 pm
by SimonT
1. After simulation the DB at the Output folder, upload on your web server
2. Before your next simulation, download an copy of .DB from your web server to the Input folder.
3. When the Load Lines function will run, either manually using the Run the "Auto Load Lines" from the menu or right before simulation if you have the option selected in the STHS, the change in the DB will be process.

Re: WebClientAPI

Posted: Wed Oct 23, 2019 8:24 pm
by daongochoanganh
Hi Simon,
Thank you so much :)

Re: WebClientAPI

Posted: Mon Jan 13, 2020 9:23 pm
by daongochoanganh
Hi Simon,
I did try to follow the steps.
1. I change lines and save to .DB file (I use sql to check again and see data updated correctly in TeamFarmLines, TeamFarmLinesNumberOnly
2. I put the this file in the Input Folder, and run the "Auto Load Lines" - > The notification = Load & Process League DB File
3. However, when I open the Team Lines I use to test. There is no updated at all

Can I check with you if I missed any step.
TQ

Re: WebClientAPI

Posted: Tue Jan 14, 2020 7:21 pm
by SimonT
You modify the .DB how? If you modify directly, you need to a change the value WebClientModify to True also for the STHS to process it.

Re: WebClientAPI

Posted: Wed Jan 15, 2020 12:26 am
by daongochoanganh
Hi Simon,

Thanks for the instruction.

I did modify the code to update WebClientModify to True in TeamFarmLinesNumberOnly & TeamProLinesNumberOnly.

For TeamFarmLines & TeamProLines. There is no field of WebClientModify.

I did double check in .DB file and it was updated. When I do the Auto Load Lines. The function is not working.

Seeking for your support.

Thanks

Re: WebClientAPI

Posted: Wed Jan 15, 2020 10:20 am
by SimonT
Well, are you sure you are loading the DB correctly? Can you try it with the manuel command "Process Database".

Re: WebClientAPI

Posted: Thu Jan 16, 2020 8:52 pm
by daongochoanganh
Hi Simon,

Thanks a lot for your response but still even I run that command, they said processed successfully but still I can not see the change when I try to open the file again.

I will put the details to see if I missing anything.
1. CEO simulate & output the .DB file
2. I use this .DB file and upload the location to point the WebClient to:
3. I use WebClient to update the Line15vs5ForwardTime from 35 to 33 (new value) and increase Line2 by 2 so make sure it's 100
4. I click save, I get a copy of this .DB and run the SQL to see if data updated correct or not (It's correct & the Flag WebClientUpdate is True)
5. I put this new updated .DB file in the Input folder which is config in the Simulator
6. I cluck Simulate > Auto Load Lines (or run the command) --> Its success
7. I go back to the Tean Line and see, the Line15vs5ForwardTime value still 35.

So the DB was updated correctly but by some reason the loading is not effective.
Is there anything I'm missing here :(

Best Regards

Re: WebClientAPI

Posted: Fri Jan 17, 2020 9:28 am
by SimonT
Give me your website URL please.

Re: WebClientAPI

Posted: Mon Jan 20, 2020 1:02 am
by daongochoanganh
Hi Simon,

Please find below for the link that we are testing now, I remove the password verification step so that the change can be made directly to the DB

WebClient Link:
http://www.lhdgv.ca/WebClientIndex.php

DB Link:
http://www.lhdgv.ca/STHS.db
--> This is the DB file after change I use to put into Input Folder.

Thank you for your help.
BR

Re: WebClientAPI

Posted: Mon Jan 20, 2020 6:12 pm
by SimonT
Why are you changing the DB file name? You shouldn't change it's name. That probably why it doesn't work when loading, it doesn't load because it doesn't look for the correct name.

Re: WebClientAPI

Posted: Tue Jan 21, 2020 12:08 am
by daongochoanganh
Hi Simon,

I changed the name to test.
I did keep the name as the output as: LHDGV2020-SEASON.DB now but still not working (even the data insides the DB updated correctly through the client with flag WebClientModified = True

Can you help to look into this?
Is there any option in the client I need to change?

Thanks Simon

Re: WebClientAPI

Posted: Tue Jan 21, 2020 8:56 am
by SimonT
The file should be "LHDGV2020-STHS.db". Did you keep changing the name around?

When you "click Simulate > Auto Load Lines (or run the command)". Do should see the message "Load and Process SQLite Database complete." when the DB is load correctly in the STHS.