ChakrapaniBabu
asked on
ADO Error - Method 'Execute' of object '_Command' failed
While executing a UPDATE query through ADO i am getting an error message
Run time error '-2147217887 (80040e21)':
Method 'Execute of object '-command' failed.
I am using
NT 4 OS with SP4, VB6
ADO object Library 2.1
Oracle Server & Client 8.1.7
Tips
----
a) While command object executes this error prompted.
b) When i use adInteger instead of adBigInt datatype,
this error is not encountered.
c) The same adBigInt datatypes working without any error
in Oracle Server and client 8.0.6
d) Why this Oracle 8.1.7 is not accepted ?
Thanks in advance
===== Function ========
Public Function UpdateFPAPara_Approve(ByVa l apv_by_id As String, ByVal apv_flag As String, ByVal apv_dt As Date, ByVal fpa_para_apvcd As Long) As Integer
On Error GoTo ERR_HANDLER
Dim lcm As ADODB.Command
Set lcm = New ADODB.Command
lcm.ActiveConnection = GetConnection
lcm.CommandType = adCmdText
lcm.Prepared = True
lcm.CommandText = "update FPA_PARA_APPROVE set apv_by_id = ?, approve_fl = ?, approve_dt = ? where fpa_para_apvcd = ?"
lcm.Parameters.Append GetNewParameter(adVarChar, 20, apv_by_id)
lcm.Parameters.Append GetNewParameter(adVarChar, 20, apv_flag)
lcm.Parameters.Append GetNewParameter(adDBTimeSt amp, , CDate(apv_dt))
lcm.Parameters.Append GetNewParameter(adBigInt, , fpa_para_apvcd)
lcm.Execute
UpdateFPAPara_Approve = 1
Set lcm = Nothing
Exit Function
ERR_HANDLER:
UpdateFPAPara_Approve = 0
Set lcm = Nothing
MsgBox Err.Description, vbCritical, "FPA-cdFPAPara Class"
End Function
Run time error '-2147217887 (80040e21)':
Method 'Execute of object '-command' failed.
I am using
NT 4 OS with SP4, VB6
ADO object Library 2.1
Oracle Server & Client 8.1.7
Tips
----
a) While command object executes this error prompted.
b) When i use adInteger instead of adBigInt datatype,
this error is not encountered.
c) The same adBigInt datatypes working without any error
in Oracle Server and client 8.0.6
d) Why this Oracle 8.1.7 is not accepted ?
Thanks in advance
===== Function ========
Public Function UpdateFPAPara_Approve(ByVa
On Error GoTo ERR_HANDLER
Dim lcm As ADODB.Command
Set lcm = New ADODB.Command
lcm.ActiveConnection = GetConnection
lcm.CommandType = adCmdText
lcm.Prepared = True
lcm.CommandText = "update FPA_PARA_APPROVE set apv_by_id = ?, approve_fl = ?, approve_dt = ? where fpa_para_apvcd = ?"
lcm.Parameters.Append GetNewParameter(adVarChar,
lcm.Parameters.Append GetNewParameter(adVarChar,
lcm.Parameters.Append GetNewParameter(adDBTimeSt
lcm.Parameters.Append GetNewParameter(adBigInt, , fpa_para_apvcd)
lcm.Execute
UpdateFPAPara_Approve = 1
Set lcm = Nothing
Exit Function
ERR_HANDLER:
UpdateFPAPara_Approve = 0
Set lcm = Nothing
MsgBox Err.Description, vbCritical, "FPA-cdFPAPara Class"
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
per recommendation
SpideyMod
Community Support Moderator @Experts Exchange
SpideyMod
Community Support Moderator @Experts Exchange
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept aikimark's comment(s) as an answer.
ChakrapaniBabu, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer