Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi / SQL Locking Up Problems

Status
Not open for further replies.

fruityBoy

Programmer
Jul 21, 2000
51
0
0
GB
I was wondering if their are any known problems when using Delphi to connect to Microsoft SQL Server 7.0 as my Delphi application is locking up after approximately five minutes of use?

Help would be much appreciated.

 
Might be helpfull for you...

Delphi uses BDE for transactions with SQL Server.
So BDE is the main cause for locks...
BDE puts table level exclusive locks in SQL Server...
so when your applications locks up
then CHECK that is there any lock at the back end...

The other thing is that your BDE installation might not be correct.... Try ugrading to latest BDE version...

Using SQL Explorer try doing some transaction and see if locks or not.... if it locks then BDE is the Problem..

If it doesnt locks but your application locks ... check locks at the back end...

 
Hi, thanks for replying - I'll try your suggestion (it's not actually for me, it's for a company we are affiliated with, we actually use Foxpro, and I know nothing about Delphi, but I said I would see if I could find anything out).

Thanks very much.

 
Hi fruityBoy!

First Rule: Do not use TTabel component(Never),instead uses TQuery component. if you will make insert, updates etc set the property "RequestLive" to true. Good lock...luck :)
 
Hey, this is cool, thanks, I will try this also.

Thanks Fluzzi! B-)

 
yes FUZZI is right. TTable is the Devil for all the Locks...:)

and also try avoiding the statement
Select * from myTable

....
still If u want to select all the records
then dont use *... put each field name one by one...
I have a known prob with delphi which i have experienced..
when u have large data and you use * in your SQL Queries from Delphi.. you are inviting trouble as far as speed and locks are concerned...






 
Cheers for that Peacemaker, yeah, it is similar in foxpro with regards to using * in select statements, I'm currently researching into using RDS and ADO to access data such as SQL databases, I think that this system really has potential - and it is so similar to using Access record objects.

Cheers for your help guys, I'll know who to ask next time :cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top