Hi everybody! I have my own kind of server that for each client keeps an oledb connection opened. It also uses a thread pool for serving the clients. Now let's say the connection between my server and SQL server breaks for whatever reason. While it's down if my server attempts to do anything with the database it obviously fails. Then network issue gets solved. If my server attempts to continue manipulate the same oledb connection - it still fails. If I reconnect it fails anyway as long as there are those other olddb connections for those other clients of mine. Only when all oledb connections are closed I can start connecting successfully to the SQL server. It seems that in multithreaded/same exe session environment all oledb connections must be closed and reopened in order to recover. Is that true? Or is there a better way to force oledb to revive connections? Please help! Thanks a lot in advance.
CherezZaboro
Posts
-
OLEDB network failure recovery problem. -
How to intersect GraphicsPaths?Subj. I know one can make a region out of
GraphicsPath
which has methods likeintersect
,exclude
,xor
,union
etc. that allow to combine regions in various ways. But can I do the same withGraphicsPath
itself somehow (it doesn't have anything similar)? Regions are problematic since one can only fill it. Can't draw it and it doesn't pay attention toGraphics.SmoothingMode
andGraphics.CompositingQuality
. Let's say I have a polygon in a GraphicsPath. I want to cut an oval shape out of it on a side. Please help! -
indent XML and keep cdata sections?Hi all! Using MSXML 6. 1. So I have a DOM. I add CDATA section. I save. I get xml with in it but no indentation. - we know DOM doesn't "pretty print". Ok. 2. Now I add ISAXXMLReader/IMXWriter pair to handle formatting of my output xml from DOM and get indentation but CDATA section declaration is lost. I mean in the out put I get: my data here So how do I keep CDATA section declaration? Who losses it? The writer? The reader that reads DOM? :confused: Thanks a lot in advance!
-
resources in exe?Thanks for reply. Sure I can store things anywhere really. There's always a set of different approaches to anything. I just want to get the answer to this particular question. That's all.
-
resources in exe?Chill out, man! I'm not firing complains toward anybody, especially you since you don't know... If unhappy, fire back your complaints through UN... That was helpful. :zzz:
-
resources in exe?Well in regular Win Apps (non .NET) you can change resources just fine with a resource editor without having to recompile the exe. But so I guess in .NET you can't. What's the point of the resources then (besides reusability)? And why are there some resources in the exe that are visible in resource editor and others not?
-
resources in exe?Sorry, but I got very basic noob question: When I add a string to resources of a .NET win app on "Resources" tab in Properties of the project and I can use the string in code like so: "Properties.Resources.str" instead of hard coding the string in, right? Why can't I see the string in the executable itself (with a resource editor)? I need to be able to change the string in there without recompiling. Thanks a lot!
-
Exception handling....Excuse me for a quick noob question: Let's say a component of my C# application throws and exception. I want to catch it and handle it, but! I have
try...catch
in program.cs around the wholeApplication.Run(new FormMain());
and yet the system itself somehow pops the "application error" dialog with the whole backtrace and all. I'm guessing it's catching the exception sooner somewhere handling my FormMain execution. Where would I then place the whole form wide exception handling to intercept it before the .NET code? 3.1415 -
Firefox 2 Beta 2 released [modified]why does it say "beta 1" on that download page?
-
How to match several different elements in the middle of XPath?Consider this xml:
<rrx id="someother">...</rrx> <rrx id="Zones"> <f name="NM"> <p name="xoxoxo"/> </f> <s name="GB"> <p name="xexexe"/> <p name="xaxaxa"/> </s> <a name="SP"> <p name="hmhmhm"/> </a> <b name="Alien"> <p name="opsops"/> </b> </rrx>
I need to select all "p" elements in "f","s" or "a" with a given "name" but not "b" which are in "rrx" with particular "id". So I'm trying to come up with or statement for f,s,a in the middle of XPath. Using XSLT 2.0 and Xpath 2.0 this works fine: //rrx[@id='Zones']/(f|s|a)[@name='GB']/p - I should get xexexe and xaxaxa and if //rrx[@id='Zones']/(f|s|a)[@name='SP']/p - I need hmhmhm But good old 1.0 says it's invalid. That () are not allowed there. How else would the XPath then look? :omg: :zzz: :doh: -
XPath syntax to find all nodes that don't have some attribute at all? [modified]Oh, that's great! Thanks a lot! Works!:-D
-
XPath syntax to find all nodes that don't have some attribute at all? [modified]Excuse me for this quick noob question. Let's say I have XML:
<a name="a1">text</a> <a>text 2</a> <a name="a3">text 3</a>
What's the XPath syntax to locate that secon "a" element that doen't have the "name" attribute? -- modified at 12:42 Tuesday 1st August, 2006 -
help! want to use XslCompiledTransform..Sorry for bumb nood question. I can't figure out how to transform an XML that I have in a string variable (not a file) using XSLT that is also in a string (not a file) and get the result as a string as well? All I see there is "Load" methods which take paths to files or XmlReader (which I'm not sure how force to use my strings) or some other wierd stuff. Please help!
-
using .NET XslCompiledTransform?Sorry for bumb nood question. I can't figure out how to transform an XML that I have in a string variable (not a file) using XSLT that is also in a string (not a file) and get the result as a string as well? All I see there is "Load" methods which take paths to files or XmlReader (which I'm not sure how force to use my strings) or some other wierd stuff. Please help!
-
multithreading problemSo I dropped a backgroundWorker on my main Form, named bgWorker and added two even handlers:
private void OnBtnExecute(object sender, DoWorkEventArgs e) { bgWorker.RunWorkerAsync(); } // this is second thread proc as I understand it and while I'm here main threads UI is not // responsive private void bgWorker_DoWork(object sender, DoWorkEventArgs e) { // oDCRR is the COM object that is created in main thread and in this second thread // does something very long in the ExecuteEx e.Result = oDCRR.ExecuteEx(); } private void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { // here I process results - this is executed in the main thread again... }
-
multithreading problemWait. So I don't get it. You manipulating the UI from the second thread? But my second thread is sitting in a COM call. How can it do anything else? You lost me :confused:
-
multithreading problemOk. I have an app in C#. It uses a com object in main thread. Then there is a button which calls a method in that com object that takes a long time. So I added a thread (backgroundWorker) which calls that function on that COM object. Trouble is that while the worker thread is working the main still is not responsive! Why is that?! Please help!
-
mutlithreading problemOk. I have an app in C#. It uses a com object in main thread. Then there is a button which calls a method in that com object that takes a long time. So I added a thread (backgroundWorker) which calls that function on that COM object. Trouble is that while the worker thread is working the main still is not responsive! :confused: Why is that?! Please help!
-
Mysterious error dialog on exit....but shouldn't they be disposed when the applciation quits? what is the GC for then? In any case I think I do set them to null and even call ReleaseComObject - no help :((
-
Mysterious error dialog on exit....But exception seems to pop up after
main
in - when GC is collecting - i'm thinking - and there's no way to trap that.