Myime's Q&A profile
.NET Development How To Access Specific Column
when i retrieve from a table in database many rows every row have many column how to access specific column for example if i retrieve the data such as customername , customerid , phone , salary how to check for example if the salary = 1000 do something how perform this task please help me If I understand you correctly, you're asking a few different collection.. If you have a datatable, you reference the Rows collection and then the Columns collection. So to access customername assuming it's the first item in the select list... DataSet.Tables[TableIndex].Rows[0][0]; or DataSet.Tables[TableIndex].Rows[0]["customername"] To walk through a datatable... for(Int32 i = 0; i < DataTableName.Rows ...Show All
.NET Development How to insert a resource image, as embedded image in email?
LinkedResource logo = new LinkedResource("c:\logo.gif"); logo.ContentId = "logo" htmlView.LinkedResources.Add(logo); LinkedResource only takes a Stream or filepath. I want it to take the image i have in Properties.Resources.Mylogo (Bitmap) How do i do that I guess i need to get the bitmap converted to a Stream How Or am i achieving this the wrong way The MemoryStream is OK. You have to reset the Position property of MemoryStream after save bitmap on it and before create linkedresource. Bitmap mbitmap = global ::yourAppNameSpace.Properties. Resources .logo; System.IO. MemoryStream mstream = new System.IO. MemoryStream (); mbitmap.Save(mstream,System.Drawing ...Show All
Smart Device Development LIBCMTD.pdb linker warning + "RTTI gotcha" post SP1
Hello, After installing VS2005 Service Pack 1, the linker started to warn me about not being able to find "libbmtd.pdb". Here are two of those warnings... (I get these warnings with ".exe" and ".lib" projects, but not with every project that I have). Linking... Creating library Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug/<PROJECTNAME>.lib and object Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug/<PROJECTNAME>.exp LIBCMTD.lib(gshandlereh.obj) : warning LNK4099: PDB 'libbmtd.pdb' was not found with 'D:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\ARMV4I\LIBCMTD.lib' or at 'f:\<PROJECTDIRECTORY>\Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug\libbmtd.pdb'; linking object ...Show All
Software Development for Windows Vista Blocked startup programs
Hi, I'm a software developer and I have a question about Vista. Our application (a .NET 1.1 app) requires Administrator access and we have the "requiresAdministrator" access level defined in the application manifest. That part is working fine. However, our application needs to startup when the computer boots so we have it in the "startup" folder. For some reason (I can't imagine why) Vista puts it in the "blocked startup programs" list and the user needs to manually launch it. This is not acceptable for us. Is there any way to circumvent this problem And by the way, why is there no way for the user to say "I want this app to run every time I reboot so stop blocking it!" On a side note, I notice ...Show All
Visual Basic Special Characters in XML File
Hi all, I have a little problem with XML. This XML file is a UTF-8 codeification and most of the times a "tiny square" appears inside the text, I know I can replace the character but I just don't know which character is. Working with VB.NET (System.xml and System.XML.Path), I tried to get the char number but I get two values: 63 and 13 Dim CharWeird As Char = GetChar(xString, 15) ' 15 is the position of the character (zero based) CharWeird = 63 BUT if I..... Dim CharWeird As Double = Char .GetUnicodeCategory(xString, 14) ' 14 is the position of the character (1 based) CharWeird = 13 Not to mention that if I lookup the char inside the string: xString.IndexOf(63) or xString.IndexOf(13) it always returns -1 me ...Show All
SQL Server Can I Use Non-empty Behavior for These Calculated Members?
I still find myself extremely confused about using the non-empty behavior for calculated members. We have a series of calculated members that we refer to as "Velocity", such as "Velocity Sales". The basic definition for these velocity measures is to get the total from the previous 63 business days and then annualize that total (i.e. multiply by 4), with the 63rd business day belonging to the previous month. For example, Velocity Sales for any day in September 2006 would be totaling the sales $ for the business days in the range of 06/05/2006 through 08/31/2006, and then multiplying it by 4. Perhaps not surprisingly, these measures result in extremely poor performance. Since I'm confused on the non-empty behavior, this p ...Show All
.NET Development Access to Exchange in .NET
Hello! I'm writing Windows service using .NET 2.0 I need to access to ExchangeServer for retrieving emails, attaches, moving and deleting them... ExchangeServer deployed on another PC. At first I thought about using CDO->MAPI but then I read this article http://support.microsoft.com/ kbid=813349 . That article says CDO not supported in .NET. Does it mean that any unexpected troubles may appear Also I have found out that it is possible use Ex OLE DB and CDOEX only on server side. So for access from another PC I can use only WebDAV, WMI and CDOEXM. Is it true What technologies are you using for accessing Exchange Thank you in advance for any help! I've found WebDAV the best wa ...Show All
SharePoint Products and Technologies dcument library help
Hello everyone, I am trying to get access to documents in a document library and am trying to "server" these documents to an end user. But im having trouble with the basic concepts... I see code examples like this: // get the current site SPWeb site = SPControl.GetContextWeb(Context); // set the library and view to display string docLibName = "Shared Documents"; string viewName = "All Documents"; // get the folder SPFolder docLibFolder = site.Folders[docLibName]; // get library and view SPDocumentLibrary docLib = (SPDocumentLibrary)site.Lists[docLibName]; SPView docLibView = docLib.Views["View_Name"]; // get all the items in the folder SPListItemCollection docLibItems = docLib.GetItemsInFolder(do ...Show All
Visual Studio 2008 (Pre-release) WCF Internals
Is there any whitepaper out there that details some of the internal behavior of the WCF listener framework I would like to know things like the implications of running several services in the same process as opposed to splitting them into different processes running in parallel. I want to know if having all my services listening on the same TCP port (netTcpBinding) has any performance implications as opposed to having each service listen on a different port. I know that ASP.NET had several good whitepapers on the HTTP Pipeline and some "what happens when" timelines that detail what the runtime does when a request is received. Is a similar document planned for WCF Adiavn wrote: Why no ...Show All
.NET Development DateTime.Parse(<dateobjectvar>.ToString()) exception
After installing our ASP.NET (currently still 1.1) application for years successfully on different systems in different countries (even far east and arabic) we finally came across a 'seemingly english' system (installed somewhere in Luxembourg :-), where the line above throws an exception. Although I fixed the problem by using explicit ISO date formatting strings I tried finding related issues, because the construction should NOT throw errors according to the documentation. The date string being parsed looks like this: "27/11/2006 10:19:12 PM" Could this be related to http://www.pcreview.co.uk/forums/thread-1254179.php which seems to indicate that console apps react different then ASP.NET apps, which may be ...Show All
Visual Basic reuse enums
can I use the elements in an enum form another I'll try to explain my idea lets say the I have a class that has an enum inside it some way like this class test00 enum original_one element01 element02 element03 end enum ... rest of class code end class and I'm making another class in the same project that needs anoher enum that has the original_one enum elements plus some other extra elements can I reuse the original_enum to produce the new enum and just add the new elements or I must declare the new enum from the beginning Your talking "Inheritance"...and you can not inherit an enumeration....you will have to decla ...Show All
SQL Server Question about tempdb size
I a have a question about size of tempdb. Getting the size from different sources looks controversioal. My tempdb consists of 3 files (2 data files + 1 log file) In database properties it shows total size of 153 GB However, if I go to tempdb/Tasks/Shrink/Files in SSMS (without actually shrinking them), I get different picture. I collected information from that dialog box into the following table: File Type Logical Name currently allocated space --------- ------------ ------------------------- Data tempdev 50 GB Data tempdev2 5 GB Log templog 10 GB ------------------------------------------------ Total: 65 GB If I check these values from the server's Windows Explorer, it shows for same files, respectively: ...Show All
.NET Development connection to database
Hi, I have noticed that from reading, when we want to create a connection to a database there seems to be some coding that's fixed like the connection string and the data member. What should I do if I wanted to connect to the database at runtime Handling the connection string can be done via the open file dialogue, but what of the data member can we not set it at runtime I also would like to know if connection to the database can be called again after its closed. I am working on my final project and I don't think creating a new connection to the same database everytime we want to do something with the data is efficient. Any guideline is highly appreciated. Thank you I guess my query on th ...Show All
Visual C# How to set focus on control after thread exits
Hi, Iv'e got a form containing some usercontrols. When the form loads some calls that manipulate the usercontrols are added to a threadpool. Now on to my problem. I'd like to set focus to a control within one of my usercontrols, but if I do so before my threads exits the focus is lost. Ideal would be to have the focus during thread execution so the user can start interacting with the GUI while the usercontrol is being manipulated by the thread(s) and the focus is not implicitly changed or anything by the threads. If thats not possible then is there a way to set focus to a control after (whatever thread exits last) the thread exits and is done with the control /J If you are using .NET 2.0, you should con ...Show All
.NET Development WSE 3 SP1 When?
When can we expect SP1 Because there are two serious issues that I'm hoping are going to be resolved: 1. Under Windows XP 64bit it doesn't create the WSE stub in the Reference.cs file and then changes the default one back to the default constantly even though you don't request it to update reference. 2. There are errors that we get as a result of Invalid characters. (i.e. 0x0 0x7 etc.) on response streams. There are other posts about this one. WSE 2 doesn't do this, WSE 3 does, it should be fixed because those are perfectly valid in a lot of cases and it should handle it. Thanks! In WSE 2 the invalid characters were converted to their escaped versions in the XML so that they didn't cause ...Show All
