This topic is locked

Search error

7/24/2006 7:52:46 AM
ASPRunnerPro General questions
A
abdemir author

Hi,
I have a problem with search option (also advanced search). The following an error appear when I search. If I unselect total_acreage field on search and adv.search option there is no problem but I must use total_agreage field on search option.
ERROR

------------

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'total_acreage'.

/test/tbl_cab_list.asp, line 775

----------
SQL

-----------

select [id],

[owner],

[first_name],

[last_name],

[customer_type],

[crop_vegetables_acreage],

[crop_fruits_acreage],

[crop_fields_acreage],

[crop_others_acreage],

[crop_vegetables_acreage] + [crop_others_acreage] + [crop_fruits_acreage] + [crop_fields_acreage] as total_acreage

From [dbo].[tbl_cab]
There is no problem on view, list, add and edit pages section. Could you help me please?

Best Regards,

Bulent

Alexey admin 7/24/2006

Bulent,
you need to modify GetFullFieldName function in generated include\commonfunctions.asp file as described in ASPRunner Help:

http://www.xlinesoft.com/asprunner/docs/us...sql_queries.htm

to be able to search for calculated fields.
I.e. modify the function this way:

if "dbo.tbl_cab"=strTable and "total_acreage"=field then

GetFullFieldName="[b][crop_vegetables_acreage] + [crop_others_acreage] + [crop_fruits_acreage] + [crop_fields_acreage] [/b] "
exit function
end if

A
abdemir author 7/24/2006

I changed my code, it's solved.
Thank you.