ajaysajay's Q&A profile
.NET Development IDisposable Interface - disposing managed and unmanaged resources
Hi! I'm using VS2005 beta 2 and VB. I would like some help on understanding what is the correct way to use the IDisposble interface. After adding the Implements statement, some code is automatically added in the class. In the Dispose(boolean) method, there are two sections to dispose managed and unmanaged resources. Q1) If a file is opened using one of the System.IO classes, is it considered a managed or unmanaged resource Should I close the fi ...Show All
Visual Studio Express Editions keyboard special character keys invoke wrong characters
I may be in the wrong topics forum for this question. While cleaning up a friend's Compaq Presario 5070, I wrote a note using notepad; the keyboard letters worked fine but the special characters did not. ie: left square bracket gave me a double circumflex accent instead ( [ = ^^ ); acute accent gave me a latin small letter C with cedilla ( ' = c ); a solidus gave me a small letter e with grave ( / = e ). Could this be your software working Is ...Show All
SQL Server how to free the memory occupied by "blob" in MS sql server
i'm working in microsoft sql server and i got following problem: I have a text files Asia.txt in E:\ folder with some data in it as shown below Asia.txt 1, Mizuho, Fukushima, Tokyo 2, Minika, Pang, Taipei 3, Jen, Ambelang, India 4, Jiang, Hong, Shangai 5, Ada, Koo, HongKong And I have a table Region, in the database Companies , as shown below. 1>CREATE TABLE REGION (ID INT,REGION VARCHAR(25),DATA varbinary(MAX)) 2>GO I ...Show All
.NET Development .NET2 SerialPort - 100% CPU problem
Hi All , i'm using .net2 beta1 SerialPort class. the problem is when i first recieve bytes - the CPU is getting up to 100% and stays there. i tried working with the SerailPort in many ways (starting Recieve thread, etc') but it seems that this problem repeats itself. is the read call is synchronous and does not come back until it finish a sample code that cause this without a seperate thread in this case) SerialPort m_SP; m_SP = new SerialPort( ...Show All
Windows Forms how to close window in this way ...
hi i have 3 forms , form2 is for asking username and password after clicking a button on form 1.after confirm the username and password , it goes to form3 . these forms will be appear like this : first , form1 appear , after click the butoon, form2 will appear (form1 is still visible), after confirming username and password, form1 and form 2 will hide and form3 will shown. how can i do this in form2 i can't use " form1.hide() " thank ...Show All
Visual C++ where is PP_EXCHANGE_PIN
recently, i was very boring about CSP with smartcard. I had to make use of windows smartcard api to control the gemplus usbkey. The MSDN told that CryptSetProvParam (PP_EXCHANGE_PIN) should be used by applications that need to control exactly when UI is shown to the user. The application obtains the PIN using a customized method and uses CryptSetProvParam (PP_EXCHANGE_PIN) to present the PIN and authenticate the user to the card. The alte ...Show All
Visual Studio Express Editions Problem with accessing my registration benefits.
I registered VB Express and got the registration key, but I did not encounter a product registration dialog to enter the registration key. How do I solve this problem If you choose Help->Register product... you should have a textbox to enter the registration code in. If you do not have a textbox to enter your code then you should not need to register. This is the case if you installed from the offline installation media. ...Show All
SQL Server Microsoft.Jet.OLEDB.4.0 has not been registered. ??
Hi folks, We've got SQL2005 April CTP i64 running on Win2003 with SP1 appied (Itenium Proc). Last week, one of developer sent me an email with error msg, : Msg 7403, Level 16, State 1, Line 1 The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered. I ran Component Checker against that box and it found that MDAC2.8 with SP2 installed. I also found from MS site that Jet 4.0 SP8 i64 version available but the instal ...Show All
SQL Server How to drop users programmatically through a sp
Hi, I want to drop users programmatically, is this possible I tried create PROCEDURE [dbo].[sp_DelAllUnusedLogins] AS BEGIN SET NOCOUNT ON; DECLARE @UserName nvarchar(128) DECLARE user_cursor CURSOR FOR select name from sys.sysusers where status=12 and name not in ('NT AUTHORITY\SYSTEM','dbo') OPEN user_cursor FETCH NEXT FROM user_cursor INTO @UserName WHILE @@FETCH_STATUS = 0 BEGIN DROP USER @UserName FETCH NEXT FROM user_cur ...Show All
Visual Studio Express Editions LinkerPRoblem cctor AND Where's the USerControl template gone??
HI I programmed a OpenGLUsercontrol with .NET version1.x in vc2003. Now i'm trying to code it to .NET 2.0 in Vc Express. My first Question, where is User Control library (I think it was called so in 2003) template gone, Add New Project and ... So how I do create such projects now So for the time being I just included my old project and converted it so far. After adding all the missing libs from win32 (for wgl and so on, ...Show All
Visual Studio Express Editions Adding components!
Hi, I am having some trouble adding components to VB express edition 2005. How can I do that please Bee Sorry I did not explain well enough. I meant when you make a component (control) and want to add it to a windows application in VB.NET. In Visual Studio 2003, you usually add it by right clicking the Toolbox and then select add...then you browse to where the control is and add it. After that the control will appear on the toolbo ...Show All
Windows Forms OptimizedDoubleBuffer
I heard somewhere that by setting ControlStyle.OptimizedDoubleBuffer, you automatically have ControlStyle.UserPaint and ControlStyle.AllPaintingInWmPaint set as well. Is this true The API is unfortunate, but it is a ControlStyle which affects a minority of users. Typically, we'd suggest Control.DoubleBuffered. Marking Obsolete is akin to ripping it - we generate build warnings for every project where it's being ...Show All
Windows Forms Returning a Collection Class
Greetings, I have created a custom collection class that I would like to return from a function (i.e. return customcollection;). However, a runtime error is generated when I call the function that's suppose to return the custom collection class. ...Show All
Visual C# VS 2005: "Key not valid for use in specified state"
Hi all- I'm running VS 2005 final release version. I have a solution with two projects in it; an ASP.NET website in C# and a VB project which is my data access layer. Yesterday, this code was working fine. I can compile and run the solution, and all the code works. But when I try to access or add a new datasource through the VS 2005 Data Sources Explorer, I get a popup which says: "An unexpected error has occurred. Error messag ...Show All
SQL Server using English query in sql server 2005
Hi, Our application is based on sql 2000 which uses English query. we are planning to migrate our database to new sql server 2005 so that we can use many new enhanced features. But it is found that new version doesnt support English query. ( http://msdn2.microsoft.com/en-us/library/ms143754.aspx ). Could you please some one tell me how can i re-distribute my english query component with sql server 2005 are there any work arounds Thanks in ...Show All
