|
-
Aug 28th, 2007, 09:46 AM
#1
Thread Starter
Fanatic Member
OleDbCommand.Prepare method requires all variable length parameters to have an expl
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
-
Aug 28th, 2007, 10:06 AM
#2
Re: OleDbCommand.Prepare method requires all variable length parameters to have an ex
Does Access support SUBSTRING? I'm not sure if it does. You may want to try the MID function:
http://www.techonthenet.com/access/f...string/mid.php
-
Aug 28th, 2007, 10:36 AM
#3
Thread Starter
Fanatic Member
Re: OleDbCommand.Prepare method requires all variable length parameters to have an expl
Thank you very much,its working.
-
Aug 30th, 2007, 02:29 AM
#4
Thread Starter
Fanatic Member
Re: OleDbCommand.Prepare method requires all variable length parameters to have an expl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|