|
-
Mar 24th, 2016, 07:39 PM
#1
Thread Starter
Fanatic Member
More than 40 fields in ADO Query is too Complex
Hi there. I've been using DAO in a VB6 program (everything working well) but I'm changing things to ADO so I have an easier time migrating to SQL and eventually out of VB6 entirely.
I'm a total ADO noob so sorry if I've made some really basic error here.
I ran into the weirdest problem. If I understand this properly, it seems ADO is limited to updating records with only 40 fields or less. My database has about 60 fields. I know... bad design. But too hard to change that right now if I don't need to.
I read on the Microsoft site I should include this: myData.Properties("Update Criteria").value = adCriteriaKey but I have to say I didn't really understand the article and may not have done things properly but it made no difference.
Every time I try to update any record in my database I get a "Query is too complex" error.
HELP!
Here's some code:
Set myData = New ADODB.Recordset
myData.CursorLocation = adUseClient
myData.CursorType = adOpenDynamic
myData.LockType = adLockOptimistic
myData.Properties("Update Criteria").value = adCriteriaKey
myData.Open mstrSQL, ConString$, adOpenDynamic, , adCmdText
myData.movefirst
myData("MyField")="SMITH"
mYData.update
"Query is too complex"
Last edited by Darkbob; Mar 24th, 2016 at 07:45 PM.
Tags for this Thread
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
|