calvin_mayo's Q&A profile
SQL Server variables as column names?
I am using SQL Server 2005 and I'm creating a stored procedure that, in turn, creates some tables. The column namen in those tables will change depending on the input the user gives the stored procedure. I am having trouble getting the column names to be dynamic, however. Is this even possible If so, any tips Here is a small example (that doesn't work) of what I'm trying to do: DECLARE @ColName varchar(25) SET @ColName = 'Column1' select foo as @ColName from bar If it helps there's some info in this thread regarding the creation of tables that contain dynamically-named columns: http://forums.microsoft.com/TechNet/ShowPost.aspx PostID=1288163&SiteID=17 Chris ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Allow Users to offer user created Games through Xbox Live to everyone, Is it Impossible for Microsoft
I realize that there are challenges but, if it were, that users could offer there own creations over xbox live to all 360 owners, there would be an entirely new world to explore. I believe that it could be done. Microsoft would have an infinitely expanding library. Most commercial game creators cant take the risk of trying new and uncertain gaming ideas with production costs being so high. They would love to have the freedom to always give gamers new and unique experiences. But most times they continue the traditions that work and are going to sell. Thats why I believe that users should be given the ability to share their creations with all. We dont fear any risks and with xbox live, the downloads could be tracked and popular creators coul ...Show All
.NET Development Searching Database for results
Hi everyone i needed a little help with my coding what i wanted to do is allow my users to search a table in the database for links that are stored there for a user searches for a ringtone by a artist and the search returns any results with that value to the sure to be able to download the ringtone. I am using ODBC as well all help is appreciated well yes, you would have to do the checking and validation of what cell/columnindex they selected. So if your column "Link" was column index 1 (indexes are 0 based) then: void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 1) //columnIndex 1 being the "Link" column, just as an example ...Show All
Visual Studio 2008 (Pre-release) UsernameToken over Certificate authentication
I need to use client certificate to validate the domain of the request and user name token to validate the user in that domain. I know that this is a classic case for federation but lets ignore that for the purpose of this post. So the first authentication of the request was through certificates, which was relatively easy. Instead of passing user name and password as arguments to a method, I would like to send a user name token in the request. On the server side, I would like to validate the user credentials in the WCF plumbing. How would I go about doing the second part given that it has to happen right after the first part Thanks. I was going to try to build one for you, but at it turns out, there is a sample describing this (Jan ...Show All
.NET Development How to view button in brower using asp web form in visual studio 2002
I created the following webform.aspx: <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="MyFirstWebApplication.WebForm1" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>WebForm1</title> <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0"> <meta name="CODE_LANGUAGE" Content="C#"> <meta name="vs_defaultClientScript" content="JavaScript"> <meta name="vs_targetSchema" content="http:// ...Show All
Visual C++ project configuration: optional custom output directory depending on an environment variable or a temporary file
hello, I've got the following issue: we have a C++ solution and the projects generate their outputs to "$(SolutionDir)\out". Now it's sometimes desirable to put the outputs somewhere else (e.g. when the $(SolutionDir) is read only). The problem is that source-controlled files must not be changed in order to switch output dirs (people will tend to accidentally check them in and kill the nightly build). It is possible to make developers set an environment variable set prior to launching VS2005 like "MY_OUT=C:\out" in case they want an alternative output dir. It is also possible to create new files to do this. No VB macros or plug-ins allowed (too high maintenance effort). The alternative output directory is generall ...Show All
SQL Server A call to SQL Server Reconciler failed. SQL Server 2005, SQL Server Mobile merge replication
Hi, Iam trying to perform merge replication between SQL Server 2005 and SQL server mobile. It has previously been working. Recently something is causing the following problem when i try to perform the merge. I grabed the following output from the replication monitor. Error messages: An error occurred while reading the .bcp data file for the 'MSmerge_rowtrack' article. If the .bcp file is corrupt, you must regenerate the snapshot before initializing the Subscriber. (Source: MSSQLServer, Error number: 2147767868) Get help: http://help/2147767868 The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message ...Show All
SQL Server Importing AS 2000 cube into SSAS 2005
Is there any way to import a cube created in AS 2000 into SSAA 2005 If not a direct import is there any way to make that job easier Any suggestions/pointer/comments would be helpful. I have a lot of AS 2000 cubes and I am really sick of that development environment! You can use the Migration Wizard (search for MigrationWizard.exe in the SQL installation folder, or right click on the server node in SQL Management Studio and use 'Migrate ...'). The wizard requires AS2000 to be running and can generate a migration script (that can be later run on AS2005 with SQL Management Studio) or can migrate directly to AS2005. You cannot restore AS2000 backup files (.cab) on AS2005. Adri ...Show All
SQL Server Function call in Insert Statment
Hi i m trying to call a function in insert statment Insert Into (value, value1) Value(@value, dbo.function(@value1) dbo.function returns a value, when i test the function in querry builder all goes fine. In my program i become a error "Parameterized Query '' ' expects parameter @value1 , which was not supplied." I m using visual studio , tableadapter.update function to insert datarecords in db thx for help Hi, seems that you only provided 1 paramters within your query statement / parameter collection. The statement expects 2 value / value1 which both have to be supplied, if this is the same paramter you can just use the same name for them Insert Into (val ...Show All
Software Development for Windows Vista Determine type of ActivityBind's target
I have a custom activity. This activity has a property that at desing time is bindable. I would like to do something at desing time (retrive the methods of the type) with the target of that ActivityBind. Currently I did the following. I get the parent workflow by walking up the Parent property till null. When getting the workflow I use the method GetActivityByName to find the ActivityBind.Name activity, and then I try to get the ActivityBind.Path property. The problem is that , at design time, the top activity (ie the workflow) is not my type but the base type. That is if the if I have : public sealed partial class Workflow1 : SequentialWorkflowActivity workflow.GetType will return SequentialWorkflowActivity while at run ...Show All
Visual Studio Team System Load test – Turning threshold Settings to off
I ran a smoke load test as per your walkthrough in the help section. Even though the tests passed, there were several threshold violations and errors. Most of the errors were related to the threshold violation. I read in one of the professional books on VSTS, that there is an option in VS to turn the setting to off, so that these threshold violation messages wont appear. They did not mention how to do it. I could not figure it out in Visual Studio. Kindly advice. 2162 The two default threshold rules are associated with the counter definition in the Load test. To remove the rule associated with counter "Avg. Connection Wait Time" ...Show All
Visual C++ const_cast and mutable
Hi All, Anybody can give some realworld scenarios on using const_cast and mutable objects Brian Kramer wrote: Conventionally, you should expect that a mutable data member's value would never change the result of calling a const member function: i.e. you must maintain the illusion of read-only. Depending on the actual motivation for the use of mutable, one could also be in a situation where mutable would mean a totally unreliable piece of data -- which is likely to change, regardless of the interface. This is usually a good reason to document the code properly :) Brian Kramer wrote: I don't see a very strong justification for ever const casting. I usually do this when I'm coding again ...Show All
Visual C# How to insert a paragraph?
I'm very new to VS.NET C#. I'm creating a simple app. to launch a flash tutorial. In the form, how do I insert a paragraphc explaining what this app. is going to be I tried the Lable control but it does not give me multi-line option. What do I need to use Thanks! maybe you should set the autosize = true on the label if you have not already. you may also maybe wish to use a multiline textbox, setting it to readonly does this help ...Show All
Windows Forms tableadapter + connection pooling + corrupt connections in pool
Hi, let's say we have plenty of table adapters in application and connection pool corrupts pretty often. How nice and elegant with minimal rewriting make those table adapters work without exceptions using this (or if you get the point of the problem and know better one) solution (idea in pseudo code): try { fill datatable using adapter with plenty of usrfull data } catch { looks like our connection pool has corrupten connections, let's clear it try to use table adapter to fill datatable once again } Yeah, disabling connection pooling - that's easy way but it hits on performance, especialy using table adapters - on each fill operation connection is opened and closed again, if for 1 page renderi ...Show All
SQL Server SQLAgent doesn't cycle log gracefully
Scenario: SQL Agent job calls "EXEC msdb.dbo.sp_cycle_agent_errorlog" once a week to cycle the SQL Server Agent log. Job is owned by "sa". Most servers run this with no problem, but one active node of an active/active SQL Servers cluster fails with the message: Executed as user: DOMAIN\SQL_Service. SQLServerAgent Error: The process cannot access the file because it is being used by another process. [SQLSTATE 42000] (Error 22022). The step failed. The SQLAgent job actually appears to be doing its job... a new SQLAgent.OUT is generated with the event: (Date/Time)+ [412] Errorlog has been reinitialized. See previous log for older entries. If I try renaming the file SQLAGENT.OUT, I get the message "It is ...Show All
