rtaiss's Q&A profile
.NET Development DateTime.ToString (Day ordinal suffix)
Is there any way to specify that the ordinal suffix for the day number (st, nd, rd, th) should be used when using the ToString method For example, so I can format the date in the form "2nd January 2007" I know there are ways to do this manually, but I need a way to do it via the ToString method. Hi Barguast, There is no format specifier that gives you this result. If you want to have this kind of result, you will need to implement a function that receives a number as parameter and returns the string you need. Here is a reference to all the possible format specifiers: http://msdn2.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx Greetz, Geert Geert ...Show All
Visual C# Static fields, inheritance, and Reflection...
I'm trying to force a class that inherits from a base class that contains a static field to assign a value to this field. I'm not having any luck. For example, say I have a base class "Shape": public class Shape { public static string Description = "A shape"; } and I want to create a class that inherits from shape, but I want the new class to be forced to assign a value to 'Description'. Is this possible I know I can't use abstract or virtual along with static.. The reason for this is that I want to be able, when using reflection, to use the FieldInfo class to return the 'Description' of the inheriting class. I know I can assign a value to 'Description' in the constructor of the inheriting class, but the Typ ...Show All
SQL Server Question regarding sql server http endpoint
I have been encounter with error for some day already. i using nusoap (php) to connect to the sql server http endpoint, but it end up with problem to pass thru the security of sql server http endpoint over the internet (i had config the dynamic dns so that another pc can connect to my pc by using http.). What do you think Do you have any idea regarding this kind of problem nusoap (php) <> sql server http endpoint Thanks in advanced. Cheers, Winson ...Show All
Visual Studio Express Editions Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Hi, I Am NewB To C# Actually Converted From Java To C# Because Of My Final Year Project Needs Am Developing An Application For Remote Sharing On A Wireless Network, Using VNC# Lib, On Da Server App Due To Da Application Needs Am Using Da Libs Interop.ServerX & AxInterop.ServerX ... Da Thing Is While Debugging The Code I Get This Error Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) I Ave Searched Da Refrences From Da Diffeerent Forums On Da Internet & Ave Done Wat Ever I Came Across But It Didnt Helped :( Can Sum One Help Me In This ERROR Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Envoked By Da Code ...... this .Text = "Remo ...Show All
Windows Forms DataGrid Binding
Hi, I have Data in Array and that data I want to display in DataGrid. How to do that This is not from Database.. some other program is building this array and passing to my page.. I don't know the number of rows(values) in that array.. Suggest me.. Thanks Hey, Do this way Dim dt As DataTable = New DataTable Dim col0 As DataColumn = New DataColumn("Emp No") Dim col1 As DataColumn = New DataColumn("Name") Dim col2 As DataColumn = New DataColumn("Age") dt.Columns.Add(col0) dt.Columns.Add(col1) dt.Columns.Add(col2) Dim dr As DataRow = dt.NewRow dr(0) = "1" dr(1) = "John" dr(2) = "25" dt.Rows.Add(dr) Da ...Show All
Visual C++ mangled name
Is there any API to retrieve the address of a method (private/public) using the mangled name. the method is supposed to be a class member. we can know the mangled name from the .map file in VC++ 6.0 Please also suggest a method of using this in GCC. einaros wrote: Holger Grund wrote: And patching your private copy of a header is probably less of a hack than all of this assembly stuff. Hm If he was to change the header of the dll, but not the library itself, the linker wouldn't be able to match the function I very much doubt that. Granting friendship to a client of the class certainly doesn't change any function's mangled name. So if you have like cla ...Show All
Visual C# Debug Setting question - Stepping into DLL???
I'm sure this is just a setting that someone can point me to. For some reason, when I reference my dll in a new project that I had built inside an entirely new solution, and then step through the project, it steps into my dll!! I don't want any windows popping up showing my users my source code. How do I stop this from happening Actually this is a very useful feature for a devloper and it's not only .NET that does it, VC++ does it too. One example is that you start the project from outside VS, it crashes and you attach the debugger to it. When you attach the debugger it does not have any solution/project loaded but it's able to find the source if you have it on your machine. Perhaps I should explain how this really works. When you ...Show All
Visual Studio Custom editor coloring
I've managed to get custom colors working and my custom colors to appear in the options dialog list, but the editor windows are not always updated after the colors are changed in the VS options window. I have to exit and restart VS in order for the new colors to be used. The docs for Colorizable item allude to something more that needs to be done to support this. In the Remarks section: "The ideal place to construct an array of custom colors is in the constructor of your implementation of the LanguageService class. If you support customiztion of the colors, then you would initialize this array in LanguageService.CreateDocumentProperties after the DocumentProperties object was created." Why would I initialize this arra ...Show All
Visual Studio 2008 (Pre-release) Linq To SQL class designer problem
I watched Scott Guthrie's video on http://weblogs.asp.net/scottgu where he demos the new Linq To SQL class designer. He mentiones that one can create classes and let the designer create the tables in the database, which is great. I was trying to do that and failed. Does anyone have a link to a walk-through demo or something I created a very simple class diagram with 3 associations and 2 derived classes, 5 classes all together, I set the primary keys and the table names on all the classes. I then right clicked the diagram in the solution explorer and clicked "Run Custom Tool", then nothing... Any ideas Best regards Klaus Enevoldsen There is nothing to stop you from creating your ...Show All
SQL Server Different results for MDX queries when using Attribute Hierarchies
We receive different results for the follow 2 MDX expressions. The only difference is that the second parameter in the Where clause uses a separate dimension called Asset Class in the first query, whereas in the first it uses an Attribute Hierarchy dimension on the Asset dimension. The first provides the expected results which is the top 10 Equity assets, whereas the second returns just 3 Equity assets which belong to the top 10 assets overall. Can anyone explain this Using a cross join in the Topcount function works, but unfortunately ProClarity which we are using does not deal with this properly. Query 1 SELECT NON EMPTY { [Measures].[Value Base] } ON COLUMNS , NON EMPTY { TOPCOUNT( { [Asset].[Ass ...Show All
SQL Server db backup simple vs. full recovery mode
When we do a full database backup manually, we are seeing the trn file reflect the current date/time, but we are not seeing the mdf reflect the new date/time. And we are not seeing the transaction log file decrease in size. the recovery mode is set to full, do we need to change to simple to see both the mdf being backup'ed Hi, You can schedule half/hourly t-log backup to keep it in shape, how ever if its growing unpexctingly refer below thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1221599&SiteID=1 Hemantgiri S. Goswami ...Show All
Visual Studio Passing parameters to Crystal not working. Help.
Hi All I am simply trying to pass the company name string to my crystal reports. It looks really simple but I must be missing something because it does not work on any report I have tried it on. Below is the code I have tried. The commented out parts are trying to get it to work various ways I have seen on the forum. None of them work. The parameter seems to be setup corrently because if I try to use "CompanyBlah" instead of "CompanyName" I get a runtime error. I don't get any errors with the code below but the parameter is not passed as the box asking me to provide input pops up. Any and all help is greatly appreciated. Private Function btnDriverStatements_Print() DriverStatementsReport = New Dr ...Show All
Visual Basic visible = false, WM_SETREDRAW. suspend/resume layout oh my.....
The app I am porting from vb6 into .net 2.0 has about 20 usercontrols and 30 forms . They all go through some kind of initialization at application startup, depending on what the user was doing the app shut down last. It needs to reload in the same state where it left off and with the right combination of controls/dashboards, etc. In the MainForm .Designer.vb (SDI not MDI) splitcontainer controls, tab controls, menu and toolstrips are declared and then at the end of InitializeComponent, Resumelayout / Performlayout is done. IThe problem is in the MainForm's Load event when all the other controls are declared and instantiated. It takes a few seconds (machine dependent) to load everything and while all this is taking place, all the ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Uninstalling XNA GSE?
I cannot find how to uninstall the GSE. I've been getting the error you see below whenever I try to start a new game project :-( --------------------------- Microsoft Visual C# 2005 Express Edition --------------------------- Unknown error "-1". --------------------------- OK --------------------------- To uninstall XNA Game Studio Express, goto the Add/Remove Programs found within Control Panel. Just curious: Why are you trying to uninstall if you're trying to create game projects V ...Show All
SQL Server Flat File Source Problem...
I have a weird thing happening. I have an .csv file. When I try to load it into a table, I can do it easily in DTS 2000. But when I am trying to do it in SSIS 2005 with exactly the same settings (like Text qualifier, row delimiter etc.), I am getting an error: "The last row in the sampled data is incomplete. The column or the row delimiter may be missing or the text is qualified incorrectly." I looked at the file and it looks complete to me. What could be the problem P.S. DTS 2000 is on 32-bit Windows, and SSIS 2005 is on 64-bit Windows 2003 . Could that we a problem It is true that the parsing behavior in SSIS is very different from DTS 2000. DTS was very forgiving as Phil mentioned, and there ...Show All
