• Welcome to SQLitening Support Forum.
 

News:

Welcome to the SQLitening support forums!

Main Menu

Test code (begin deferred transaction)

Started by mikedoty, September 23, 2007, 03:48:44 AM

Previous topic - Next topic

mikedoty

Updated code moved to 9/25/07 (matches version 3 download from this site)
http://www.dotysoftware.com/sqlddt.bas

mikedoty

#1
If multiple copies of the program are run getting error 1 on the BEGIN statement if the
other copy is in a transaction.  This is a read only transaction. 

If the BEGIN DEFERRED TRANSACTION and COMMIT are removed it works fine if multiple copies are run.

The BEGIN statement and COMMIT statement are in CASE %BUTTON_EXECUTE


Paul Squires

Not really sure why you are wrapping your SELECT sql in a transaction. I will check to see why the BEGIN is blocking the read from the second instance of the program.
Paul Squires <br />http://www.planetsquires.com<br />support@planetsquires.com

mikedoty

Simply testing if transaction processing is working.
From what I've read the BEGIN and COMMIT are internally automatic unless supplied.
So I supplied them to see what happens.


mikedoty

#4
Updates to this code at http://www.dotysoftware.com/sqlddt.bas
Can't post here because it exceeds 20,000 characters  (25,735 characters.)


mikedoty

#6
I'll bring them up again and post a message.
It is possible to bypass the host.  I don't want this code posted.

Paul,
Should bypassing the connection (to avoid the host) be an option?
It works by not specifying locahost.  Perhaps this is good.

mikedoty


Paul Squires

Quote from: mikedoty on September 27, 2007, 07:09:27 AM
Paul,
Should bypassing the connection (to avoid the host) be an option?
It works by not specifying locahost.  Perhaps this is good.
I just looked at the code. It seems that if the Host is not specified then PowerBASIC's TCP functions will default to using "LocalHost".

This is the call that the client makes when it attempts to connect to the server. If sHost is blank then it seems to connect to the LocalHost.


   Tcp Open Port nPort At sHost As hSocket

Paul Squires <br />http://www.planetsquires.com<br />support@planetsquires.com

mikedoty

Curious, do you want the client to be able to bypass the host completely?

Paul Squires

Also, you can force your database to be created/opened on the local client machine by simply using %SQL3_LOCAL in the sql3_Use function. This allows you to pick and choose which databases you want to access on the local machine and which ones from the server.

so, you can open a connection to a server but still open and access databases on th elocal machine (e.g. a local configuration file).
Paul Squires <br />http://www.planetsquires.com<br />support@planetsquires.com

Paul Squires

Quote from: mikedoty on September 27, 2007, 08:27:42 AM
Curious, do you want the client to be able to bypass the host completely?
Not sure which way is best. The library should not be forced to have to always operate in Client/Server mode. That's why %SQL3_REMOTE and %SQL3_LOCAL were introduced.

Would you prefer for the library to throw and error if the Host is blank?
Paul Squires <br />http://www.planetsquires.com<br />support@planetsquires.com

mikedoty

Not sure.   Direct access is faster, but the host isn't doing its thing.
Could cause security problems?  If running local the host isn't necessary, so I don't know.

mikedoty

Client is running Windows 98 SE
Host  is running  XP Pro SP2
Connecting down the internet from the client using Windows 98 SE
Click Start session
Click Connect
Click Execute
Click End session
Abends
Test code can be downloaded at http://www.dotysoftware.com/sqlddt.bas
I may have to start zipping the file since downloads have been truncated for some unknown reason.
I think my ISP may have a virus program or something that is doing it.  If truncated, please let me know.

It works fine if disconnect is clicked before ending the session using Windows 98 SE.
This does not happen using XP, but the client and the host are on that machine.
I'll reverse the process so the Windows 98 SE machine is the host and see if it abends on XP.

Paul,
If you ever want to use my host then lset me know and I'll supply an IP and port.



mikedoty

#14
Host is Windows 98 SE
Client is Windows XP Pro
Connected down the internet
Client abends if Start session, connect, execute transaction, end session (without disconnect.)
Add disconnect code to end session and also if the windows is closed fixed this problem.