EagleTempest
10-30-2004, 04:03 PM
VB6 and MS Access
When I create a command such as
Dim comUpdate As ADODB.Command
Set comUpdate = New ADODB.Command
With fgdWindow(intWdwNum)
strSQL = "UPDATE Windows SET " & _
"Description = '" & .TextMatrix(1, 1) & "', " & _
"JambDepth = '" & .TextMatrix(1, 4) & "', " & _
"ExtSurround = '" & .TextMatrix(1, 5) & "', " & _
"IntSurround = '" & .TextMatrix(1, 6) & "', " & _
"GlassPanes = '" & .TextMatrix(1, 7) & "', " & _
"GlassOption = '" & .TextMatrix(1, 8) & "', " & _
"GlassTint = '" & .TextMatrix(1, 9) & "', " & _
"Quantity = " & .TextMatrix(1, 10) & ", " & _
"Cost = " & CCur(fgdWindowA(intWdwNum).TextMatrix(1, 11)) & ", " & _
"Price = " & CCur(fgdWindowA(intWdwNum).TextMatrix(1, 12)) & _
" WHERE (QuoteID = " & mintQuoteNum & ") AND (WindowNum = " & _
intWdwNum & ")"
End With
With comUpdate
.ActiveConnection = cnWindowWonders
.CommandText = strSQL
.Execute
End With
Set comUpdate = Nothing
Is there a maximum length CommandText can be?
When I create a command such as
Dim comUpdate As ADODB.Command
Set comUpdate = New ADODB.Command
With fgdWindow(intWdwNum)
strSQL = "UPDATE Windows SET " & _
"Description = '" & .TextMatrix(1, 1) & "', " & _
"JambDepth = '" & .TextMatrix(1, 4) & "', " & _
"ExtSurround = '" & .TextMatrix(1, 5) & "', " & _
"IntSurround = '" & .TextMatrix(1, 6) & "', " & _
"GlassPanes = '" & .TextMatrix(1, 7) & "', " & _
"GlassOption = '" & .TextMatrix(1, 8) & "', " & _
"GlassTint = '" & .TextMatrix(1, 9) & "', " & _
"Quantity = " & .TextMatrix(1, 10) & ", " & _
"Cost = " & CCur(fgdWindowA(intWdwNum).TextMatrix(1, 11)) & ", " & _
"Price = " & CCur(fgdWindowA(intWdwNum).TextMatrix(1, 12)) & _
" WHERE (QuoteID = " & mintQuoteNum & ") AND (WindowNum = " & _
intWdwNum & ")"
End With
With comUpdate
.ActiveConnection = cnWindowWonders
.CommandText = strSQL
.Execute
End With
Set comUpdate = Nothing
Is there a maximum length CommandText can be?