I have a application in vb6 in which a function will do a select and insertion in a transaction.

conn.begintrans
conn.execute "select..."
if (conn.execute "insert") then
conn.rollbacktrans
end if
conn.committrans

When doing insertion, a deadlock is encountered and all users are not able to access the application.

Anybody have the same experience and can advise me? I am new Sybase user. thanks!