Rory Becker's Q&A profile
SQL Server Various parameter inputmethods
hi, I'm desperatly searching for a way to incorporate various types of paramter-input. I want to use the following available options in my parameter-box: 123..456 meaning all records between '123' and '456' 123|456 meaning all records that are equal to '123' or '456' 123% meaning all records that begin with '123' 123 meaning all records that are equal to '123' I tried to use functions to create where-clausules, they are created ok, but I can't get them to work in a query... ---------------Begin Function-sample----------------- FUNCTION ParamParserFn(@column varcha ...Show All
SQL Server Joining two fields in a query
I am trying to join two fields in a query in SQL 2000. For example. Update myTable SET field_1 = @field_1_value , field_2 = @field_2_value , field_3 = @field_1_value + ' x ' + field_2_value Is this even possible. I want the user to input values for fields 1 and 2, then in the background combine the two and insert that value in field 3. Thanks in advance, Scotty_C that'll work! there's just a typo for the @field_2_value Update myTable SET field_1 = @field_1_value , field_2 = @field_2_value , field_3 = @field_1_value + ' x ' + @ field_2_value ...Show All
Visual Studio Express Editions How to make the setup.exe to deploy my application into a specific directory?
i'm using vb.net express 2005 to make a fairly simple game with only one project application and a few pictures... i have figured out how to deploy the pictures, in a path relative to the parent directory...but couldn't find out how to make the setup.exe to ask me where to put the parent directory... right now when i run setup, it deploys my application into something like: c:\documents and settings\user name\ local settings\ app\ ........and something weird... i want to be able to change the parent directory during setup... someone told me that the reason it deploys the app into that directory is because it's more convenient to ...Show All
Windows Forms IToolboxService and the DesignSurface class
I am trying to use the DesignSurface in VS 2k5 Beta2 and I'm a bit confused when it comes to the interaction between it and the IToolboxService. I have an implementation of the IToolboxService and I have added it to the DesignerHost. My toolbox service uses a treeview to show the controls available and in each category (root nodes) I have a selection pointer node and various other windows forms control nodes. When I drag say a button ToolboxItem on to the surface I get a button. I then react to the SelectedToolboxItemUsed method on IToolboxService to change the selected node in the tree to the selection pointer. If I then click on the desig ...Show All
Visual C++ Trouble using registers from SSE2
Hi. I want to implement software that should gain performance by storing, operating and reading values that are stored either in XMM registers or in the newly available additional (AMD64) GPR registers. I have to use Visual Studio 2005 which doesn't provide inline assembler any more so that I have to use intrinsics. With them I want to store values in a predefined manner to all XMM registers. Therefor I use 16 _m128i variables, hoping that every one of them maps to a xmm register. But when decompiling the intrinsics, I see, that the compiler is writing the data always in just one or two registers overwriting the other value ...Show All
.NET Development Oracle Alias-List from tnsnames.ora
Hello everyone! Is there any easy way to get a list of all known Oracle-Aliases from tnsnames.ora Either built in in ADO.NET, or from a 3rd party vendor Please be kind with me, as I'm a total newbie to all this .NET stuff! :-) TIA, Holger Hi Holger, There is nothing in the ADO.Net Oracle Provider that will allow you to list aliases in TNSNames.ora file. I am not sure if there are other party vendors who do it. You might be able to parse the file yourself though. Hope that helps. ...Show All
Visual Studio Changing crystal reports connection string dynamically
I need to switch between the databases at runtime for my crystal reports in .NET 2.0. Is it possible to change the crystal reports connection string at run time in .NET 2.0 Please provide me any sample code which illustrates dynamically changing the connection string of crystal reports at rune time. Thanks in advance, Vaishu Hi, If I understand well uor cristal report is linked with Datatbase 1 and in run time u want to change the source ... In thant case the return data have to get same struct becouse in other way the Creport reise the error. So u have to make new conection Private Sub Form1_Load(ByVal send ...Show All
Visual C# Casting an enumeration that has a defined type..
public enum foo : ushort { foo, bar } ushort test = foo.bar; Cannot convert from 'Test.foo' to 'ushort' Sure, I can make variable of type foo, but I'm encoding the value to a network stream, so I want it as a ushort. The thing is, I specifically told the compiler the enum is of type ushort, so why do I have to typecast it You need to cast it :-) ushort test = (ushort)foo.bar; Oh - you said *why* do I have to cast it Because C# is a strongly typed language, IMO it requires casting more often than it really should, but at least it's not VB :P ...Show All
.NET Development Taking Values
Hi Ive been trying to figure out how to take a value from a cell in a datagrid that imports data from excel so that i can take the value perform a calculation and move it to another cell on another datagrid but i cant find a way to remove the value or move it can anyone help plz its urgent! thx The purpose of the datagrid control is primairly for display purposes. If you want to manipulate the data, you should manipulate its datasource. Can you post some code, so I can see what you are trying to do ...Show All
Visual C++ Can I write a file longer than 2gb on ntfs disk using fputc etc. in VC++ 2003?
Can I write a file longer than 2gb on ntfs disk using fputc etc. in VC++ 2003 I have created AVI files larger than 2gb on XP-ntfs disk but none of the media programs (WMplayer. VirtualDub) can read them. Any suggestions where to start looking for the problem. Thanks, RON C I would suggest for starters that unless it gives you this ability especially, that you should not use fputc ( unless you're coding in C ). Use iostreams instead. I've done the same ,written files > 2GB and found they could not be read. The tail end of your question makes me wonder if you're really asking if the files you create can later be read ...Show All
SQL Server Date parameter format incorrectly interpreted
Hi, I am using SQL Server 2005 Reporting Services. I have a report with a Startdate and Enddate parameters setup through the report parameters box. The datatype is datetime, so I have the date pickers. My machine regional settings are set to Ireland for datetime format dd/mm/yyyy. The database field being queried is storing the date as dd/mm/yyyy. My problem is when I type in the values Startdate = 01 aug 2005 and Enddate = 31 aug 2005. The report runs correctly, but it refreshes the parameter boxes and if I try to run it again I get the following message "An error occured during local report processing. The value provided for the report pa ...Show All
Visual Studio Team System TestClass getting instantiated for each TestMethod run?
It seems as though a new [TestClass()] is instantiated before each [TestMethod()] is run. If that is the case, then there is no clean way to preserve state within the class between runs of each [TestMethod()] . This seems like a pretty major "flaw" in either my assumption about how I expected this to work or in the actual implementation. Example: Based on the code sample below, If I have an ordered test that runsTestMethod1 and TestMethod2 in order, my output will be: 1 2 ...versus if I just run TestDriver(), I will get 1 12 [TestClass()] & ...Show All
Visual Studio Tools for Office VSTO Cypress : Where's the CTP?
In her Cypress announcement, KD Hallman said you'd be able to download a CTP from http://msdn.microsoft.com/vstudio/future/ however there's only a link to the June CTP of VSTO v3. Am I right in thinking that the Cypress CTP hasn't been added to the page yet, or are they the same product Thanks, Ant Reza Chitsaz - MSFT wrote: Hi Ant, they are the same product. The VSTO v3 CTP is the Cypress CTP that KD mentions in her announcement. Are you sure Reza In his blog post yesterday , Thomas Quinn said that VSTO v3 is for release with Orcas. That sort of fits with the impression I got ...Show All
Windows Forms ? How to Use Delay Signing With Click Once ?
This is turning into a major nightmare. We have to delay-sign all our assemblies, because we use Dotfuscator. In theory, this should be no problem because we should be able to delay-sign everything, then run dotfuscator on everything, and then sign everything. Super. The problem comes when trying to publish the application using Visual Studio - or rather, the problem is that we CAN'T use Visual Studio to publish it. This is because we need to manually sign and Dotfuscate the compiled output of the project. If I try to get clever and copy the dotfuscated version back into the bin\debug folder before Publishing, Visual Studio will overwrite ...Show All
Visual C++ Floating point stack overflow
My application works fine in VS2003, but in VS2005, it is producing an overflow of the floating point stack. This seems like it must be a code generation error in the new compiler. Has anyone else experienced this problem In the particular case I am looking at, I step through the instruction FLDZ in the disassembly window. Instead of getting a zero in ST(0), I get 1#IND, and the SF and C1 bits are set in the x87 FPU Status Word. The first time through this code it works OK, but this second time through, the FPU tags register shows that the stack is full before the FLDZ instruction. Bug is fixed in VS2005 SP ...Show All
