|
-
May 2nd, 2000, 11:36 PM
#1
Thread Starter
Fanatic Member
I'm using VB6 with ADO to connect to Access.
I have a form which is used for batch input, and another form which is used to view all the batches.
On the input form you can add, alter and delete items from a batch. In each of these cases a Transaction is used, and all works fine. From the batch view form (which displays all batches in a listview) you can double click on any batch item, and the batch input form is displayed with the details displayed for the selected batch item. The problem is when I try to delete or alter this item I get the following error message, and I have absolutely no idea why. 
-2147467259 Attribute can not be set now.
It occurs on the BeginTrans statement.
Please HELP!!
[Edited by Stevie on 05-03-2000 at 05:40 PM]
-
May 3rd, 2000, 03:02 PM
#2
Lively Member
Are you trying to set the recordset before the begintran??
-
May 3rd, 2000, 03:52 PM
#3
Thread Starter
Fanatic Member
Nope.
It all works fine when using the batch input form. It only keels over when using the functionality in the form from another form.
-
May 3rd, 2000, 04:04 PM
#4
Lively Member
If i remember correctly, you can not have an open recordset before the begintrans. All the recordsets must be close before you open a transaction. Then open another recordset in that transaction. Try this.
-
May 3rd, 2000, 05:06 PM
#5
Thread Starter
Fanatic Member
As far as I can see I have no recordsets open. I have so many that it is easy to miss in the code.
Is there a way of closing all open recordsets?
-
May 3rd, 2000, 05:15 PM
#6
Thread Starter
Fanatic Member
I've just been looking through the help about transactions, and in it they give an example where a recordset is open just before the BeginTrans, so that appears not to be the problem.
Any other ideas?
-
May 3rd, 2000, 07:57 PM
#7
Thread Starter
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|