2162's Q&A profile
SQL Server Return Value when a query does not return any values
SELECT @NEWVALUE = inserted.VALUE,@EQNAME = inserted.TEST1 FROM inserted where inserted.TEST2 = 'Area' When the result of this query does not return any records, how do i check this condition by looking at the NEWVALUE variable Checking NEWVALUE against null or "" does not seem to work. SELECT @NEWVALUE = inserted.VALUE,@EQNAME = inserted.TEST1 FROM inserted where inserted.TEST2 = 'Area' IF (@NEWVALUE is NULL) BEGIN PRINT 'NO ROWS RETURNED' END When i run this query and the query does not return any values, i do not see the print statement getting executed Yes I agree with Arnie, if the inserted value is ...Show All
Visual Studio 2008 (Pre-release) WPF Window handling keystrokes from SendKeys.SendWait() correctly?
Hi Microsoft, My team is working on an automated UI test. We have a .NET 2.0 C# app which sends keys to the active UI using SendKeys.SendWait(). We pointed our test app at a WPF window (running on XP SP2 with .NET 3.0 RTM) and noticed some strange behavior. Upon further inspection, it looks like the WPF KeyDown handler (on the Window control) is receiving extra keystrokes from our test app, but only when we pass-in upper-case characters to SendKeys.SendWait(). For example: SendKeys.SendWait("B"); produces the following output from our WPF KeyDown event handler: ** HandleKeyDown ** e.Key: Escape, e.KeyStates: None, e.KeyboardDevice.Modifiers: Shift ** HandleKeyDown ** e.Key: B, e.KeyStates: Down, Toggled, e.KeyboardDevice.Modif ...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 2008 (Pre-release) How to instantiate PropertyPath for the StoryBoard with the Dependency property in C#?
Hi All Below is the Xaml Code which is working as per the need to animate an image. I am tring to animate the same image through C#. Can Someone help in Setting the Storyboard.TargetProperty in C#. How to instantiate PropertyPath for the StoryBoard with the Dependency property for Image Translate.XProperty in C# as shown below eg. ( UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X) which is in XAML. < Grid xmlns = " http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x = " http://schemas.microsoft.com/winfx/2006/xaml " xmlns:ccl = " clr-namespace:CustomControlLibrary;assembly=CustomControlLibrary " xmlns:mc = " http://schema ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XWB/XSB opening and extraction
Hi, Is there a way to open only XWB and XSB files without an XAP I have an XWB file which I want to extract data from, but when I open it with XACT it says the project file has 1 or more missing values. What does that mean Wavebank (.xwb) and soundbank (.xsb) files are generated by the XACT GUI from a project file (.xap). The XACT GUI cannot load the generated files, it can only load .xap files. The binary format of the wavebank file is documented in the header xact2wb.h. Using this header, you can write a tool to parse data from the wavebank. The binary format of the soundbank file is not documented. ...Show All
SQL Server #@ Row 1, Column 7: String data, right truncation @#
I am trying to BCP a ton of data files into a SQL 2005 database. The first row of data in one of my files looks like: 1000|100000156752|100000176409|100000000000|100000000000|9.4|M|9.4||1/22/1993||1||||100|||||||||1|1/22/1993||||||| The error file has this: #@ Row 1, Column 7: String data, right truncation @# 0 0 0 0 0 .00 17|27.7|M|27.7||2/2/1993||1||||100|||||||||1|2/2/1993||||||| I've built a format file based on the SQL Table definitions with this command: FOR %%f IN (*.*) DO bcp IRIS.dbo.%%f format nul -T -n -t"|" -r"\n" -f%%f.format The format file for lines 1-8 look like: 1 SQLNUMERIC 1 19 "|" 1 SITE_ID "" 2 SQLNUMERIC 1 19 "|" ...Show All
SQL Server Connecting to ODBC Connections with Report Services
I have just migrated from SQL 2000 to SQL 2005 and in the process upgraded to new hardware. I am now running SQL2005 (64 Bit) on Windows 2003 R2 (64 Bit). The problem is that when i deploy some reports to the new server that use ODBC to connect to the data, reporting services is erroring with : Data source name not found and no default driver specified The ODBC connections are set up exactly the same on the old server and the new server. Is it because it is looking for a 64 bit ODBC driver and not the 32 Bit one I have installed. If i go into the SysWOW64 and run the odbcad32.exe i can see the drivers and the connection. The connection test works fine from here. Thanks Did anyone get this resolved I am having the sa ...Show All
.NET Development backing up DB in C#
Anyone have a simple method using C# to backup and restore a database Since each table is already mapped via dataset, I'm trying to save all the contents to a flat-file and then reload later if necessary. JS public class BackupManager { Server srvSql ; SaveFileDialog saveBackupDialog = new SaveFileDialog (); OpenFileDialog openBackupDialog = new OpenFileDialog (); DatabaseCache dbCache = DatabaseCache . Instance ; private string GetAppPath () { return System . IO . Path . GetDirectoryName ( System . Windows . Forms . Application . ExecutablePath ); } private void Connect () { ServerConnection srvConn = n ...Show All
Internet Explorer Development Onchange is fired after BeforeNavigate
Hello, I'm hosting the IE-Webbrowser Control in an C++ Application. I have implemented EventSinks for all BrowserEvents like DocumentComplete & Beforenavigate . At DocumentComplete i add an Eventsink via the Advise-Mechanism. The HTML-Testpage contains a Selectbox with a javascript that gets called on onchange . The javascript initiates a Navigation to another url. Here is the Problem : When i select something in the Selectbox, the BeforeNavigate for the new Page gets called before the OnChange -Event in my EventListener is called. Is there a way to get the Events in the right direction, because i wan't to cancel the Event-Propagation (that the javascript is called) for some selected items in the selectbox. ...Show All
Commerce Server Commerce Server 2007 catalogwebservice and bizTalk 2006
Hello, I would like to update stock items in Commerce Server 2007 using BizTalk 2006. What I can see so far is that I should be using the Commerce Server Inventory BizTalk Adapter. I am not sure how you would use this Adpater to update the quantity and query the quantity of Products in the Commerce Server catalog Can anyone shed any light on this issue Thanks Dom Dom, I'm using the Biztalk Inventory Adapter to handle my inventory stock with no problems. The OnLine Help is very usefull to get a direction to start the development. This links could be usefull Working with the BizTalk Adapters http://msdn.microsoft.com/library/default.asp url=/library/en-us/CS07Default/html/02afcee1-554 ...Show All
SQL Server SQL Server Management Studio Express - cannot find SQLEditors.DLL
In SSMS Express, after right-clicking on a table and then clicking on "Open Table" or "Modify", this error was displayed: " The system cannot find the file specified Microsoft.SqlServer.Express.SQLEditors" . This file does exist and is in the same directory as SSMSEE.EXE (C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE). Other context menu items "Script table as" and "Properties" work fine. I did not try the other context menu items. Is this something that is fixable Version Numbers: Microsoft SQL Server Management Studio Express 9.00.2047.00 Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158) Microsoft MSXML 2.6 3.0 4.0 5.0 ...Show All
Microsoft ISV Community Center Forums Protecting formulas in cells
Hello, Other than coding formulas, is there a way to protect a cell in an excel spreadsheet, no mater, if the sheet is protected or not, so that formulas can not be erased or overwritten Thanks Chrstdvd Well Andy, I mean that I have a macro that has code like this Range("H22") = "=Sum("A5:A16")". I had the idea to just make a macro that repopulates the cells with the formulas prior to the Save command. That would at least have the formulas ready for the next days work. I will not go into why or how the store managers erase them. Most of the time all I hear is: "The computer just did it". thanks Chrstdvd ...Show All
Software Development for Windows Vista Some questions
Hi, Some generate questions: 1) For Sequential Workflow, I can track the Instance History without using SQLPersistenceService, but for the Statemachine workflow, I must start the SQLPersistenceService before I can get the tracking history, is that true 2) In Beta 2.2, I remember we have the script to create the SharedPersistenceAndTracking database. But for the RC version, where can we get the Sql Script to generate the Shared store 3) After the workflow completion, we can get the Output Properties within the workflow instance with e.OutputParameters("ClaimAmount"). But before the completion, how can be get the properties (such as the Claim Amount we send to the workflow when we start the workflow) from the Workflow T ...Show All
Visual Studio Express Editions DropDown Box???
I need a Dropdownbox control.. I currently am using the combobox control but this allows the user to type in the control as oppose to using the dropdown feature. I only want the drop down feature and to make the user select one of the predefined entries. Any help would be great. me . ComboBox1 . DropDownStyle = ComboBoxStyle . DropDownList ...Show All
Visual Studio Team System custom views in TFSWarehouse
We want to add some custom views to the TFSWarehouse to facilitate reporting against the relational data. What is recommended best practice for doing so Can I create them under dbo without worrying about them getting blown away in an upgrade Or should I create them under a different owner If I do create them under a different owner, are there any potential visibility issues (due to security constraints) Thanks in advance. Bernie Hi Bernie, The relational warehouse schema is primarily targeted at providing data to the TFS Cube. However, many reports are easier to author against a relational database, particularly if the report author is more fluent in SQL than in MDX, the query lang ...Show All
