Forums › Forums › SIMPOL Programming › Error 3, two windows with forms using same database?
- This topic has 18 replies, 2 voices, and was last updated 14 years, 8 months ago by JD Kromkowski.
- AuthorPosts
- August 5, 2009 at 10:45 am #1702MichaelKeymaster
JDK wrote:
> NR: If you have started it running as a server, then you can't open
> it as a file. You have to open it using the server address. In the
> config file it will tell you what the port number is (the default is
> port 4000). In Personal you switch to ppcs as the type, and in the
> box you would put 127.0.0.1:4000.
>
>
> JDK: Well, now I get Error 10.Error 10 is a timeout. You typically get that if you are trying to open
a table from somewehre that isn't sharing it. PPSR/PPCS in SIMPOL is
also case-sensitive, so if the table is called FOO and its being shared
as FOO, then you need to open it as FOO.> This is what my sample.cfg looks like:
>
> [Server]
> port1=4000
> txfactor1=0
> port2=4001
> txfactor=6
> tcpport=24000
> logfilename=samplelog.txt
>
> [Files]
> 1=C:simpolutilitiessimpolserveradrb.sbm,240000000
> 2=C:SIMPOLDataPayroll.sbm,240000000
> 3=C:SIMPOLDatawages.sbm,240000000
>
> ***************
>
> First, I really don't understand what txfactor1, txfactor, tcpport
> mean.txfactor1, etc. are directly related to the txfactor property in a PPCS
connection. The txfactor1 goes with the port1, the txfactgor2 goes with
the port2, etc. The easiest way to understand it is this:When using TCP/IP, the transport protocol is responsible for making sure
that all of the data gets from one end to another. In UDP/IP, it is a
broadcast protocol, so what happens is the server sends out all of the
data it has, as fast as it can. Since the data travels in multiple hops
over the Internet to you, if you are not getting the data as fast as it
is sent, the interim servers may not cache it all along the way, and
simply discard what they didn't have room for. Then the fact that it all
failed to arrive will be noticed by the client, who will ask the server
to resend. The server will resend ALL the data again, and the same
problem may occur, since what is being dropped is at the end. To deal
with this problem, the txfactor was added to the server and client, to
allow the server to artificially slow down how fast it sends the data so
that the transport route along the way won't have to discard any before
it is forwarded again. In a local area network, you can connect to the
port1 with a txfactor1 value of 0, and this will run at full speed. If
you are debugging, you may need to connect to port2 which has been
slowed down to txfactor 6 (or even higher sometimes). The reason is that
in debug mode (or single-stepping) the application may not be processing
the data fast enough as it comes in, if there is a lot of it.> Should I also have a line?
>
> port3=4003
>
> for the "wages.sbmAll the tables are visible on all ports. The ports and the txfactors
work together to allow the same database tables to be accessed on more
than one port, choosing a pre-defined one with the most appropriate
txfactor. In an in-house LAN, you may only need one, with a txfactor of 0.> And is this what the command line is supposed to look like:
>
> C:SIMPOLbinsmpw1_32.exe simpolserver.smp sample.cfgYou generally should use smprun32 for command line programs, and
smpwin32 for GUI programs. The simpolserver.smp is a command line
program. The smpw1_32.exe is a special version of smpwin32.exe for
debugging a program that can't be debugged in the IDE (rare cases). If
the system has been normally installed, you don't even need to specify
that, you can just do:simpolserver.smp sample.cfg
from a cmd prompt.
> Or do I have to be more explicit about where simpolserver.smp and
> sample.cfg are located.I would open a cmd prompt from the Run item off the Start menu, and then
CD there.> Do I run this from windows RUN? Or do I run this from someplace in
> IDE?The program is designed to be run as a command line program. Eventually
we will add a loader for services, which is what this should be though
of as. Longer term, this program will have an HTML GUI like most routers
provide and you can control it from a browser (because the program is
designed to work on a server that may not have a GUI).Ciao, Neil
August 5, 2009 at 10:47 am #1622MichaelKeymasterJDK wrote:
> As to the second part of your post:
>
>
> Here is what I did:
>
> dataform1 f string filename filename = "C:SIMPOLFormsmyform.sxf"
> string errtext; errtext = "" f =@
> opendataform1(filename,error=error,errortext=errtext)
>
>
> What you want me to do is A. open the datasource(s) and table(s)
> AND then B. pass in opendatform1(all of that other stuff like
> datasource and tables)
>
> I will acknowledge that in SB2 I do first open the databases(tables)
> I'll be using and then open the form.
>
> But I sort of feel like WHY? Once I've created a form in Personal
> and saved it as an .sxf shouldn't all of that stuff be accessible
> through f which is created via opendataform1.
>
> Wouldn't it be logical that form object f must already contain
> references to the datasource and the mastertable otherwise I would be
> able to open the doggone thing up and see the correct data.
>
> Why do I need to pass it when I am already passing it through the
> .sfx information?You don't have to, but you will need to use the PPCS versions of the
tables in the form. If you open the tables using PPCS, then open the
form, it will use the PPCS versions of the tables. If you then go into
the form designer and save the form off, it will contain the PPCS
information instead of the sbme information for opening the tables. Then
it can open them for you, just by opening the form.Ciao, Neil
August 7, 2009 at 1:02 am #1750JD KromkowskiParticipantI am using the web based thing in the Forum rather than thunderbird and I
see weird line breaks (two lines get put into one).August 17, 2009 at 10:42 am #1613MichaelKeymasterJDK wrote:
> I am using the web based thing in the Forum rather than thunderbird
> and I see weird line breaks (two lines get put into one).
>I have made a change that should deal with that in future.
Ciao, Neil
- AuthorPosts
- You must be logged in to reply to this topic.