Talyrond's Q&A profile
SQL Server Query Results to Text
With Query Analyzer I would run queries that returned text results that I would output to a text file. When I run the same queries using SQL Server 2005, the text output files are twice as large and the are non-printable characters visible between each printable character. It turns out that it's inserting a hex 00 between each charcter. How can I turn this off I need straght ASCII text output files. Thanks in advance,, rdomo Here is a blog entry on just this subject. I think it will do what you want, if you are doing this interactively: http://sqljunkies.com/WebLog/outerjoin/archive/2006/10/03/23776.aspx You can use SQLCMD to output the text, and if the input file is ascii, it will give you what yo ...Show All
Windows Forms "Refresh the data table" works for everything but identity columns
Hi. I have a project with a datatable and adapter, made with the designer. The option "Refresh the data table" is checked for the adapter. The table is bound to a datagridview on a form. When I load the form, I change the incrementseed and step to -1 to avoid conflicts. The table in the database has a trigger on it that fills one of the columns (sector), depending on values in some other columns. There's also a "save" button on the form that simply calls the adapter's update method. Now when I add a new row to the datagridview, the new row gets an ID of -1. Then when I push "save", the row is saved in the database with a new ID, let's say 86 for example. Also the "sector" column is automa ...Show All
Software Development for Windows Vista socket bind fails under vista
ive got a program im trying to get working under vista, which works fine under XP. In particular its part of the enet network library heres the code snippet: ENetSocket enet_socket_create (ENetSocketType type, const ENetAddress * address) { ENetSocket newSocket = socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM SOCK_DGRAM : SOCK_STREAM, 0); int nonBlocking = 1, receiveBufferSize = ENET_HOST_RECEIVE_BUFFER_SIZE; struct sockaddr_in sin; int bindResult = 0; memset(&sin, 0, sizeof(struct sockaddr_in)); if (newSocket == ENET_SOCKET_NULL) return ENET_SOCKET_NULL; if (type == ENET_SOCKET_TYPE_DATAGRAM) { ioctlsocket (newSocket, FIONBIO, & nonBlocking); setsockopt (newSocket, SOL_SOCKET, SO_RCVBUF, (char *) ...Show All
.NET Development .Net Web Services
Help Help Help. This will be an easy question for you veteran .Net developers. Here goes. I created a simple web service to add 2 numbers on machine A. I compiled it to create the .asmx file. In Visual studio 2.0 I did a "View in Browser and the service works great. I then created a windows app to call the web service on machine A. I created a web reference to the service from the windows app. I called the web service and it worked perfectly by instantiating the service to consume it. I then tried to create the same windows forms application on machine B. I can't get the windows application to see the web service on machine A even if I try to reference it using the ip address of machine A. Any Ideas. I've checked ...Show All
Visual Studio 2008 (Pre-release) How to move ListBoxItem up and down in ListBox?
Hi, can any one tell that how can move the ListBoxItem up and down in a ListBox.I am able to delete specific item but not able to move them. Hi I want to give this facility to the user, i.e he selects the ListBoxItem and then he presses the move up and down button. If u have any sample code for this please send me.I have done this in .net(ver 2) but i am not able to this in wpf. ...Show All
SQL Server Rebuilding the system merge repl indexes
Hi, We have a client that has a large (5Gb) database replicated to 13 subscribers, the publisher is Sql 2005, the subscribers are Sql Express. The publication has as few filtered articles too. I have found that after several months of continuous running Replication Monitor is taking a long time to report history on each subscriber. Do people tend to rebuild the indexes on the system merge replication tables on production servers, or should the standard replication jobs take care of this Thanks for your help Graham Things took at turn for the worse yesterday. I had to reinitialize one of the subscribers because for some reason the publisher had decided to delete its merge meta data (the thing t ...Show All
Windows Forms setup.exe that doesn't require .NET 2.0
I've created a setup project with VS2005 and can run my install fine on systems with .NET 2.0. On many of my customer's systems, they do not want to install .NET. Currently when I run my setup.exe it goes off and tries to install .NET 2.0 first and fails if I don't. How do I create a setup.exe/.msi that does not require .NET 2.0 on the system doing the install No, there's no way to do that. There's only one installer for the .NET Frameworks 2.0, it's a system/platform component that once installed allows a bunch of applications to run on it. One of the great things about our bootstrapper is that if the Frameworks is already installed, it won't download or re-install it. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Why is Game not a singleton?
I'm a bit puzzled by this - why is the game class not a singleton, i.e. there is and can be only ever one instance of it. I can't quite see any sensible reason to have more than one of them, but as it doesn't seem to be a singleton, I have to hold a reference to it anywhere I want to access game services from. Otherwise I could have just written Game.Instance.Services when I wanted access to them. Or perhaps I have missed something obvious (I know I can make my class that is derived from Game use this pattern, I'm just curious as to why it wasn't done like this in the framework in case I shouldn't be doing it either). Fluxtah wrote: Is there a reason you dont want to do th ...Show All
Visual Basic Runtime Errors
Hi there I am involved in a product that has been known to develop some Runtime Errors. Many have been sorted out by the developer, but I have to search the net sometimes for resources. Does anyone here know of some good sites that help with Runtime Errors - do they give clear indications where the problem might be. The one I have had the moment is - Runtime Error 53 File Not Found. Like I say I am not the developer of this and know absolutely nothing about the program as such. My job is to try and help research - when he is not about which i often - what may have happened. Obviously with the above a crucial file has gone missing, but it is not defined. I am not sure if it is a .dll file or a more simplistic file. Users ...Show All
Visual Basic Data Binding an RTF Textbox (VB.NET 2003)
Hello! How do I bind an rtf textbox Can you please provide some code samples I would really appreciate it :) Thank you, Shawn Whats the problem binding to a richtextbox shouldnt be anything strange. Here's a simple example that creates a datatable and binds it to a textbox, richtextbox and a combobox. As these are all bound to the same datasource, changing the item in the combobox causes all the other items to update. As the data bindings can allow you to bind to any property - normally we bind to the text property but there is no reason why you cant bind to almost any property on controls. Public Class Form1 Dim dt As New DataTable Private Sub Form1_L ...Show All
Visual Basic run application when system is not getting any response
hi all, in my application i should open a form when system dosent get any response like how the screen saver is on when system dosent detect any input for a particular time when my appliction is running on the desktop and the system did not get any response for 5 min then i should run a form asking the user to in put some text can any one help me please i developing the application using vb.net 2005 and its a windows application when my application is running on the desktop and the user did not give input for more than 5 min i should open a form prompting the user the reason for the break the form will be in my applictation only ...Show All
Visual Studio MSB3061: Unable to delete file "bin\Debug\<<DLLName>>". Access to the path '<<ReferencePNE>>' is denied.
Hello... I'm having problems compiling my project in Visual Studio 2005. After I compile the first time (after startup), I can't compile a second time because the DLL reference appears to be locked. The reference in question is actually a PROJECT reference. I have all references set to CopyLocal = False, but still have the error. This project is still relatively simple... any thoughts Here's the specific message: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2313,9): error MSB3021: Unable to copy file "obj\Debug\BidManager.Data.dll" to "bin\Debug\BidManager.Data.dll". The process cannot access the file 'bin\Debug\BidManager.Data.dll' because it is being used by another process. Below ...Show All
Visual C++ error C3641 - invalid calling convention
Hi all, I'm new to VS2005 C++ / .NET and I've inherited some code that requires porting to VS2005 C++ .NET. I get the following error when compiling with clr/pure: error C3641: 'CWThread::Redirector' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe The relevant offneding class code is: //The method to cast the inheriting classes Run method to the required type. static DWORD WINAPI Redirector( LPVOID Arg ){ CWThread* ThreadPtr = (CWThread*) Arg; return ThreadPtr->RunWrapper(); } //Wrapper method for the Run method DWORD RunWrapper( void ){ TVoidPtr ResultPtr; //Call the run method R ...Show All
SQL Server Multi level document map
Hello, I am using SRS 2000 and was wondering if there is any way to have more than 1 level in my document map. Here is the scenario: I have a report that displays Customer Contract 1 Project 1 Project 2 Contract 2 Project 1 Project 2 etc... I would like the document map to include a list of Customers, Contracts and Projects as some people who view the report know the contract code they are interested in, others know the project code and others know the customers. However, when I set it up I get a list with them all jumbled together: Report Name Customer 1 Project 1 Customer 2 Contract 1 ...Show All
Visual Studio Team System Transition rules clarifying
Hi. Could you please help me I am customizing task workitem now and, for example, I need the transition from Closed to Active state with reason “Reactivated” to be made only by ProjectManagers group and with all the other reasons by anyone. How should I specify the rules I am sorry say that ability to edit field values based on groups is not available in v1 so what you want to do is not possible at this time. Thanks, Mohammad ...Show All
