icystone's Q&A profile
SQL Server ordinal position
i have two tables with the same column names. is there a SP that i can use to order the columns exactly same way in both the tables. Thanks For 'portability' and 'cause it's the nice way', the INFORMATION_SCHEMA views are the one's that's recommended to use. What's good to keep in mind though, is that depending on who uses them, results can be different (or percieved as 'incomplete'), since the views only shows results where the current user has permissions. This is different from just looking up stuff straight from the systemtables. =;o) /Kenneth ...Show All
Visual C++ Chart in C++ (MFC)
I want to implement a column chart in my dialog and dunno is it even possible using MFC. I searched keywords like pie chart , bar chart , column chart , chart control , and several others that I could think of on MSDN with no result. When I searched the internet for "pie chart c++" i found some tutorial beginning with " First insert the chart control in your project using Project->Add Reference->Microsoft Chart Control . " I cann't do that. There is no "add reference" in my project menu. Even when I chose "add reference" from the solution explorer, there is no "Microsofr Chart Control". I am using MSVS .NET if th ...Show All
Game Technologies: DirectX, XNA, XACT, etc. AI / Neural Networks
I am progamming my own backgammon game and was wondering what the best book is as an introduction progamming AI. I am just a hobby programmer using VB Express so I dont want anything to technical! I hope someone can point me in the right direction. Thanks I can't recommend a book but you might find something in the AI forum on gamedev while you await others to reply http://www.gamedev.net/community/forums/forum.asp forum_id=9 ...Show All
Visual Studio Express Editions .NET Framework 2.0 Beta 2 won't install
The Visual Studio Express install fails when installing Framework 2.0 Does Framework 1.1 need to be uninstalled No other beta or Visual Studio software has been loaded on the PC before...any ideas Anyone had something similar happen Thanks, Ron Thanks for your reply. I used "iisreset /stop" from the command line and the installation progressed satisfactorily. For those who like working with a minimalist development environment there is a version of Jeff Key's excellent Snippet Compiler available for C# 2005. ...Show All
SQL Server Beginner question Searching table
I have a stored procedure that takes 5 parameters. Based on what parameters are passed i want to return a result set to the calling code. Not all of the parameters are required so there will be some combinations on the entered parameters. Do i need to dynamic build the query with the IF statements to check if the input parameter is NULL or not Thanks You can use the isnull function like so: -- Using the northwind database in sql server 2k declare @categoryname varchar(100) declare @categoryID varchar(100) --set @categoryname = 'Produce' set @CategoryID = 4 select * from categories where is ...Show All
Windows Forms Update datagrid column
I have a datagrid which has four column. ID, Qty, Unit_Prize and Total_Amount What i would like to do if user update the value for column Qty or unit_Prize then value for the Total_Amount column update by itself which is Qty * Unit_Prize. How can i wrote code to it automatically update the value for Total when you change either Qty or Prize value. Thanks Is your DataGrid bound to a DataTable If so, try handling the ColumnChanged event of the DataTable. Check to see if the column that was changed was the Qty or unit_Prize column, and if so, update the Total_Amount column. Chec ...Show All
Windows Forms Problem with RowChanging event
Hi, if have a DataSet (SQLExpress) whith 2 Tables. On one table I add a RowChanging event handler. When I add a record in a boud datagridview then an exception occures in the handler. (After changing the postion in the DGV the event is fired). Here my handler: void PCs_RowChanging( object sender, DataRowChangeEventArgs e) { if (PCsBindingSource.IsBindingSuspended) { return ; } try { MessageBox .Show(e.Action.ToString()); } catch ( Exception eX) { MessageBox .Show(eX.Message); } } I get and "Index out of range" exception and my DGV is a red rectangle with red lines across it. After the exception I can see m ...Show All
Windows Forms OpenFileDialog "hangs" on Windows 2000
I have a WinForms remoted application using a simple OpenFileDialog control. When I instantiate the dialog, the program hangs and never responds. This only happens on Windows 2000. The program functions perfectly on Win XP & Win 98. The user is running the program as a local Admin, so Code Access Security should not be a problem (it s ...Show All
Smart Device Development .Net Compact Framework:Unable to connect to remote server
Hi All, I am working on a handheld device application. The issue that I am facing now is that my handheld has to be within the firewall before connecting to the server.With this, I have problem connecting to the server with the message "unable to connect to the remote server" However, by passing the firewall, it works fine. Are there any special coding for .NET CF in order to work within the firewall Just for a note, firewall port 80 is open up and able to view the web services. What is wrong Appreciate your help very much. Gary Hi Gary, You should be able to access web se ...Show All
Visual Studio 2008 (Pre-release) Custom UIElementCollection and data binding
I have created a custom Panel. I have also created a custom UIElementCollection for it because I need to do some extra operations when the collection is modified. Everything works fine when the custom panel is used in standalone mode. The problem is when I use this custom Panel as a items host for a data binded ItemsControl, it seems that the items are not added through the overriden Add method of the custom UIElementCollection so those extra operations are not executed. Sadly, the current design of UIElementCollection is very decieving. It shouldn't be virtual because the methods your can override or never called. ...Show All
Windows Forms Drawing a point on a Custom UserControl
Hi all, I know this is very easy in .NET to draw different types of shape but how can I draw a point on the UserControl. I couldn't find a DrawPoint() method in MSDN. Would anybody please tell me how I can draw a point Thanks a lot. Thank you very much for your reply. But I want to draw a point which occupies only a single pixel and I tried the FillEllicpse() method, it doesn't seem to work. Is there another way to draw a single-pixel point Thanks again. ...Show All
SQL Server Can we create two servicess in a same database?
Hi, I tried creating two services in a same queue but i couldnt see them working properly. Now i got a primary doubt that can i create two services which communicate with each other in a same database Please help me.... here is the script which i used to create the services /************************************Scipt *********************************/ /********************** Sender Queue and Service ***********************/ CREATE QUEUE SenderQueue WITH Status = ON ; CREATE CONTRACT SenderContract ( ArchivingMessage SENT BY INITIATOR ); CREATE SERVICE SenderService ON QUEUE SenderQu ...Show All
SQL Server DTS migration
Hi, In DTS 2000 package dynamic property task an ini file is read and values for some keys are read. These values are nothing but name of servers on which to run some sql tasks. This dts package has three defined connections. So when the keys are read it will be either one of these three. For eg. there are three sql tasks. sql1, sql 2 and sql3. sql1 needs to be run against server s1, sql2 against s3 and sql3 aginst s2. So the ini file sets three different variables connection1 to s1,connection2 to s3 and connection3 to s2. These variables are then used to run sql tasks accordingly. When I migrated this dts package to .dtsx fo ...Show All
Windows Forms Capturing TAB Key
Ok, I know how to capture Keys, but I can't seem to capture when the TAB key is pressed. I know its a special case, but I can't get it. Any ideas You can catch the TAB key by creating a new textbox derived from Textbox and override ProcessDialogKey. ...Show All
Visual Studio Team System best practice regarding version numbers, release names, etc
Has anyone any thoughts about best practice regarding the naming of assembly versions, build numbers, changesets, file versions and so forth Background (let me know if this is wrong). a. When I check-in a changeset it is given a unique number and all the files it contains then have their tip version set to this number. For example after checking-in 54 changesets, my next changeset will be 55 and the file it contains (Form1.cs) will have its tip version number set as 55. b. When I perform a Team build of a Visual Studio Project it contains a collection of files with differ ...Show All
