Re: Arguments are of the wrong type, are out of acceptable range or are in conflict with one another
- From: "Vitali Kalinin" <vitkalinin@xxxxxxxxx>
- Date: Thu, 21 Jul 2005 18:50:16 +0300
"Ashish P K" <AshishP@xxxxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:42dfb320@xxxxxxxxxxxxxxxxxxxxxxxxx
> Hi ,
> I am getting this error "Arguments are of the wrong type, are out of
> acceptable range or are in conflict with one another" while trying to
> add a field in a recordset object. I am using ADO 2.6
>
> The code snippet is as given below.
>
> function MyMethod :_Recorset // This is com+ method
> begin
> Result := CoRecordset.Create;
> Result.Fields.Append('AP_ACNT', adVarChar, 40, adFldMayBeNull,
> EmptyParam); // this line fails
> Result.Fields.Append('AR_ACNT', adVarChar, 40, adFldMayBeNull,
> EmptyParam);
>
> Result.CursorLocation := adUseClient;
> Result.Open(EmptyParam, EmptyParam, adopenStatic,
adLockBatchOptimistic,
> adCmdUnknown);
> Result.AddNew(EmptyParam, EmptyParam);
> Result.Fields['AP_ACNT'].Value := 'ABC';
> end;
>
> I am using this recordset as a temporary (Disconnected) recordset and
> passing it back to the client after population some values.
> This code works for the first time, when this method is called for the
> second time it throws the error, when trying to append
>
> Can some one help me to sort out this error.
>
>
> Regards,
> Ashish
>
>
It would be much easier if you will switch to TADODataSet, than just
populate FieldDefs collection and invoke CreateDataSet.
Regards,
Vitali
.
- References:
- Prev by Date: Passing Ado Recordsets between methods
- Next by Date: Re: Passing Ado Recordsets between methods
- Previous by thread: Arguments are of the wrong type, are out of acceptable range or are in conflict with one another
- Next by thread: New user authentication
- Index(es):
Relevant Pages
|