Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: -335. Parameter [P] data type is unknown
-335. Parameter [P] data type is unknown
Posted: 2007/09/14 09:41
 
Hi,
I just discovered ANYDAC and I do some testing but I struggle with this issue.
Could you please help me.

I got this error trying to open an ADQuery with the 1122 version of anydac on Delphi 2007.

My code looks like this :

AQuery := TADQuery.create(nil);
AQuery.Formatoptions.DefaultParamDataType := ftstring;
AQuery.connection := AConnection;
AQuery.SQL.text := 'Select * from table where COL1 = : PARAM1';
AQuery.Params[0].asstring := 'Avalue';
AQuery.open; //=> [AnyDAC][Phys]-335. Parameter [P] data type is unknown


For your information , I got the error on Access and SQLServer Database but not on Oracle Database . (maybe due to ODBC driver ?)

This is the callstack of the error :
[007C5EF4] daADStanError.ADException (Line 138, "daADStanError.pas" + 10) + $3
[007C770F] daADStanError.ADException (Line 383, "daADStanError.pas" + 8) + $18
[00806CF0] daADPhysManager.TADPhysCommand.ParTypeUnknownError (Line 3620, "daADPhysManager.pas" + 1) + $28
[0081603F] daADPhysODBCBase.TADPhysODBCCommand.CreateParamsInfo (Line 1096, "daADPhysODBCBase.pas" + 41) + $6
[007E81D6] daADStanParam.TADParams.GetItem (Line 1047, "daADStanParam.pas" + 1) + $6
[00816CC2] daADPhysODBCBase.TADPhysODBCCommand.InternalPrepare (Line 1375, "daADPhysODBCBase.pas" + 25) + $3
[008079A1] daADPhysManager.TADPhysCommand.Prepare (Line 4064, "daADPhysManager.pas" + 25) + $5
[0086CC00] daADCompClient.TADCustomCommand.InternalPrepare (Line 3351, "daADCompClient.pas" + 24) + $7
[0086CF75] daADCompClient.TADCustomCommand.SetPrepared (Line 3431, "daADCompClient.pas" + 21) + $5
[00FFFFFB] AgfaQuery.TAgfaTable.FieldByName (Line 2542, "AGFA COMPAgfaQuery.pas" + 1) + $14
[0086D135] daADCompClient.TADCustomCommand.Prepare (Line 3476, "daADCompClient.pas" + 1) + $5
[008705A9] daADCompClient.TADAdaptedDataSet.DoPrepareSource (Line 5287, "daADCompClient.pas" + 5) + $A
[0083AC79] daADCompDataSet.TADDataSet.OpenCursor (Line 2038, "daADCompDataSet.pas" + 14) + $5
[008719CC] daADCompClient.TADRdbmsDataSet.OpenCursor (Line 5906, "daADCompClient.pas" + 5) + $6
[0086E019] daADCompClient.TADCustomCommand.DoSQLChange (Line 4033, "daADCompClient.pas" + 57) + $10
[007C1085] DB.TDataSet.SetActive + $55
[008387EC] daADCompDataSet.TADDataSet.SetActive (Line 1049, "daADCompDataSet.pas" + 3) + $6
[007C0E7D] DB.TDataSet.Open + $9
[00871E38] daADCompClient.TADCustomQuery.UpdateRecordCount (Line 6256, "daADCompClient.pas" + 27) + $3
[0083BF82] daADCompDataSet.TADDataSet.GetRecordCount (Line 2591, "daADCompDataSet.pas" + 26) + $5
[0083B09C] daADCompDataSet.TADDataSet.DoAfterOpen (Line 2141, "daADCompDataSet.pas" + 2) + $5
[007C1181] DB.TDataSet.OpenCursorComplete + $51
[007C10A7] DB.TDataSet.SetActive + $77
[007C10EB] DB.TDataSet.SetActive + $BB
[008387EC] daADCompDataSet.TADDataSet.SetActive (Line 1049, "daADCompDataSet.pas" + 3) + $6
[007C0E7D] DB.TDataSet.Open + $9

Post edited by: boitet, at: 2007/09/14 09:43
Re:-335. Parameter [P] data type is unknown
Posted: 2007/09/14 09:55
 
OK : an other information ,
if I change the recourdcountmode of the query from cmtotal to cmfetched
it Works ...
Is there a bug ?
Re:-335. Parameter [P] data type is unknown
Posted: 2007/09/15 00:57
 
Hello

This is known bug, which will be fixed in v 2.0.

Regards,
Dmitry