awong's Q&A profile
SQL Server IN Parameter
Hi, I'm trying to do this in a stored procedure: select * from planning where userid in (71,97) I want to make the userid's dynamic. I've tried this: DECLARE @userid varchar(40) set @userid = '71,97' select * from planning where userid in (@userid) But then I get the message: Syntax error converting the varchar value '71,97' to a column of data type int. How can I do this Thanks Well, you should read http://www.sommarskog.se/arrays-in-sql.html ...Show All
Visual Studio Tools for Office How to Read a Date Field from Excel Cell?
Hello, I am trying to read an Excel cell, which is supposed to be a date field. I need to validate it, and cast it to a DateTime field. This code returns me the format, string format = ((Excel. Range )dataRange.Cells[i, 1]).NumberFormat.ToString(); and this code return the value of the cell. string value = ((Excel. Range )dataRange.Cells[i, 1]).Text.ToString(); I can use format along with a DateTimeFormatInfo object to parse the string, and convert it to DateTime. But, since the format can be changed by user, and somehow the format that I get is not neccessary clean (i.e. m/d/yyyy ...Show All
Visual Studio Help still broken
Just installed the release version of VS2005 standard. Alas, F1 help is still broken. If I position the cursor over a word (for example HANDLE) and hit F1, the following happens: 1. If MSDN is set to use local help only, it always displays the topic-not-found page, even though on the left hand side, the topic is not only present, but selected. A single click on the highlighted item displays the correct information. 2. If MSDN is set to use online help first, then pressing F1 takes up to a minute (looks like multiple redirections happening), then either displays the topic-not-found page or displays something only vaguely related to the select ...Show All
Software Development for Windows Vista Patching software under UAP/LUA
I'm not sure if this is the proper forum, so please let me know if there is a more appropriate place for me to ask these questions. We have a patching system that is written to handle patching all of our games. It handles binary differencing, and also knows about our very specific file formats, and can work with products installed years ago, before Installer 3.0 was released. According to this document ( http://msdn.microsoft.com/library/default.asp url=/library/en-us/msi/setup/least_privileged_user_account__lua__patching.asp ), patching while in a Least Priviledge account requires installing using Installer 3.0 from removable me ...Show All
Visual C# Unique Machine ID
Hi, I have been looking at the code for the Shareware kit and there is some code that creates a ClientID from the processer ID. The code is: try { string cpuInfo = String .Empty; ManagementClass mc = new ManagementClass ( "Win32_Processor" ); ManagementObjectCollection moc = mc.GetInstances(); foreach ( ManagementObject mo in moc) { if (cpuInfo == String .Empty) { // only return cpuInfo from first CPU cpuInfo = mo.Properties[ "ProcessorId" ].Value.ToString(); } } return cpuInfo; } catch ( Exception ex) { throw new ...Show All
Windows Forms using applicationsettings/propertybinding to save form size etc.
I want to be able to save the following: The last position and size of the form when not maximized and the last windowstate. ie if the user closed the app maximized, next time I want it to open maximized, but if the user sets it back to a normal window, I want it to display using the save size and location (as Microsoft Word does). I have created three user settings with the appropriate type. If I bind these to the form properties, it seems to really screw up (it works ok until I add the windowstate, but I need this setting. Otherwise, if I maximize the form and then close and reload the app, the windowstate is set to normal, but the size is ...Show All
Visual C# Loading MDIChild into MDI Wndow from a Dialog
Hi, I have the following forms: form_MDIChild form_MDIContainer when a user choose a menu item on form_MDIContainer it will display a login dialog a\d i want if login was successfull to load the form_MDIChild into the form_MDIContainer. I tried this code before closing the login dialog but no luck. frmWorkingArea form_MDIChild = new frmWorkingArea(); frmMain form_MDIContainer = new frmMain(); form_MDIChild.MdiParent = form_MDIContainer; form_MDIChild.Show(); frmMain form_MDIContainer = new frmMain(); you create again the MDI container or you are first creating it can you post ...Show All
Software Development for Windows Vista Switch recognizer languages in InkPicture control in EXCEL?
I made a Excel 2003 spreadsheet that contains a InkPicture control. I would like it to be able to switch the language so it can recognize Chinese or Japanese handwriting. The code below does only seem to work for English, when using "DEFAULT" as the factoid. I had no luck getting the VB6 examples from the tablet SDK to work in Excel's VBA. From the SDK examples it seems C# is a better language for tablet development, but is it possible to create a CONTROL in C#-Express and then use it in Excel, ActiveX style I read .NET doesn't really support this anymore. What's the way to go for what I'm trying to do ----------- ...Show All
SQL Server Throughput post followup question
Hello folks. SSIS - Lovin it! I have a couple questions/comments: Nov 7th is a long ways away. Ideally, I'd like to convert my current ETL over to SSIS immediately and begin running in production and work around the current bugs. Yeah, I know its unsupported, but it would be nice to be ahead of the technology. Currently using stored procedures and they have grown too complex to manage. I find myself adding code (2 minutes) and then spending a great deal of time helping the optimizer make sense out of the 30 joins of large tables. #1 -Is it safe to say that SSIS RTM will most likely work with CTP versions of packages I saw Jamie' ...Show All
Visual Studio Team System Thanks Rob Caron!
Thanks Rob Caron for telling me about this site (I love being the first!) and for helping me with TFS and VSTS. You can find all my VSTS/TFS blog posts on this channel here . Sam Gentile INETA Speaker, Microsoft MVP - .NET/C# Ok, we all acknowledge that Rob is a stud (go Rob!). Now we just need some real conversations going on here. Has anyone submitted a birds of a feather session for Teched ...Show All
.NET Development How to manage the session state outside the application
Hello Dear, i m facing some problem with my web application (developing in ASP.Net). i want to manage the session even after i closed the application on client side.eg if any client 'ABC' open my web application 'XYZ' then after some time when clent 'ABC' close the browser ie Application 'XYZ'. then after some time again open the application on same client 'ABC'. Plz tell me how i can maintain the same session on that client without assign new session to that client 'ABC'. can i solve this problem by storing the session in SQL Server.i don't want to create any cookie. plz give reply ...... tell me how i can solve this problem. with ...Show All
Visual Studio Team System install problems
Is it just me or is there some sort of Catch-22 about getting the new Visual Studio 2005 working on a system I've been in installation hell ever since my disks arrived in the mail. No matter what order I try to do things, one of the installations fail. I finally thought I had made some progress when I got SQL Server 2005 installed and running, but when I then tried to install the Visual Studio 2005 Team Foundation Server it wouldn't let me until I uninstalled .NET 2.0, and when I did that SQL Server broke. Then when I tried Visual Studio 2005 Team Foundation Server again it said it couldn't install because SQL Server ...Show All
Visual C# Form Instance
Ok. I have 3 forms. On form1 I want to declare an instance of form1. How would I make this new instance available to the other forms Can someone help me What do you mean by 'available' How are you creating and showing these forms Why do you need two instances of the same form ...Show All
Visual C++ Structure deletion?
I got a dynamic structure array in a class. In that classes destructor I delete a pointer to the said array. That deletion causes an error! After that, I tried to free(pArray) but this also causes an error. Is it necessary to delete this pointer at all Hey, is it better to use a class instead of struct Does this represent a better programming practice ...Show All
Windows Live Developer Forums Where is the Compliance Checklist
I've found several references to it as part of the submission process, but I can't find it. A copy of the Support team's Compliance Checklist, which details all compliance items that you must complete before the MSN Support team will consider adding your application to the Activities Menu. Is this maybe for the API in general rather than the contest Either way, I'd like to see the list. Thanks. If serious email for serious details. I'm good with the contest terms for now :D Thanks for the very fast replies (Y)(Y) ...Show All
