NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - KC Chin

Pages: [1] 2
1
Bruce,

Thank you.  Now I can start trying to figure which embed to do some coding.

2
Bruce,

How about sync based on the "everythingafter" = certain date+time, instead of -1 (Force ...All data)?

3
How to exclude all documentations for Examples and Help routine from all the syncTables?

By removing those, the generated source code will be reduce by 550%

Only want to do the Data Synchronization for Disconnect App, Server and Client.

4
additional notes

1. Using Firebird SQL 3
2. further investigation regarding the timestamp, the ts and sts
- netSync.clw
- the NetWebSyncClient.GetMaxStsSQL is using Select Max

if any computer/PC clock that its "date+time" is less that the max when Insert records to the server, the ClientDisconnect Sync will not fetch those records.

Only "Force Fetch All Data" where the "everythingafter=-1" can get those record inserts.

Is there any other method to prevent the "sts" different especially the PC clock is not synchronize with the Internet Time?
Why? because not all computer is have the access to internet.
Why again? too many idiot cannot see the very large font date and time that display on the monitor when they login.

Regards,
KC Chin

5
C11 ABC, NTApp ver11.31

After debugging for past 3 days.
Finally....

A. Server disconnect, the Server's computer clock

B. Local LAN PC clock (App.exe access the "A" server database)
Both A and B on same LAN

C. Client disconnect, the Local PC clock (from different department)

Both A and B clock is off by 3 minutes.
Example:
A=10:33:00am and B=10:30:10am C=10:32:50am

When "B" insert a new record to the server database, the ts and sts stored 10:30:10am

When "C", start to Sync with the "A" Server, the Server Log "everythingafter" show example 158579xxx like 10:33:00am.

The "C", cannot fetch any record that "B" had inserted at 10:30:10am

After changed the "B" computer to clock to match the "A" clock, everything work out, ok.

If I don't change the "B" PC clock, and do "Force Fetch All Data" or "Force Send All Data", every records will synchronize because, "C" will send "everythingafter" = -1

Is there a way to prevent the situation where ts, sts, and dts date+time is behind the server clock?

Regards,

KC Chin

6
Web Server - Ask For Help / Re: NetTalk extension template - NetDip Class
« on: January 08, 2019, 01:06:41 AM »
Bruce,
Thank you and appreciated.

7
Web Server - Ask For Help / NetTalk extension template - NetDip Class
« on: January 02, 2019, 08:34:15 PM »
NetTalk.tpl
      #Boxed,Where(%ABCBaseClass='NetDIP'),at(2,20),section
        #Prompt('&Room Name',@s255),%RoomName,Default('myRoom'),Req
        #Display('This will be the room added and used on the server.')
        #prompt('Server &Address:',@s80),%NetAppSite,default('''dip.capesoft.com''')
        #display('You can use the free DIP server at ''dip.capesoft.com''')
        #display('Or you can also run your own DIP Server')
        #prompt('Server &Port (def 6873)',@n9),%NetAppPort,default(6873)
        #display('This is the site address and port of the DIP server.')

Hi Bruce,
Instead I modify the template,

Is  it possible for Capesoft to change the
        #prompt('Server &Port (def 6873)',@n9),%NetAppPort,default(6873)
to STRING
        #prompt('Server &Port (def 6873)',@S9),%NetAppPort,default(6873)

where I can place Local Variable at NetAppPort.

TIA

8
Web Server - Ask For Help / Re: CapeSoft.NetTalk.Do Not Sync this Table
« on: December 26, 2018, 07:34:19 AM »
As stated recently,

And next modification will be (on my list)
1. like looking at FM3 again of how to get those Procedure File instead of Generate All File Declaration.
2. Use TableList (eg:from FM3) to Exclude/Include the Files for Desktop Client Sync.

Done after a good shower!

copy some code from NetTalk.tpl instead of FM3(it does helps to make me understand)
and test for the hack of testing.

This template is for my own use and lazy to delete or omit unwanted tables from the Desktop Client Sync, ServerSync Procedure.

Those are interested, use it at your own risk.

9
Web Server - Ask For Help / Re: CapeSoft.NetTalk.Do Not Sync this Table
« on: December 25, 2018, 08:12:22 PM »
Instead of NOSYNC=1 to filter out the Memory File and Alias

Extracted and Created a #Control(MyNetTalkClientSyncControls ...,  myNTClientSync.tpw
from the NetTalk.tpl(#Control(NetTalkClientSyncControls ... ) and others template code that its needed.

search for 
#FOR(%File),Where(%FileType='FILE')

and added

#!v--kcchin
    #IF ((%FileType <> 'FILE' and not (%FileType = 'ALIAS' and %IncludeAliases = 1)) or (%FileDriver = 'MEMORY'))
      #cycle
    #ENDIF
#!^--kcchin

to filter out all the In-Memory driver.
(used the template code from FM3. he he he)

And next modification will be (on my list)
1. like looking at FM3 again of how to get those Procedure File instead of Generate All File Declaration.
2. Use TableList (eg:from FM3) to Exclude/Include the Files for Desktop Client Sync.

Due to some Desktop Sync app only sync its own tables from the same dictionary (as used by other app)

I am had to modify the above to minimize the number of Table where ServerSync create those tables that are not necessary for Desktop Sync, which are 100+ of tables.


10
Web Server - Ask For Help / CapeSoft.NetTalk.Do Not Sync this Table
« on: December 25, 2018, 02:19:32 AM »
Why it generates after setting the Table Option to NOSYSNC?

Kindly refer to the 3 attachments.

Regards
Chin

11
1. Oh well, back to drawing board again.
2. Now, split into 2 dictionaries. SQL and Topspeed(Desktop Disconnect) separately.
- and use the same table name to do the sync.

3. Less headaches and less coding.  Just let NetTalk do the working.  ::)
4. Luckily it is just a 4 tables(Topspeed) instead of almost a 100 tables (from SQL side).
5. 4 tables is easier to maintain if there are some changes from the SQL side.
6. Hopefully and cross my fingers than only 4 tables to maintain.

Cheers for those who are reading my self reply messages.


12
Hi Bruce,

"Must the Tables and fields name be the same?"

What I am trying to say is ...

SQL and TPS Tables and fields

Both tables have same field name except the TPS where there are 4 extra fields than the SQL table.
Both table's name is different by a single letter "Z"
Table name "CSAGT" and "CSAGTz.tps"

CSAGT table (sql server)
field_a long
field_b string
field_b string
... more fields
TimeStamp
ServerTimeStamp
DeletedTimeStamp

CSAGTz.tps table (topspeed)
field_a long
field_b string
field_b string
... more fields
... plus extras
field1 long
field2 long
field3 string
field4 byte

TimeStamp
ServerTimeStamp
DeletedTimeStamp

Questions before I mess up my dictionary and Client app:

1. How to sync from Client(Desktop)  to Server(WAN) with the above situation?
2. For Client(Desktop),
    Do I separate Dictionary just to solve it like change the table name to the SQL side "CSAGT" instead of "CSAGTz.tps"?

Regards,
KC

Answer for #2. I think I just answered my very own question.  table{prop:name} and table{prop:driver}
Answer for #1. still work-in-progress

13
Hi,

NetTalkApps.Htm Introduction,...
"In some ways this means thinking "beyond SQL". SQL has traditionally been the store of choice for many programs, and indeed there are many benefits to having SQL as a store, but data inside a SQL database requires clients to connect to that database. In order to create disconnected programs we have to allow the data to escape the SQL database, returning (possibly changed) at some later point. Of course this does not replace the SQL database - your primary store will likely remain as a SQL database (although it could also be TPS) - but rather it expands the horizons of the database."

Must the Tables and fields name be the same where Server is SQL, and Desktop app is TPS and XML when Sync App Disconnect?


14
Web Server - Ask For Help / Re: NetSimple and NetWebSocketServer
« on: November 23, 2018, 12:16:40 AM »
1. share the ip address and port in one procedure that have NetSimple and NetWebSocketServer

answer my own question. oh well! more headaches.  Separate server app for separate job. Less problem and smoke less.

2. NetWebSocketServer requires Web? more like need a webserver

Done.

15
Web Server - Ask For Help / NetSimple and NetWebSocketServer
« on: November 23, 2018, 12:09:55 AM »
Hi,

I am not using the Webserver that need browsers. NetWebServer Allow WebSockets

I have an app which use the NetSimple as a server.
This app does not do web.  It is just receiving and sending data from/to client or another server).
(all apps are Clarion)

Questions:
1. Adding the Extension, NetWebSocketServer,  how to use or share the same IpAddress and Port?

2. Must the WebSockets requires Web?

Regards,
KC

Pages: [1] 2