Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Custom Macros and Type Casting View modes: 
User avatar
Member
Member
leem - 7/27/2009 6:41:21 AM
   
Custom Macros and Type Casting
Hi,

I'm trying to have the following WHERE clause within one of my queries

where custom_Event.Type = {#currenttype#}

I get the below error

Conversion failed when converting the varchar value '{#currenttype#}' to data type int.

I have tried the below but with the same error

where custom_Event.Type = CAST('{#currenttype#}' AS INT)

any ideas?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 7/28/2009 7:50:17 AM
   
RE:Custom Macros and Type Casting
Hi,

Could you please try to refresh view in database for your custom table?

Best Regards,
Miroslav Remias

User avatar
Member
Member
leem - 7/29/2009 3:49:46 AM
   
RE:Custom Macros and Type Casting
Hi,

Apologies, I'm not sure what you mean? can you explain abit more

Lee

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 7/29/2009 5:54:12 AM
   
RE:Custom Macros and Type Casting
Hi,

If you open for example SQL Server Management Studio and open your database, navigate to views section, find your custom table and with right click button there should be option refresh.

Best Regards,
Miroslav Remias.