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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking a Table with Powerbuilder

Status
Not open for further replies.

Edders

MIS
Sep 20, 2004
9
GB
Hey all,

I have created a powerbuilder automated process which takes information from a Zip file and processes it and fills a Database table on as400/db2. The problem i am having is it requests passwords even though it is hardcoded into the dbparm. I have looked at the ODBC connection but no luck! I have been looking at a great deal of sites and one suggested it could be a result of the table i am inserting into has been locked. therefore the process halts and times out...then requests the password after the timeout period.

Basically how can i lock tables through PB and ensure that the tables are locked throughout the process run time.

Any help would be great!

cheers

Ed
 
I think we may have a property called LOCK in the Transaction Object. Through that DBParm Property we can lock the tables and restrict the other users to use the table. I don't know whether this is right or wrong...
Check with Lock property of the transaction object
 
Locking an SQL database is not something that you do in code, although I have not used every SQL db so there may be exceptions.
Have you set the connection up in PB as a connection profile? If yes, then does this give the same problem?
It may well be that as400/db2 will only let you connect via an interactive process - sorry I am not being clear there. What I mean is that maybe it insists that you go through this logon process.
I cannot see that locked tables on the database could cause this to happen. As you connect to the db it is only the system tables that are queried after all - you cannot directly update them and, therefore, lock them and nor can anyone else.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top