SQLitening Support Forum

SQLitening Support => You've got Questions? We've got Answers! => Topic started by: mikedoty on September 23, 2007, 03:48:44 am

Title: Test code (begin deferred transaction)
Post by: mikedoty on September 23, 2007, 03:48:44 am
Updated code moved to 9/25/07 (matches version 3 download from this site)
http://www.dotysoftware.com/sqlddt.bas
Title: Re: Test code
Post by: mikedoty on September 23, 2007, 03:58:43 am
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

Title: Re: Test code (begin deferred transaction)
Post by: Paul Squires on September 23, 2007, 12:57:34 pm
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.
Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 23, 2007, 01:34:52 pm
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.

Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 25, 2007, 06:42:57 pm
Updates to this code at http://www.dotysoftware.com/sqlddt.bas (http://www.dotysoftware.com/sqlddt.bas)
Can't post here because it exceeds 20,000 characters  (25,735 characters.)
Title: Re: Test code (begin deferred transaction)
Post by: Michael Sydenham on September 27, 2007, 07:06:25 am
Links seems down
Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 27, 2007, 07:09:27 am
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.
Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 27, 2007, 07:35:47 am
Posted new code.  5:05AM 9/27/07.
Title: Re: Test code (begin deferred transaction)
Post by: Paul Squires on September 27, 2007, 08:25:36 am
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

Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 27, 2007, 08:27:42 am
Curious, do you want the client to be able to bypass the host completely?
Title: Re: Test code (begin deferred transaction)
Post by: Paul Squires on September 27, 2007, 08:33:40 am
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).
Title: Re: Test code (begin deferred transaction)
Post by: Paul Squires on September 27, 2007, 08:35:04 am
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?
Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 27, 2007, 08:38:44 am
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.
Title: Found a possible problem using Windows 98 SE
Post by: mikedoty on September 27, 2007, 09:14:03 am
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.


Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 27, 2007, 09:32:53 am
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.
Title: Code updated
Post by: mikedoty on September 28, 2007, 08:17:01 pm
http://www.dotysoftware.com/sqlddt.bas has been updated.
Title: Re: Test code (begin deferred transaction)
Post by: mikedoty on September 29, 2007, 10:29:46 pm
Updated to allow client to start/end server if on same machine.
Title: Transaction commit now issued before working with recordset
Post by: mikedoty on October 04, 2007, 04:17:21 am
Code updated at http://www.dotysoftware.com/sqlddt.bas
COMMIT is now after SELECT instead of after reading through the recordset.
Transactions from other clients would not start.
Title: Loading a listbox is too slow so now shell to an output file $ShellOutputTo
Post by: mikedoty on October 11, 2007, 12:34:00 am
Loading a listbox is too slow so now shell to an output file $ShellOutputTo

http://www.dotysoftware.com/sqlddt.bas
Paul,
Sure are a lot of lurkers based upon the number of people who have read this thread.
352 as of this posting.
Title: Re: Test code (begin deferred transaction)
Post by: Fredrick Ughimi on October 13, 2007, 07:51:08 am
Hello Mike,

>>Sure are a lot of lurkers based upon the number of people who have read this thread.
352 as of this posting.

Now 416 with this. ;D Wish we could be of help like you are doing.

Well done Paul and Mike.  :)

Best regards,
Title: Re: Loading a listbox is too slow so now shell to an output file $ShellOutputTo
Post by: Robert E. DeBolt on October 26, 2007, 05:12:49 pm
Quote from: mikedoty on October 11, 2007, 12:34:00 am
Sure are a lot of lurkers based upon the number of people who have read this thread.
352 as of this posting.


551 now.  Must be leering at your avatar!   :o