hi All,

am creating an application to search the Grid, i master that in SQl db, no am using Access for this Application. i have an adapter , at the moment am using a Wizard. and i have this SQl statement that works fine when i run it in Query analyzer, but when i drop it in the Adapter it give the Following Error.

OleDbCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.

Here is an SQl statement in the adapter.
Code:
SELECT Actual_Extent, Boundary_Area, Compl_Boundary_Area, Current_Values, Extension, First_Prop_Address, Improved_Value, Improvements_Value, Lis_key, Num_key, Own_Name, Parcel_No, Parcel_Portion_No, Primary_ID, Prop_Address, Purchase_Date, Site_Value, Street_Name, Street_No, Title_Deed_No, Values_Effective FROM Property_ValRoll WHERE (Boundary_Area = ?) AND (SUBSTRING(Lis_key , 5 , 5) = ? )
This code is working fine only when i remove the substring search like this
Code:
SELECT Actual_Extent, Boundary_Area, Compl_Boundary_Area, Current_Values, Extension, First_Prop_Address, Improved_Value, Improvements_Value, Lis_key, Num_key, Own_Name, Parcel_No, Parcel_Portion_No, Primary_ID, Prop_Address, Purchase_Date, Site_Value, Street_Name, Street_No, Title_Deed_No, Values_Effective FROM Property_ValRoll WHERE (Boundary_Area = ?) AND (Lis_key  = ? )
but i need to Search within the String. how can i achieve that.

thanks


Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding