Microsoft
Software
Hardware
Network
Question : error Query is too complex when updating record
Hi Experts,
It must be early in the morning and I am missing something probably simple.
My code:
Dim conn As String = "Provider=Microsoft.Jet.OL
EDB.4.0;Da
ta Source= " & "'" & TextBox1.Text & "'" & ";Persist Security Info=False"
Dim cmd1 As String = "Select * from Report"
Dim adapter1 As New OleDbDataAdapter(cmd1, conn)
Dim topics1 As New DataSet()
adapter1.Fill(topics1, "Report")
Dim builder1 As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(
adapter1)
builder1.QuotePrefix = "["
builder1.QuoteSuffix = "]"
For Each row In topics1.Tables("report").R
ows
If aa1 = 102 Then ' variable value from elsewhere
row("Question102") = drCurrent("comment") ' drCurrent("comment") value from other table
Else
If aa1 < 98 Then
row("Question" & aa1) = drCurrent("result") ' result from other table
End If
End If
builder1.GetUpdateCommand(
)
adapter1.Update(topics1, "report")
Last line returns the error - Query is too Complex
All I basically want to do is to update an existing record in Access with VB 2005
regards
Answer : error Query is too complex when updating record
I found the problem!
I had more than 100 columns in the table.
When I tested with less than 100 it works fine.
Now I can do a workaround
Random Solutions
LOAD DATA INFILE - TIMESTAMP, the correct usage
Memory Leak error, that only occurs, when i rename my server, and give a specific ip address?
Excel Athlete Evaluation Form
SBS 2003 with ISA running Exchange behind another SBS 2003 with ISA w/o Exchange - OWA errors
Sharepoint Content Database Schema
display hostname and user's name ?
Project Server 2007 Tasks
Windows XP Home to Professional
Which HDMI Cable for my XBox 360
Is there a way to reformat Outlook 2007 phone numbers?