sudhirvn's Q&A profile
SQL Server Using Insert into to insert data with apostrophe
Hello, In SQL 2000, when using ActiveX script to DTS pack to insert data to table, I construct a statement that use the following. Insert into TestTable(country, organization) values ('Italy','Italian gov't') It failed because of apostrophe within the data string. I tried to use "set quoted_identifier off" and encase data in double quote, it doesn't work. How can I work around this Thanks Double the single quote in the string literal to escape the quote. 1> insert into tbl1 values ('Italy', 'Italian gov''t') 2> go (1 row affected) 1> select * from tbl1 2> go c1 c2 ---------- -------------------- Italy Italian gov't (1 row affected) ...Show All
Software Development for Windows Vista Custom activity, xmol and rules
I've created a custom activity and added it to a workflow. The workflow is save as a xoml file, and I create workflow instance by loading the xoml. It works fine until I add some rules in workflow, it throw an exception when creating instance. Exception: The workflow failed validation. Error Text: Activity 'ifElseBranchActivity1' validation failed: Property "Condition" has invalid value. Condition expression is invalid. The field "testActivity1" on type "Test.TestWorkflow" does not exist or is not accessible. In the condition, I type "this.testActivity1.Field1 == true", I want to check a property of an activity inside the workflow. No, it just means instead of havin ...Show All
.NET Development System.Threading.Thread & ThreadPool
Hi, All! If it’s possible please answer me on one question: ThreadPool is created on application start but it doesn’t work until I call ThreadPool.QueueUserWorkItem () method. But if I don’t use ThreadPool and use System.Threading.Thread myThread = new Thread(new ThreadStart(OnStart)); myThread.Start(); then whether will be myThread belong to default ThreadPool Or it will be independent from everyone Or all of threads must belong to created ThreadPool always In http://blogs.msdn.com/yunjin/archive/2005/07/05/435726.aspx Yun point that all of assesible for user-code thread belong to ThreadPool Please let me know your meaning about this problem. Anatoly Rozhyn , Ukraine Thank you ...Show All
Visual C# How to know whether an Excel file is open and close it automatically?
In my application, I should write data to an Excel file. I can pause the application, and go to open the Excel file to see the data I received. However, when I start the application again with the Excel file open, there will be erros shown: "My application" has encountered a problem and needs to close. We are sorry for the inconvenience. It seems the application can not write data to an Excel file with the file is open...(no such problem with text file) Q1. How to check whether an Excel file is open or not Q2. How to close the Excel file automatically and then write data to the file again Thanks in advance! just thinking at the top of my head for now, not guarenteed to work but have you tried to specify ...Show All
Visual Studio Express Editions Memory Adress of Registry Hives
Hi Is it possible to know where is the registry loaded into RAM I need to have read only access to the registry. I want to use the In-memory pages of regsitry for that purpose Can perfmon help in any way for this Any point of thought will be of great use. Thanks Sumit The registry is not loaded in RAM, it is stored on disk. The disk cache will keep the most recently accessed registry sectors in RAM but that is not accessible to a user mode program. Nor could you find out what portions are being cached. Or how disk sectors map to hives and keys. You have use the API, there are no shortcuts. ...Show All
Visual C# windows service error
Dear all, I'm very new to windows service programming and I keep getting the same error while trying to install. I followed the setup on the MSDN walk through of creating a windows service but still got an error. http://msdn2.microsoft.com/en-gb/library/aa984464(VS.71).aspx The error i get during the setup process is: 'An exception has occurred during the install phase. SystemComponentMode.Win32Exception:the account name is invalid or does not exist, or the password is invalid for the account specified' Can anyone help me is it a permission problem do I have to add some user name and password information to my program The service runs as a local service. thanks ...Show All
SQL Server Performance and Execution Plan
Performance !!! Hi! I am trying to execute an stored procedured that have already been used in another server (the test server ) but it takes 25 hours and in the another server takes just 40 minutes. !! I have reviewed the indexes, statistics an so on, I have exactly the same quantity of data but cannot explain why does it takes so long in the server that is supposed to be the better one. When I show de Execution Plan in the Query Analyzer in one server I get: - Select (0%) - Compute scalar (0%) - Remote Query ( 100 %) When I executed in the another one I get: - Select - Compute Scalar - Nested Loops Left Outer Join ( 80 %) - Merge Join / Right - Remote Query - Sort - Hash Match Right … ...Show All
SQL Server How cany I publish 1 table from an attached database?
Hello, In my vb.net application, I have an attached database called dbMaster with the following tables: tblCustomer, tblProducts, tblUsers In visual studio 2005, is it possible to publish only one table My problem is, is that I want to send my end users updated data from my tblCustomer, and am finding that on my test laptop, if I publish dbMaster, it sends all tables when I just want one to be sent. Thanks in advance. I'm working on a mobile application. I want to have a desktop database that is kept in sync with a handheld database, with updates occurring on both ends. To keep them synchronized, I am investigating the use of both RDA and Replication. I've gotten RDA to work, but have foun ...Show All
Visual Studio Express Editions How to handle device manager through vb.net
I want to create a program which should include an option of disable and enable a USB device. Another feature is to allow for read and/or read write mode. How to handle device manager through vb.net and the solution of above problem. To do this kind of stuff, you'd have to do some pretty advanced SDK style programming involving the Plug & Play architecture. There's nothing in the framework. WMI has a few capabilities . Best place to get started is by posting questions in a Windows SDK newsgroup at www.microsoft.com/communities. ...Show All
Windows Forms identifying all child object's state?
Hi, I have developed a Business Logic Layer for my Forms Application. For all classes, there is 2 properties 'isPersisted' and 'isModified'. These properties allow the application to know when to Insert, or Update an object's data to the underlying DB. i.e. IF 'isPersisted' = False and 'isModified' = True then we insert. OR IF 'isPersisted' = True and 'isModified' = True then we update. i.e. in my Logic 'isPersisted' is True when the object has related data which exists in the DB, whilst 'isModified' means that the object's properties have been changed and will require either updating or inserting, depending on the state of the 'isPersisted' object. I have a Base Class which all my classes ...Show All
Visual FoxPro GRID HELP
hI! I HAVE PUT A GRID IN A FORM BUT THE CURSOR DOES NOT MOVE TO THE SECOND ROW.SO PLEASE HELPPPPPPP! also when i run this form a pop-up window come open with 3 options 1)do you want to add records in a parent table 2)do you want to add records in a child table 3) do you want to add records in both so i want this pop-up window to stop coming up when i add new record I take it that you have used the form wizard to build these forms because this is not native behavior. You would be better off not to use the wizards. There is too much baggage that comes along with them (as you are now discovering). ...Show All
Visual Studio September CTP: pubstructure.gif background not transparent
In the September CTP, the pubstructure.gif image doesn't have a transparent background. This applies to both the VS2005 and Prototype icons. — Eric — Yes and Michael reported this bug at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=737673&SiteID=1 . I will provide a fix by RTW. Anand.. ...Show All
Visual Basic Keydown
I am familiar with visual basic 6, and visual basic 8 is a bit of a jump for me. how do I do keydown events, and how does the keycode system work please give a code example of a keydown event on "enter", and the letter "A" thanks... Hi, Press Ctrl with the D for a personal message. :-) This Sub will tell you the keyCode, keyData and keyValue of most of the keys pressed. As is the "Q" key will quit the program. Just add two textboxes ( nothing else ) to a form and then paste this in just before the End Class statement. For the textboxes set their MultiLine property to TRUE and add a vertical scrollbar to each. make them about 200 x 100 each. Regards, ...Show All
Audio and Video Development Question about style:opacity behavior
Hi, According to chapter 7.6.3.3.2.41 of specification, style:opacity is applied to content elements. Exact description is the following: “The opacity property is used to determine how to blend the background color and marks of areas produced by an element with the current composite rendering.” HDiSim (ver. 061005-0100) doesn’t apply style:opacity to text – text is always opaque. At the same time opacity is applied to style:border . Should style:opacity be applied to text element in the following example Should style:opacity be applied to border What about " marks of areas ", what does it mean < div id =" Div1 " style:backgroundColor =" blue " style:opacity =" 0.2 " style:x =&qu ...Show All
SQL Server Database Engine Tuning Advisor gives non existent errors in SQL 2005
Hello, I am sure you have heard of Community server - if not you are just using it ;) I decided to try to optimise the performance of my site, run a trace and then DETA. And I am getting errors like these: What if the "Database for Workload Analysis" dropdown is way way way too small to see the entire database name If I have 50 databases there and they all begin with the same first 20 characters, that's all I can see. How could I possible choose the correct database name in the dropdown ...Show All
