VB6 application named GHM using the VFPOLEDB Provider with a dBase database file named GHM_V70.DBF. conn1 is Connection String; rs1 is Recordset; PA() is an array of field values. There are 87 fields in each record.
The following code for record updates (used versus rs1.Update) works perfectly when run in the VB IDE but fails with the compiled application -- Windows (XP) error: "GHM has encountered a problem and must close. Please tell Microsoft about this problem." Sending the error report does not result in any information about the problem
The error occurs on the conn1.Execute UpdStr statement.
Thanks in advance for any ideas about why compiled code fails when IDE run doesn't fail, and how to resolve the situation.
The following code for record updates (used versus rs1.Update) works perfectly when run in the VB IDE but fails with the compiled application -- Windows (XP) error: "GHM has encountered a problem and must close. Please tell Microsoft about this problem." Sending the error report does not result in any information about the problem
Code:
UpdStr = ""
For i = 0 to 86
UpdStr = UpdStr & Space(1) & rs1.Fields(i).NAME & "=[" & PA(i) & "]" & ","
Next i
UpdStr = Left(UpdStr, Len(UpdStr) - 1) & Space(1)
UpdStr = "UPDATE GHM_V70 SET " & UpdStr & "WHERE GS_ID = "[" & PA(0) & "]"
conn1.Execute UpdStr
Thanks in advance for any ideas about why compiled code fails when IDE run doesn't fail, and how to resolve the situation.