Posts

how to write method that return datatable in CLR C#

Image
i have specific class (.dll) return datatable method , calling in clr below ,but have output result problem . // clr method  public static void dtmethodclr()      {     var dt = postbox.dtmethod("select top 4 name,state_desc sys.databases");     (int = 0; < dt.rows.count; i++)     {       if (sqlcontext.pipe != null) sqlcontext.pipe.send(dt.rows[i][0] + dt.rows[i][1].tostring());     }   } but when exec method result below the problem , 1 - column name not visible 2 - align not regular pipe.send(string) sending messages client, not resultsets. you need use 1 of other methods here:  sqlpipe class , either send individual records, or whole sqldatareader. david microsoft technology center - dallas my blog Visual Studio Languages ...

Need help with regular expression for Name validations

hi all, i need regular expression following requirements name validations. 1. name should contains atleast 1 alphabets. 2. may contains period, hyphen, apostraphe , space( may multiple not consecutive). eg: valid strings:  test t.te-test test test-test'test.test, .test invalid strings : test......test -. test----test i tried below one, no luck. ^(?!.*(.)\1)[\s.'-]*[a-za-z].*$ thanks in advance. hi, please try this: string pattern = @"^(?!.*(-{2,}|'{2,}| {2,}|\.{2,}))(?=.*[a-za-z])[a-za-z-\.' ]*$"; console.writeline(regex.ismatch("test", pattern));//true console.writeline(regex.ismatch("t.te-test test", pattern));//true console.writeline(regex.ismatch("test-test'test.test .test", pattern));//true console.writeline(regex.ismatch("test-test'test.test, .test", pattern));//false console.writeline(regex.ismatch("test......test", pattern));//fa...

Office Communicator Automation API

hi, is there way create more 1 conversation window simultaneously @ same time using office communicator automation api. also if created, how can identify coversation windows individually....? can 1 please let me know how this? thanks in advance, janani. yes of course can create more 1 windows simultaneously using automation api, can identify various windows noting window id (everything in microft windows has unique identifier - knows windows handler id). -monty aditi technologies, bangalore india Lync Server  ,  Unified Communications  >  Microsoft Lync Server SDK and Office Communications Server SDK ...

Controlling CacheItemPolicy properties from your config file - is it possible?

Image
with reference system.runtime.caching class in .net 4.0 seems possible set limited number of things in configuration file wit: name polling interval the amount of memory that cache allowed consume the percentage of memory needs hit before cache scavenged a sample section shown below: <system.runtime.caching> <memorycache> <namedcaches> <add name = "nameofmycache" pollinginterval = "00:05:00" cachememorylimitmegabytes = "0" physicalmemorylimitpercentage = "0" /> </namedcaches> </memorycache> </system.runtime.caching> however appears none of useful items (imho!) controllable config file. these options in cacheitempolicy class such absoluteexpiration, slidingexpiration , priority (i can understand how callback functions aren't exposed although expect see options in event these called) the question is, possible config file without going away , rolling own ...

Use a UserControl as the Content of a TabItem

hello, using sketchflow prototype project. project use tab control.  i'm trying understand best way prototype type of project. assumed creating usercontrol content of each tabitem best approach. however, not see how set content property of tabitem usercontrol. recommended approach? if not, recommended way create tabitems in blend? create root grid element each tabitem seems bit clutzy tool blend. thank help! figured out. it's pretty easy :) Expression  >  Expression Blend + SketchFlow

How do I deploy and publish a Expression Blend application?

i'm done on wpf application , have deploy , publish... thing when published using visual studio 2010 lot of resource files missing... way deploy or publish directly expression blend... or use of 3rd party softwares? that depends on need happen particular resource. check out "build action" section of page more information: http://msdn.microsoft.com/en-us/library/0c6xyb66.aspx Expression  >  Expression Blend + SketchFlow

Issue building .net projects with VS2008

hello, i posted this originally in wrong forum deleted , moved here think problem more vs2008 c# specific. if wrong forum please let me know. i have issue building .net projects in vs2008. i've googled , searched forums , can find issues close not quite what's going on me. on brand new project following error. task "csc"     command:     c:\windows\microsoft.net\framework\v3.5\csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:debug;trace /reference:c:\windows\microsoft.net\framework\v2.0.50727\system.data.dll /reference:c:\windows\microsoft.net\framework\v2.0.50727\system.deployment.dll /reference:c:\windows\microsoft.net\framework\v2.0.50727\system.dll /reference:c:\windows\microsoft.net\framework\v2.0.50727\system.drawing.dll /reference:c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll /reference:c:\windows\microsoft.net\framework\v2.0.50727\system.xml.dll /debug+ /debug:full /filealig...