sugrhigh's Q&A profile
SQL Server Create Table from Row Data
Hello, In SQL Server 2000, is it possible to take a table with one field (column), and pivot the table so that the characters in the row data become the field (column) names of another table ( or in a View) The number of records could vary. If so, how would I do this Sample table; Create Table dbo.MonthlyData ( Categories varchar(30) NOT NULL ) Sample data; Sales Volume 2005-02 TotRefVol 2005-02 Sales Ratio 2005-02 Sales Volume 2005-03 TotRefVol 2005-03 Sales Ratio 2005-03 Sales Volume 2005-04 TotRefVol 2005-04 Sales Ratio 2005-04 Thanks again. I had a couple of questions; -Procedure sp_executesql expects parameter '@statement' of type 'ntext/nchar/nvarchar'; nvarchar has a 'size' limit ...Show All
SQL Server In SQL 2005 P1 SMO - Agent Last Run datetime
Hi, I created an RMO script to generate a republishing replication (A to B then B to C). Because I don't want to start the B to C replication until the A to B replication is complete, I start the Snapshot and the Merge processes synchronously (vs. asynchronously). If I ran them asynchronously, I'd need to put in logic to loop-check the completion status of the Merge agent job before kicking off the B to C process. In the Snapshot agent, this means running .GenerateSnapshot(); (vs. StartSnapshotGenerationAgentJob) and in Merge agent this means running .SynchronizationAgent.Synchronize(); (vs. SynchronizeWithJob) I notice that the Snapshot agent never shows a LastRun or LastRun Outcome even though the snapshots are being generate ...Show All
Visual C# Saving already made changes in a program!
Hello everybody... I am a newbie to c# and programming at all so I will try my best not to sound silly. What I want to achieve is the following thing. Imagine a simple form with a button on it. The button performs some actions, like changing its color(eg:red). So far so good, right All right, you press the button, it changes its color to red and then you quit the program. What I want to know is how on the next start of the program the button to be already red. I hope you get my idea. Thank you guys for the attention! You should take a look at the Application Settings system that is rather easy to use within Visual Studio 2005 (and Express). ...Show All
Visual Studio 2008 (Pre-release) Panel that can repeat items
Hi, I'm trying to create a custom panel or control that can repeat items (horizontally and/or vertically). I'm thinking of deriving my control from itemscontrol class but don't know how to make it repeat items i.e. when you hit the next button when you are at the bottom of the list, it should display the first item again. Any ideas Thanks. Unfortunately the CLR doesn't provide a circular collection implementation (just like it doesn't currently provide a Set...although I did read that there will be one in the next release). If you were to provide an IEnumerator<T> implementation that used a circular linked list, you should get what you want for free from a StackPanel because it uses IEnumerato ...Show All
SQL Server Create view using SMO
Hi All i m building an application in which i have to create database view using SMO. The problem i m facing is that when i use the View.Columns.Add function to add a particular column to the view i am getting an error . " Parent property of object [Name] does not match the collection's parent to which it is added." The following is the piece of code i have written Server server = new Server ( Environment .MachineName); Database db = server.Databases[ "AdventureWorks" ]; Microsoft.SqlServer.Management.Smo. Table tab1 = db.Tables[ "ProductModel" , "Production" ]; Microsoft.SqlServer.Management.Smo. Table tab2 = db.Tables[ "Product" , "Production" ...Show All
Visual Studio Express Editions open a file in listview control
Hello all, Part of an application that I'm working on uses a treeview/listview control. My goal is pretty simple, I think... I've created an application that parses HTML files. It allows the user to edit these parsed fields and save their changes over the existing file. I realize that I could use the filebrowser dialog, or simply enter the path of file, but I need the user to be able to select a file in the listview control and have that file load in a textbox. Again, user selects (clicks) a file in the listview. By clicking the file it automatically opens in the textbox. I have no clue as to how to accomplish this seemingly simple task. Any help would be very much appreciated! Thanks, Mike ...Show All
Smart Device Development Notification and Radio buttons
Hi, i've a notification with 2/3 radio buttons and one button. I can get the selected item through WM_NOTIFY and SHNN_LINKSEL clicking on button. I would like to know how get selected item clicking on softkey menu (like in wifi network availables notification for example) Any idea Thanks in advance Sir I have similar problem.I am drawing radio buttons using Owner DrawItem Method in MFC......When we try to do the event handling then both are get selected....the selection has to be one out of 2 /3/4......I need a soution in connection with the same...... I am using CMyButtonclass(for eg) derived from CButton Class from MFC and using DrawItem method for dra ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Multi-core programming
Will the XNA Framework allow assigning threads to specific cores on the 360 Or more generally, how will XNA Framework interact with the 360's cores and hardware threads WOW "Instructions were added to calculate the dot-product of two vectors made from three or four floating point values" "instructions for rotate and insert operations, pack/unpack instructions for handling Direct3DR data types" " it is possible to prefetch data directly from main memory to the L1 cache " "The CPU chip can use code running in one of the cores to "procedurally generate" the equivalent triangles to represent the object. The data representing these triangles will ...Show All
Visual Basic How to create a docking/undocking toolstrip in vb 2005 ?
Hi can anyone help me in creating a dockable/undockable toostrip in vb 2005 Shailendra Kumar A toolstrip can be docked like every control, so it's just a matter of setting the .Dock property of the toolstrip to 'None' when undocking, some code to simulate grabbing the toolstrip and repositioning it, and some code to look out when the mouse is close to an edge of the form so it can suggest docking to it. Here's a working example, but you'll have to adapt it to your own needs. The ToolStrip seems a little quirky about mousemove events, so it may drop from your grasp occasionally. ...Show All
SQL Server Excel Destination Error: Column"xx" cannot convert between unicode and non-unicode string data types
Good afternoon Trying out the Excel Destination in SSIS, I ran into the above error. I did try to ignore my 2 varchar fields and then it works fine. Thanks for any inputs. I'm jumping into this thread rather late, but I've had an experience with this problem that might be helpful to others. I've been trying to dump SQL query results into an EXCEL spreadsheet using SSIS, and that's when I first got this error message. After reading through the entries in this thread (and several others), I thought that the most direct method would be to edit the SQL Task that contained the query so that it would convert all of the columns I was returning to NVARCHAR. However, that didn't work, which was really frustrating. ...Show All
Visual C++ application for microsoft XP using visual style
Hi , I am trying to incorporate windows XP look and and feel to my application. I have been able to dovelop a pushbutton using DrawThemeXXX functions. But is there no way by which the default button that windows generate (eb CButton) can be incorporated with XP visual Style I have added the .manifest fiel and also uxtheme.dll , but the default button is still the old style, I am able to generate XP style buttons only by using the DrawThemeXXX functions. Are themes not supported by default in windows MFC If yes, how do I enable theme in my application Pl help . Which version are you using This group is for Visual C++ 2005 solutions. If you are using VC 2005 then you ...Show All
Game Technologies: DirectX, XNA, XACT, etc. why my VS2005's ToolBox hasn't the XNA tab
I have already installed the XNA CTP and MC2 ,but when i build a new project, there is no XNA tab on my left side of my toolbox. There is only <Design> <MSBuild><General> , I saw the XNABuildTutorial movie...There is a XNA tab.. how can i see my XNA tab Thanks~! Try this it should work for you: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=338969&SiteID=1 Thanks! ...Show All
Software Development for Windows Vista Accept() error when spawning a task
I am trying to spawn a task to listen for socket connections which will then spawn a task to receive from the connection. The problem I am having is that when I spawn the task the accept() returns an error of ENETDOWN (50) saying that the network is down. However, if instead of spawning the listening task I simply call the function the accept() returns fine. Here is the code... //Spawning a task int main() { taskspawn("listenTask", ListenForConncetion, 100, 0); Time t = {9999, 0}; Sleep(&t); Exit(0); } void ListenForConnection(void) { bind(listenSocket, (sockaddr *)&listenSocketInfo, sizeof(listenSocketInfo)); ..... listenSocket = socket(AF_INET, SOCK_STREAM, 0); ..... while(1) { acceptSocket = acce ...Show All
Visual Studio asp.net reportviewer - viewstate issue
Hi I keep getting the error "Viewstate must be enabled" I have enabled viewstate in web.config, masterpage and content placeholder. Funnily enough, it works in an iFrame. Any suggestions ...Show All
Visual Studio Team System how to start the defect id from 1?
Good Morning everyone my group has finally finished testing everything and im just wondering after we blow up our playground projects is there a way we can restart the defect id count back to #1 also what file has all the ID's stored Thanks for your time and help The ids are created in backend sql and I donot see a way to reset the value without mucking with database. Many tables store work item ids and WorkItemsAre may be the one you are interested. ...Show All
