Invalid parameter error with TClientdataset Invalid parameter error with TClientdataset database database

Invalid parameter error with TClientdataset


When you have an ftString datatype field and the size of that is zero or not provided, then it also may cause this kind of error. I have tried creating the fieldefs for the dataset and haven't specified the size for the string field. I ended up with the same error.


Riaan,

are you using ftGuid fields? If so, you have to manually set the size of the field to 38.

regards,Lieven


Lieven is correct in noting that certain TFields have different needs, as far as their properties, before the ClientDataSet to which they are associated can be created (using CreateDataSet). But the TGuid field is not the only one.

If you are having trouble determining which of the fields are causing the problem, comment out all field types except one, TStringField for instance, and then try to create the ClientDataSet. If that first group causes no problems, move onto the next. It could be as simple as a BDC (binary coded decimal) field, or something more exotic.

Once you find a field type whose presence causes the error, use the help and make sure that you are including only properties meaningful for that field type.

Also, this could also be due to an invalid parameter in an TIndexDef. For example, TIndexDef instances do not support ixExpression indexes, even though the IndexDef collection editor permits you to set this option.

Good luck...