kiwilamb's Q&A profile
Visual Studio Express Editions DateTimePicker
i am using the datetimepicker and save the value to a DateTime variable. I am then sending the data to a file. I do not want the time to be sent. How do i accomplish this I only want the date to be stored in variable date, not the time. DateTime date = dateTimePicker1.Value; thanks you can use the date time ToString() method to just get the date itself. Example: string theDate = date.ToString("ddMMyyyy"); this will just return the date format you are after. Here is a list of the string custom formats you can use to get the date time string back in the format you like: http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx so your code could be: this.theDataTimePicke ...Show All
.NET Development Gen 2 Memory
Hi, I have a recursive loop which gets file info for folders. THe data is obviously huge and when I run the perfmon, I see that the Gen 2 Heap size is around a constant 250 MB. I assume that this will be a problem and if so how can I reduce this.. The code is pretty simple .. I have 3 main datatables that are class level variables I have a recursive loop which fills in these three tables with all the files and directory information.(I use the BeginLoadData, LoadDataRow,EndLoadData for this) and I finally update the DB. I get the OutofMemoryException at times. Now how do I fine tune this for performance Thanks in advance Soni Chris, Thanks for the update. In ...Show All
SQL Server Occasionally slow to connect to a sql2005 database
Hi We have a VB app talking to SQL 2000 and SQL2005 databases. Most of our clients use SQL2000, but the new ones we are deploying with SQL2005 Sometimes the app is slow in establishing a connection to the database when it is SQL2005. The provider is sqloledb. We never get this delay in SQL2000. Sometimes it takes seconds to establish a connection - this is even the case when the app is on the same machine as the database. We are using SQL authentication - always with the same connect string. Any ideas thanks Bruce I have the same problem, Win32::SqlServer perl-module to connect to MS Sql Server 2005 in some cgi-scripts. They run on the same server as the DBMS. It m ...Show All
Visual C++ Setting Up OpenGL
Hello! After struggling for way to many hours, I give up. I can't find a way to set up an OpenGL project in Visual C++ Express Edition. I'm following an OpenGL book, but it's pretty useless if you can't compile anything. I've tried going to Project->Properties->Configuration Properties->Linker->Input and added opengl32.lib & glu32.lib. But it doesn't help. This is the only code I use #define WIN32_LEAN_AND_MEAN #define WIN32_EXTRA_LEAN #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { return 0; } And the build errors are: ------ Build started: Project: OpenGL, Configuration: Debu ...Show All
Visual Studio Express Editions getting a random number between numbers that not following each other
i want a random number out of lets say 5, 8, 15, 65 and 99 how can i do this thanks in advance Try this (uncompiled & tested code): //Create the result set int[] numbers = new int[]{5,8,15,65,99}; Random rand = new Random(); //Randomize the index int index = rand.Next(numbers.Length); //Get the random value from the result set int randomNumber = numbers[index]; So, you must first define the result set. In this case it is [5,8,15,65,99]. Then you just get the random index, and select a value from resultset with that index number. ...Show All
Visual C# CAN I MODIFY THE WEB.CONFIG IN RUNTIME?????
HI I HAVE A QUESTION, I WANTO TO MODIFY THE WEB.CONFIG IN RUNTIME WITH A ASPX, AND I WANT ADD MORE TAGS THE WEB.CONFIG....... IS IT POSSIBLE THANK YOU FOR YOU HELP......... hi Derek well, in my application i can read the web config and modify also but i have a problem when i give it the rout or path to file, the problem is that i have not permission for overwrite or keep this file do you know for what ...Show All
Visual Studio Express Editions How do I use sql server 2005?
I'm working on a site that will be moved to a server that has all the current data in SQL Server 2005. I also have SQL Server 2005 installed on my development machine. I downloaded and installed VWD without SQL Server 2005 Express. I want to develop using the database I'll be deploying on, but I can't figure out how to connect to SQL Server 2005. If I can't figure it out on my development machine, I won't be able to when I upload everything to the server! I can't even use a login control because it uses the database! Help! How can I cennect to SQL Server 2005 instead of SQL Server 2005 Express generally to connect to SQL Server you specify the machine name an ...Show All
SQL Server how to writethis
Hello, I have MyTable with ID, IsYesNo fields ID is duplicated so I need perform select on MyTable with the following conditions: 1. Select all the ID distinct where IsYesNo=’Yes’ first 2. Then select all the ID distinct where IsYesNo=’No’ if ID is not in the first selection Combine these two and return the result SELECT ID FROM YourTable WHERE IsYesNo=’Yes’ UNION SELECT ID FROM YourTable WHERE IsYesNo=’No’ ...Show All
Visual C# Problem with cassini web server embedded in a C# application
Hi, I'm trying do a C# application with an embedded Cassini server, but I've got a problem. I imports the server (in source code format or dll format), and when I try to instanciate it, I' ve got a DllNotFoundException : System.DllNotFoundException: Unable to load DLL 'webengine.dll': Le module specifie est introuvable. (Exception from HRESULT: 0x8007007E) at System.Web.UnsafeNativeMethods.ReportUnhandledException(String eventInfo) at System.Web.Util.Misc.ReportUnhandledException(Exception e, String[] strings) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters) at System.Web.Hosting.ApplicationManager.C ...Show All
Visual Basic COM+ Component registration for VB6 dll
Hi, I am having a dll that forms a part of a COM+ application. I have changed a piece of code and not touched any of the method signatures, hoping not to destroy the compatability. I have replaced the existing dll with my new one and restarted IIS and COM+ services that use this dll. Should i have to register the dll again or will it work (should it work ) Please respond as this is under a hot discussion with my team.. Many Thanks and Best Regards, Franklin Thank you so much ! I have already tested and proved as you said. Things are fine. I will take this as a conformation and blow-off all those who say "may be this works in test environment..But..".. :-) Thanks again ! ...Show All
Visual Studio Team System postbuild event's macro
Just a little bit of questions (or suggestions may be) about postbuild event. Why there are no $(TargetPath), $(TargetDir), $(ProjectDir) macro I think it could be very usable. For example: in postbuild event I'm running tool that trims build script ( https://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1118492&SiteID=1 ). But due to diffrent configurations I use to build my project there is different output paths (great! otputpath depends on active configuration). But since my output path specified in the relative form to the project's folder ("..\Build\Debug\Resources" or "..\Build\Release\Resources") at the moment project builds postbuild event (specified as "$(OutputPath)dbpro_postbuild.exe" ...Show All
Internet Explorer Development Javascript bug?
I created a javascript file that contains a series of functions for popup windows to eight diffrent info blurbs and found IE 7 displays a completely blank (white) page when calling the script via this method: <script language="javascript" type="text/javascript" src="../includes/pop_windows.js" /> For the record, I tested same in Firefox, and it plays with it just fine. Frustrated, I resorted to the less efficient (in my opinion) method of calling the scripts from the <head> section of the source page itself, i.e.: <script language="javascript" type="text/javascript"> <!-- function p1() { aWindow=window.open("p1.htm","thewindow",& ...Show All
.NET Development 10055 error code
Hi... I get this error codd 10055 on my BeginSend code!! the code message is not very useful!! what does buffer mean! what buffer ! the sendbuffersize ! or the receive buffer size ! or the paging memory... and if any what to do to increase it or release any unused resources !! if queue what Queue! im not using Queues!! btw im sending frames from a client to the server which in turn sends it to all other clients connected to it.. frame rate is 20f/ps and frame size is no larger than 3500 byte.. please advise. thank you, osamaT wrote: Hi... I get this error codd 10055 on my BeginSend code!! the code message is not very useful!! what does buffer mean! what buffer ! the sendbuffersize ! or the receive buffer size ! or the pa ...Show All
Software Development for Windows Vista Using smartcards in a service - SCardAccessStartedEvent
Dear all, Migrating our core development platform to Windows Vista, one of our Windows services using smartcards is failing. We have debugged the problem and found that the event provided by the function ScardAccessStartedEvent does not receive notification. This event is supposed to signal when the SmartCard Resource Manager starts. As we have a WaitForSingleObject(event,INFINITE), the service hungs. Testing the same service as an ordinary executable ( registering with -regserver ) I can see it works properly. In XP it works properly both as an executable and service. I have read something about Service Hardening in Vista and I guess it may be caused by privilege reduction. So, I've created some code to enumerate the existing ...Show All
Windows Forms Remove rows in datagridview and save the dataset xml file
Hi, I made an even handler for removed rows in the datagridview. The datagridview gets its data from an xml file. When a row is removed in the datagridview, the row should be removed in the dataset as well. This is my event handler in constructor: this.grdTest.RowsRemoved += new DataGridViewRowsRemovedEventHandler(grdTest_RowsRemoved); This is the code in that event handler: void grdTest_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e) { DataSet ds = new DataSet(); ds.ReadXml("Test.xml"); foreach (DataRow dr in ds.Tables[0].Rows) { string remove = dr["Row"].ToString(); DataRow[] temprows = ds.Tables[0].Select("Row = " + remove); if (temprows[0].RowStat ...Show All
