Chandler Chao's Q&A profile
Visual Studio 2008 (Pre-release) How can i define a string tables in WPF project
How can i define string tables as resources in WPF project These string tables are used to localize the application. What can i do to add some CultureInfo into these string tables How to localize the application with these string tables Thanks If I understand you right, you are building your app with UICulture set to en-US. Then generating zh-CN resource dll. Correct Can you confirm that you have en-US listed as the ultimate fallback locale Add (or uncomment if created within VS) this line to Properties\AssemblyInfo.cs: [assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] This way, when the app runs on any locale not ...Show All
Windows Forms Autocomplete
I have this function, i try to have an autocomplete function, where when the user types a number it will go to the database and pulls the right Login. I am new and first of all get an overload on the SQL statement. Thank you in advance for your help Al private string GetOptions(string match) { this._retStr = ""; string strConnection; strConnection = "Data Source=source;Initial Catalog=APR;User ID=test;Password=test"; SqlConnection sqlConn = new SqlConnection(); SqlDataReader sqlDr = null; try { SqlCommand sSql = new SqlCommand("SELECT userLogin FROM Admin WHERE userLogin = '", match, ";", sqlConn); sSql.Open(); sqlDr = sSql.ExecuteReader(); } ...Show All
SQL Server (Select All) Checkbox As Default
All, When creating a dynamic parameter list from a query, Reporting Services graciously provides a "(Select All)" checkbox. How can I select this checkbox by default so that when a user generates the report, all of the values are selected Thanks The "select all" item is just a UI concept at this point. You could setup a default value for the report parameter that contains all values of the valid values list - but in that case all the checkboxes for individual items would be pre-selected, but the "select all" would still not be pre-selected. -- Robert ...Show All
.NET Development XslCompiledTransform.Transform very slow
XslCompiledTransform is taking more time to transform xml file using xslt files. XslCompiledTransform.Load() , loads and compile xslt faster, but XslCompiledTransform.Transform() is taking more time to transform then using XslTransform class. I have C# code in xslt files for data manipulations and sometimes xml files may be big in size. The memory consumption the Transform method has depends on the size of the XML input and the size of the transformation result, it builds an XPathDocument in memory for the source tree and transforms that to a result tree that is being serialized. ...Show All
SQL Server Flat File Connection manager throws error when a column gets added to the flat file
Hi, I have a situation where a tab limited text file is used to populate a sql server table. The tab limited text file comes from a third party vendor. There are fixed number of columns we need to export to the sql server table. However the third party may add colums in the text file. Whenenver the text file has an added column (which we dont need to import) the build fails since the flat file connection manager does not create the metadata for it again. The problem goes away where I press the button "Reset Columns" since it builds the metadata then. Since we need to build the tables everyday we cannot automate it using SSIS because the metadata does not change automatically. Is there a way out in SSIS ...Show All
Visual Basic How does this work?
Can someone explain how the IDE does this, so that I can make my own code to perform the same type of operation. If I create a connection to an access database, then I create a dataset for specific information, I can bind data to a combobox and it will fill the combobox with the information that I want. I can do this in code with a datagridview, but not with a list box, or combobox, or textbox (when i say I can't I mean I can't, not that it can't be done, just to clarify) Any help documents, forum topics, or other sources to learn how to do this is greatly appreciated. If someone needs to understand more about what I am trying to do exactly, please ask and I will explain it to the best of my ability. I don't want anyone to write the code f ...Show All
Visual Studio Express Editions Problem compiling multiple file application
Hi, I am trying to compile my code from several small files, as it was getting unweildly in a large file. I ave simplified my problem somewhat, and if I could solve this example the rest may flow. file 1: aaa.hpp #ifndef AAA_H #define AAA_H #pragma once class aaa { public: aaa(char *str); void setFile(char *str ); int record_count() ; private: char filename[256]; // filename of the data file for the data int numrecords; } ; #endif file 2: aaa.cpp #include "aaa.hpp" class aaa { public: aaa(char *str) { // Constructor std::cout << "\n\n----------\nData for:" << filename << "\n" ; } ; void setFile(char *str) { strcpy_s( filename, str ); // store ...Show All
Visual C# Using private constructors in embedded classes
Hi. I have a pretty simple question, though I don't know if it has a simple answer: I would like to define a class-within-a-class such that the embedded class can only be created by the outer class, but once created can be accessed publicly (similar to a factory pattern): class A { public class B { private B() { ... } } public B CreateB() { return new B(); } } This doesn't work as written, I get A.B.B() is inaccessible due to its protection level, and I get "inconsistent accessibility" errors with any other configuration I try. Is there some other protection level that will allow B.B() to be accessible to A, but not to anything outside of A Also, I'm not super clear on this "inconsistent accessibility" co ...Show All
Visual Studio 2008 (Pre-release) Possible Bug about Bubbled Events and Focusable
Looks like I got to the root of the problem. In my hierarchy (I've made a post about it recently) there are 3 controls: Grid (Top), ScrollViewer (Middle) Grid (Bottom). I'm subscribed for MouseDown of the Bottom, but when I click on the Top nothing happens. After hours of investigations I found that the culprit is.Focusable property of the Middle man –ScrollViewer. Being set to True by default, it prevented my ScrollViewer from both Receiving & Routing of my Bubble MouseDown event. Once I set to False, it starts working. What is really interesting, that the actual value of Focusable property of any of my Grids doesn't make any effect. I do realize that ScrollViewer is a bit of a special control, in ...Show All
SQL Server Any difference between SQL Server 2000 and MSDE 2000?
I am creating an install program and I'm wondering if there is a difference between SQL Server 2000 and MSDE 2000 Do they have different entries in the Registry From the documentation that I've read it seems as if they are one and the same. However, if someone knows how to differentiate between them in the Registry it would be greatly appreciated. Thanks ...Show All
Visual J# Embedding Java in C# Project Library
Hi, I have a C# solution (.NET 1.1) where someone has integrated a java application source files in a library project. Just for the record this application is fop 0.20.5. Currently I need to adapt this solution to use the latest version of fop (0.92beta). When integrating the files and compliling I get many java errors in the imports. Some examples: import java.awt.geom.Point2D; import java.awt.color.ICC_ColorSpace; import java.io.FileFilter; and some others... Can someone help me out What am I missing I have in the references vjslib and also downloaded VJSSupUILib but I still get all these errrors..... Hi. Thanks for the answers... This whole thing is too new for me. Is it possible that using a ...Show All
SQL Server how to modify data in cube.
This may be a dumb question. I want to know from where i can modify data in write enabled cube. I could not get any edit mode for the write enabled cube. Any help would be greatly appreciated. Thanks Anil Look here: http://www.mosha.com/msolap/util.htm . Check the header Excel XP Add-ins - Sample code for add-ins in Excel XP by Tom Conlon as shown in TechEd presentations HTH Thomas Ivarsson ...Show All
Windows Forms How to create and Invisible Groupbox
I am creating an application for a Tablet PC that has a flash movie playing in the background and looks for input from the user (from a writing area I have defined in a groupbox on the main form). I am curious how to make this groupbox invisible but still usable so that I can show it and unshow it without anyone knowing the difference and it will still collect the pen input. Thanks! I tried to create a form within a form using the MDI functions but the only thing I get it to do is Form2 replaces the contents of Form1 and then nothing else works. I am not quite sure how to code a new form (Form2) to appear at the bottom of the parent form (Form1) that is floating on top of the contents of the parent form. Have any suggestions or ...Show All
Visual Studio 2008 (Pre-release) How to set infinite activity timeout on netTcpBinding?
hi, I have a service that has an endpoint that uses netTcpBinding, the problem is that my proxy dies out after 10 minutes (inactivity timeout) I searched the forum and found some threads saying that the the element "reliableSession" should be set this way: < reliableSession inactivityTimeout = " infinite "/> but it didn't work (actually it ignored any value that I used) and the proxy still got into faulted state after 10 minutes, is there any other solution (I dont want to use "ping" to the server every X minutes) thanks in advance, ofer. Hi, thank you, it was very helpful, now I am able to control the recieve timeout of the cl ...Show All
SQL Server Data transfer from ODBC to Sql Server
Hi Can Anybody tell me the different ways of transfering data from ODBC Layer to SQL Server using C#. I want to transfer using Threads,means by running 4 threads, I need to transfer 4 tables at a time. Though we have SQLBulk copy Object in .NET it's not useful in multi threader env. Can anybody help me in this. Thanks Jamie. Previsoly in Sql Server 2000 I used the DTS tool to transfer, No problem for me. To learn abt SSIS I placed this thread in this forum. Is learning a Crime Hope you people will encourage us to learn more. ...Show All
