| Author |
Setting custom propery of type (SELECT) via PAPI
|
|
|
| Is it possible to set the value of a custom property of type select? I have
a handful of custom props with True/False as possible values. I need to be
able to set it via the PAPI. I have had no problems assigning the custom
property one of my values using:
myChannel.CustomProperties["MyProperty"].Value = "True";
When I'm trying to do it, I'm getting ODBC errors... specific from the stack
trace:
[CmsServerException: Server ODBC error. Contact the site administrator.]
Microsoft.ContentManagement.Publishing.CustomProperty.set_Value(String value)
Not being short here... I know I can set the values from the WebAuthor but
it's not possible in this case. I need to be able to do it through the PAPI
-AC
| |
| Angus Logan [MVP] 2004-10-06, 5:51 pm |
| Hi AC,
See
http://groups.google.com/groups?hl=...br />
40phx.gbl
and
http://meiyinglim.blogspot.com/2004...ror-solved.html
to verify its not the same issue - because there is an obscure resolution.
(Mei Ying - if you are watching does this look the same?)
Can you also run SQL Profiler on the sql server to see what the sql
exception is?
Regards
--
________________________________________
Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus_logan@data3.com.au
BLOG www.anguslogan.com
________________________________________
"AC" <AC@discussions.microsoft.com> wrote in message
news:57063790-3E3F-420B-8DAE-00B99E807CE7@microsoft.com...
> Is it possible to set the value of a custom property of type select? I
have
> a handful of custom props with True/False as possible values. I need to
be
> able to set it via the PAPI. I have had no problems assigning the custom
> property one of my values using:
>
> myChannel.CustomProperties["MyProperty"].Value = "True";
>
> When I'm trying to do it, I'm getting ODBC errors... specific from the
stack
> trace:
> [CmsServerException: Server ODBC error. Contact the site administrator.]
> Microsoft.ContentManagement.Publishing.CustomProperty.set_Value(String
value)
>
> Not being short here... I know I can set the values from the WebAuthor but
> it's not possible in this case. I need to be able to do it through the
PAPI
>
> -AC
| |
|
| OK... little background into my NNTP life story: I spend quite a bit of time
investigating an issue... as a last resort I throw a post to the MS NNTP
groups.... only to find a resource 5m later. I was in the midst of reading
that massive 20+ thread Mei started. Jumped over to her blog and saw the
latest post. Needless to say I did a global solution search for any
CmsApplicationContext or CmsHttpContext instances and made sure I Disposed
of them... still having problems wiht my custom props... but not sure if
it's related to the fact they are of type SELECT. I'll post my results.
BTW: Congrats on MVP Agnus. Just subscribed to your blog... been a follower
of Stephan's writtings for a while. Looking forward to checking out their
book... and writing more about my CMS tid-bits on my blog.
-AC
"Angus Logan [MVP]" <angus_logan@data3.com.au> wrote in message
news:%23eeB4Z%23qEHA.2856@TK2MSFTNGP10.phx.gbl...
> Hi AC,
>
> See
> http://groups.google.com/groups?hl=...br />
40phx.gbl
> and
> http://meiyinglim.blogspot.com/2004...ror-solved.html
> to verify its not the same issue - because there is an obscure resolution.
>
> (Mei Ying - if you are watching does this look the same?)
>
> Can you also run SQL Profiler on the sql server to see what the sql
> exception is?
>
> Regards
> --
> ________________________________________
>
> Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
> Product Specialist
> Microsoft Application Solutions
> Data#3 Limited
> E angus_logan@data3.com.au
> BLOG www.anguslogan.com
> ________________________________________
>
> "AC" <AC@discussions.microsoft.com> wrote in message
> news:57063790-3E3F-420B-8DAE-00B99E807CE7@microsoft.com...
> have
> be
> stack
> value)
> PAPI
>
>
| |
| Mei Ying [MVP] 2004-10-07, 2:55 am |
| Ho boy, it sure does sound familiar.
*That* error message is displayed for any type of
exception raised when updating/querying the database.
Yes, try running the profiler to see if it's a locking
issue or something else.
regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---
>-----Original Message-----
>OK... little background into my NNTP life story: I spend
quite a bit of time
>investigating an issue... as a last resort I throw a post
to the MS NNTP
>groups.... only to find a resource 5m later. I was in
the midst of reading
>that massive 20+ thread Mei started. Jumped over to her
blog and saw the
>latest post. Needless to say I did a global solution
search for any
>CmsApplicationContext or CmsHttpContext instances and
made sure I Disposed
>of them... still having problems wiht my custom props...
but not sure if
>it's related to the fact they are of type SELECT. I'll
post my results.
>
>BTW: Congrats on MVP Agnus. Just subscribed to your
blog... been a follower
>of Stephan's writtings for a while. Looking forward to
checking out their
>book... and writing more about my CMS tid-bits on my blog.
>
>-AC
>
>"Angus Logan [MVP]" <angus_logan@data3.com.au> wrote in
message
>news:%23eeB4Z%23qEHA.2856@TK2MSFTNGP10.phx.gbl...
8& selm=7fc601c4958f%2464768f50%24a301280a%
40phx.gbl[vbcol=seagreen]
odbc-error-solved.html[vbcol=seagreen]
obscure resolution.[vbcol=seagreen]
same?)[vbcol=seagreen]
what the sql[vbcol=seagreen]
00B99E807CE7@microsoft.com...[vbcol=seagreen]
of type select? I[vbcol=seagreen]
values. I need to[vbcol=seagreen]
assigning the custom[vbcol=seagreen]
= "True";[vbcol=seagreen]
specific from the[vbcol=seagreen]
site administrator.][vbcol=seagreen]
Microsoft.ContentManagement.Publishing.CustomProperty.set_V
alue(String[vbcol=seagreen]
from the WebAuthor[vbcol=seagreen]
do it through the[vbcol=seagreen]
>
>
>.
>
| |
|
| Sure enough it worked... Disposing all Cms contexts fixed it.
-AC
"Mei Ying [MVP]" <anonymous@discussions.microsoft.com> wrote in message
news:3b1a01c4ac1f$04d3a780$a501280a@phx.gbl...[vbcol=seagreen]
> Ho boy, it sure does sound familiar.
>
> *That* error message is displayed for any type of
> exception raised when updating/querying the database.
>
> Yes, try running the profiler to see if it's a locking
> issue or something else.
>
> regards
> Mei Ying
> ---
> Blog: http://meiyinglim.blogspot.com
> Contact: meiyinglim@hotmail.com
> ---
>
> quite a bit of time
> to the MS NNTP
> the midst of reading
> blog and saw the
> search for any
> made sure I Disposed
> but not sure if
> post my results.
> blog... been a follower
> checking out their
> message
> 8& selm=7fc601c4958f%2464768f50%24a301280a%
40phx.gbl
> odbc-error-solved.html
> obscure resolution.
> same?)
> what the sql
> 00B99E807CE7@microsoft.com...
> of type select? I
> values. I need to
> assigning the custom
> = "True";
> specific from the
> site administrator.]
> Microsoft.ContentManagement.Publishing.CustomProperty.set_V
> alue(String
> from the WebAuthor
> do it through the
|
|
|
|