Vaish's Q&A profile
SQL Server sys.sp_testlinkedserver
According to BOL extended stored procedure sys.sp_testlinkedserver returns 0 on successfully connecting to linked server and 1 when it fails. But I tried this Created a linked server to default instance of 2000 called TEST and used following script to test the extended stored procedure and instead of printing my PRINT statement it generated error -- CHECK LINKED SERVER CONNECTION DECLARE @ServerName sysname DECLARE @a int SET @ServerName = 'TEST' IF EXISTS( SELECT 1 FROM master . dbo . sysservers WHERE srvname LIKE @ServerName ) BEGIN EXEC @a = sys.sp_testlinkedserver @servername = @ServerName IF @a = 0 print 'LINKED SERVER ''' + ISNULL ( @ServerName , '' ) + ''' IS CONNECTED.' ...Show All
SQL Server If Exists Schema Fails
Could someone explain why IF SCHEMA_ID ( 'TestSchema' ) is nul CREATE SCHEMA TestSchema Fails with Incorrect syntax near the keyword 'SCHEMA'. Where as running the following statements CREATE SCHEMA TestSchema and IF SCHEMA_ID ( 'TestSchema' ) is null SELECT 1 succeeds without a problem. Thanks _GJK Actually the real root of your problem is that CREATE SCHEMA must be the first statement in a batch. Using dynamic SQL (as suggested in the link above) is a workaround as the dynamic statement itself is considered a new batch. -Raul Garcia SDE/T SQL Server Engine ...Show All
SQL Server MDX: Comparing measures over time (with other measures)
I think being a long time T-SQL programmer is actually making it more difficult for me to get a grasp of MDX. I am struggling when trying to compare measures. I've been reading guides online and books but can't seem to get one concept that is very important to the work I am doing - comparing 2 different things over time. Best shown with an example. I'll use the typical retail model since every book etc seems to use this one so it should be familiar. Say I have stores all over the US but I want to compare sales over time between the Seattle store and the Portland store to look and determine if a particular trend is for the whole Northwest or just Seattle. First step - lets just look at the number of sales and ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Multi threading in a game (using XNA)
Hello. I am able to create thread and make them exchange information through common objects they know (server / each other reference) Now I would like 2 threads to update a server. Each of those threads takes for inputs a keyboard for one, a mouse for the other one. However, it seems that the thread that listens on the keyboard do not detect events from it. Seems like it is the parent thread that is able to listen to a keyboard event and only that parent thread. How would you do so that a children thread is master over a device even if it does not have the focus Regards, Chryso As far as I know (which isn't that far, really), XNA is designed for all XNA-based activity to happen on the main thread. You ca ...Show All
Visual Basic Degug on only one form of a soultion
Hello. A question, please. I have a solution which has many forms. If for example, my projet doesn't compile for any reason, can I degub only a form of the solution How thanks... The entire solution is either in debug or not.... If you need to debug a single form you have a coupl eof options....the prefered method would be to put a break point in the forms load or initialize event and then step through the code to debug it...another otpion would be to export the form to a test project and debug it from there! Furthermore if your solution does not compile because of errors...the errors and warnings window will show you the line number, error, and file name for the source of the error...you c ...Show All
Software Development for Windows Vista Repeat processing for multiple users in state machine
Document review workflow with one to many reviewers. Each reviewer can approve, reject, skip, submit comments, etc. (i.e. several possible events). I am looking for recommendations on how best to implement this facet of the state machine. One idea would be to have a starting workflow (sequential or state machine) with a replicator that is driven on the list of users. Then for each repitition, start a state machine for each of the users to do their part. Matt ...Show All
Visual Studio Team System Visual Studio 2005 Team Suite 180-Day Trial
I am trying to lower the En_vs_2005_vsts_180_Trial.img file but single it lowers 4kb to me or in its 1,7 defect Gb Somebody podria to say to me of where I can lower it so that quero to prove this version Hi, you can use an ISO mounter like this: http://www.slysoft.com/en/virtual-clonedrive.html After you installed that (free) tool you can just double click the *.img or *.iso files and they will show up as content of a "virtual" CD drive which you should find as a new drive letter in explorer. From the context menu of that drive letter you can choose to unload the img file or choose another img file to attach to that virtual drive. -- SvenC ...Show All
Visual Studio Express Editions pointer to memory location
In VC++ Express is there an instruction which returns a pointer to the physical location ie the actual memory location in ram of a variable I need to work on a bitmap file loaded into the project. The & operator gives the address of the variable. int n = 1; int *p = &n; n is 1. p is the address of n. p points to n. EDIT: Here is a list of operators http://msdn2.microsoft.com/en-us/library/x04xhy0h.aspx The address of operator http://msdn2.microsoft.com/en-us/library/64sa8b1e.aspx ...Show All
Windows Forms Trying to get GUI to appear for logged in user, from a service running as System.....
I've got a service that runs from system, and it needs to reboot the client, but I can't get any gui to be displayed to the current user. Has anyone got any suggestions on how I can get some kind of popup to give the user warning the machine is about to reboot and wait for user input before the reboot takes place Thanks, Eric- Update on this, the "interact with desktop" Setting, causes a secuity risk, if you run a batch file from the service it shows up too, and if they click on it and hit <Ctrl><c> it give them access to a system permissioned command prompt... (according to msdn) So we're probably going to have to go away from that sol ...Show All
SQL Server i keep getting the error message "Interface not registered"
I am using windows media player 10 to burn cds but every time i click the button start burn i recieve the error message "Interface not registered" what do i do to correct this problem Please help me!! ...Show All
Visual Studio Express Editions TextBox and ListBox hlp me ?
Hi How can i add in listbox from textbox example we have 1)textbox 2)listbox if you put in textbox (A,Z) will be add in ListBox and if You click button "save" will be save! Thank you! to add items into a listbox: theListBox.Items.Add( item ) so from a textbox: theListBox.Items.Add(theTextBox.Text) does this help ...Show All
SQL Server Cannot Create New Database
when i am trying to connect to sql server2005 thru Visual studio i am getting an Error: "SQL Server does not allow remote connections (provider: Named Pipes Provider, error: 40 could not open connection to Sql Server)" Can any body tell me why is it happening and its Solution.... You will have to enable Remote Connections for your SQL Server instance, by default this is turned off. See the screencast on the screencast section on my website for more details. HTH, Jens K. Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Windows Forms Method that returns a control
Hey guys, I created a form that contains a single TreeView control. In a background worker I create a TreeView control, populate it, and then return it. Then I tried the following: private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { treeView1 = e.Result as TreeView; } I wanted the control I created on the form to be set to the one created by the method. However, eventhough treeView1 is shown to contain the correct number of nodes, nothing is displayed, the treeView on the form remains empty. If on the other hand I create a new TreeView control in backgroundWorker1_RunWorkerCompleted and then set it equal to e.Result, and then add it to my forms Controls propery, it all works as expecte ...Show All
.NET Development Determining Null Values
Hi, I'm currently working with a program accessing an oracle database. After querying, i display the results in a listview lvTest. Is there a way where i can determine if the returned value of the query is null Thanks. Dave. HI, Your question should have been, "How to detect if the reader returns no rows " or something of the kind. Well, since you've already figured it out here's another way of doing it: if myReader.Read() then ' Contains a result else ' Reader is empty end if What happens here is that it checks if there is some result to read. If the initial read statement fails then its more probably that your reader is empty. cheers, Paul June A. Domag ...Show All
.NET Development storing image file
how to insert an image.jpg file into a sql server database, i want a sample code. tried this Dim theContent() as byte = {} 'database stuff theContent = theReader.GetValue( FieldIndex ) replace "FieldIndex" with the column number to get the image data from when using the DataReader to read data ...Show All
