Hi, got a bit of a headscratcher. In attached folder is a database and VB6 project. The connection is made through ADO and works fine. I have a problem with finding if a record already exists in tblDetails. I've set up a little test routine under Command Button 2 that assigns values to intProduct and inttransaction that already exist in tblDetails. A piece of SQL checks if the record exists and if it does calls an update subroutine else calls an addnewitem subroutine. The problem I am having is converting a positive identification that the record exists into say an integer that can be used in a new routine, such as If-Then. I have tried Select Count(*) As Num from an SQl point of view executed against the current connection. Num is returned as 0 even though the record exists. I have tried instead creating a recordset based upon the tblDetails table and using a Do-While loop with nested If-Then statement. Still no joy. I tried the recordcount method for the recordset, this reported a value of -1 even though the cursor type, lock type is set I believe correctly. Doing a de-bug print of the recordset, both the SQL generated one and the conventional one shows that the records are there and can be retrieved. So what gives
Please have a look and see if you can figure this one out. It's probably a no-brainer
Thanks, Lol
Please have a look and see if you can figure this one out. It's probably a no-brainer
Thanks, Lol