Answer Questions
Mr Pro Tools Accented Characters
Hi, I have a question for accented characters. For example, when I am doing regular expression match, how can I match "A" against all accented characters "AAAAaaaaaaa" I have tried all possible options in RegexOption enum, but nothing works so far. I know in SQL Server full-text search you can setup accent insensitive, so I guess I can do the same thing .NET. Could someone please tell me how. Thanks, Ning Thanks for your input. However, this solution causes huge problem, now if I want to match a plain "a" with all "AAAA" it matches all accented characters "AAAACEEEEIIIIDNOOOOOOUUUUYTsaaaaaaaceeeeiiiienoooooouuuuyty". If there also a solu ...Show All
m14cus Restore a control to it's default state after a postback.
I've spent all afternoon trying to figure this out so if it's simple I'm going to feel really stupid. But basically this is an example I have a form that looks like this. < form id ="form1" runat ="server"> < div > < asp : TextBox ID ="_tb" runat ="server" EnableViewState ="False"> Hello World </ asp : TextBox > < asp : Button ID ="B1" runat ="server" EnableViewState ="False" Text ="Button" /> < asp : Button ID ="B2" runat ="server" EnableViewState ="False" OnClick ="Button2_Click" Text ="Rest" /></ div ...Show All
Kevin Rodgers XML Serialization to disk: best approach?
What's the recommended approach for saving information to disk these days I'm using c# for a stand-alone portfolio analys/automated trading system (Interactive Brokers rules!). I want to be able to save a whole bunch of stuff to disk: investment history, equity, option and currency quotes, etc. This has nothing to do with ASP.Net, but there's no forum entitled "C# and XML Serialization". In the past I just had each class write itself out using write( XmlTextWriter writer) and read itself in using read( XmlTextReader reader) I had to write all the code to read/write all individual data. I'm wondering if this is still the best approach or if there's something better now. It seems like using XMLSerializer stuf ...Show All
svarghese How To Store Products with Attributes
Hello I am building an application and website, However 1st of all I obviously need to design the database, and i was just woundering about the best way to do some things. For example my application/website must allow customers to purchase products, these products can have 0 or many attributes, such as size, flavour, colour etc. Which is the best solution to tackle this in regards of database table design This is the setup atm, but i would like some idea's/opinions Products Table - holds products information, and a base price information Attributes Table - holds many different attributes, such as name, description etc. ProductAttributes Table - This holds 2 foreign keys and some other information. ProductID A ...Show All
Tony Antonucci IEnumerable.GetEnumerator()
Greetings, I have some questions on IEnumerable.GetEnumerator(): 1. Should each invocation return a distinct enumerator object 2. If so, should the enumerators keep their state in sync or independent of each other 3. If independent, can distinct enumerators (returned by the same method) enumerate the underlying collection in different orders MSDN Lib seems to have left these unspecified, so maybe it's all up to the method implementer, but since the interface is tied to foreach sematic, perhaps there are specific answers/rule for the interface If MSDN Lib specifies the answers to these, I'd be grateful if you can point me to the URL. Thanks for any info, Dasa [... deleted the bit ...Show All
Sianspheric Problem Enumerating Sql Server Using System.Data.Common namespace
Below is the code that I'm trying to use to enumerate SQL Servers on a local network. It seems to work fine for getting the host name and the instance name for SQL 2000 and 2005 but with SQL Express it only returns the host name and no other information. Can someone help me with the code DbProviderFactory dbFactory = DbProviderFactories .GetFactory( "System.Data.SqlClient" ); if (dbFactory.CanCreateDataSourceEnumerator) { DbDataSourceEnumerator serverEnumerator = dbFactory.CreateDataSourceEnumerator(); if (serverEnumerator != null ) { System.Data. DataTable dt = serverEnumerator.GetDataSources(); string [] serverNames = new string [dt.Rows.Count]; for ( int i = 0; i & ...Show All
rwerner How do you Un-Set a bit field (flag enumeration)...?
Ok, we all know how to SET an enumeration with "OR" and we all know how to check an enumeration with "AND", but g.d. how do you clear (unset, remove) a flag < Flags () > _ Public Enum LineOutputOptions TraceLevel = 2 MemberPosition = 4 TreeifyOutput = 8 SourceTypeName = 16 End Enum This is working only if it is sure that the flag is set. If the state of the bit is unknown, you have to set it first with an "or": Code Snippet options = options Or LineOutputOptions.SourceTypeName Xor LineOutputOptions.SourceTypeName Tobias Use the Xor operator (^ in C#): Dim options As LineOutputOptions ...Show All
Jim Carnicelli SQL Data usage? Need resources!
Hi. I will start off by saying: I have never used a database for any bit of coding I have ever done! I am creating an asp.net (1.1) web app, which requires some data to be stored. I can't use Xml because quite frankly there is too much data and it can't be that slow. I have managed to get the connection string and the SqlClient.SqlConnection working properly. I know need to know how to commit data to the database, and retrieve data. Does anyone know of any resources I could check out Any help is, of course, greatly appreciated! Thanks so much! That was very helpful! Hi, Here's a tutorial. http://www.sitepoint.com/article/introduction-ado-net Search for ADO.NET in msdn or you favorite search ...Show All
walter_verhoeven Assembly not found when calling C# from my C++ module
Hi, I have a solution with several projects ranging from C# to mixed C++ (managed and unmanaged). Inside my managed C++, I am able to add a C# module as a reference, build, and link properly. However, at run time, when I try to use any type of the C# assembly (the system will load the dll at that point), an exception is thrown saying that the C# dll module can not be found. The C# dll is sitting in the same directory as my C++ module. I also checked that the C# module doesn't have any other reference that may be missing. It's a simple C# assembly. Is there any issuewith C++/C# interop that I'm missing Any project settings I need to set Thanks! Internet Explorer is the executable. IE loads ...Show All
Jamie Thomson Is it possible to run several instances of an EXE as new threads in the same address space
I would like to share the address space (objects and static classes) between several instances (maybe a hundred at once) of one EXE (or several EXEs sharing a set of classes). Each program instance should run as its own thread in the single global adress space. The first instance (or some other mechanism) should keep the "address space" and hence the datastructures "alive" until it is explicitely terminated (Similar to the Module concept in Oberon for example). This would allow the implementation of complex CGI applications without unnecessary overhead for internalizing data-structures while at the same time simplifying synchronization. I know several workarounds with traditional IPC for the problem at hand, so the ques ...Show All
Paul Monaghan FileIOPermission ACL Question
Hi, I've got myself very confused about the usage of the FileIOPermission.Demand method. For example; If I supply a path that I do not have "write" permissions to via ACL: FileIOPermission fileIOPermission = new FileIOPermission ( FileIOPermissionAccess .Write, @" \\server\path\path2\path3 " ); fileIOPermission.Demand(); The demand does not fail as I expected. I've search the forum and found the following: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=149239&SiteID=1 I amended my code to no avail. I've obviously got the wrong end of the stick about how this works! I was assuming it worked by looking at the permissions on the folder or file. Does it just evaulate the assembly evidence ...Show All
BLueDeViL Streaming Sql Server Opening Connection
So im trying to figure out a way to streamline establishing a connection with a sql db. In other words I don't want my app to 'hang' while its attempting to connect because the db might not be online or the users computer is not properly connected. Either way I wouldn't want the app to hang. Any ideas doing any form of connection will result in a delay, especially databases since they are expensive to work with. you could spin up another thread to do your database work, which will prevent the main thread (UI) from being unresponsive. Hmm i was thinkin bout that, thanks ...Show All
Jose Diaz Adding an item to the dropdown list inside a datagrid populated by DataSet
I have a DropDownList inside a Datagrad which I am populating with DataSet. Here is the sample code: <asp:DataGrid id="dgOutputNoMajor" runat="server" AllowSorting="True" AutoGenerateColumns="False" OnSortCommand="SortColumn" CellSpacing="5" CellPadding="3" BorderWidth="1px" cssClass="tablefont"> <Columns> <asp:TemplateColumn SortExpression="login" HeaderText="LoginID"> <ItemTemplate> <asp:Label ID="lblStudentID" Text='<%# DataBinder.Eval(Container.DataItem,"login") %>' runat="server" /> </ItemTemplate> </asp:Temp ...Show All
Jitusj Front Page extensions error = IIS 6 Compatibility = no dice!
Hello, I have been trying to create a webservice on Vista with VS 2005 to no avail. I currently get "error messages about FrontPage Server Extensions are not installed". I did read the http://msdn2.microsoft.com/en-us/vstudio/aa964140.aspx FAQ which seems to describe my problem after following the instructions to add "IIS Compatibility layer to IIS7". So I went to Add Program within Control panel (add Windows Features) select IIS 6 Management Console. I made sure there was a check mark. I rebooted and still I find this error when attempting to create a web service. So I am not sure where to get this layer. The document does not indicate nor does any thing on the web. Advice would be appreciated. Thanks Chris ...Show All
Tanmaya Where to store the users?
Hi! I'm building a WinForms (c#) application that will communicate to an SQL server on the same local network. However, the SQL-server will not be part of the same domain as the users (or the users machines). So, I'm a bit unsure where it will be best to store my users 1 - Store them in the Active Directory that the SQL-server belongs to. I guess I can do some kind of authentication from the WinForms app to active directory, but is there some way of doing this without sending the username and password in clear text Guess I'll still have to create SQL-accounts for the users as well, as long as I do not impersonate the application as the windows account Impersonation also seems to need to send the username and password in clear text. 2 ...Show All
