halebob's Q&A profile
SQL Server % remainder in SQL
In t-sql you can do the following to check if a value is odd or even. If it returns a 0 then the number is even, if it returns a 1 it is an odd number. select @Value%2 I need to do something similar in a backgroundColor expression in RS 2005, any ideas I dont see any built-in function for this. You could do something like this and just use the boolean result(pseudocode only, not tested) (@Value/2 = CInt(@Value/2)) ...Show All
Visual Studio Express Editions Unable to copy from obj\debug to bin\debug
I get the following error when I try to run my program. Error 1 Unable to copy file "obj\Debug\HomeInventory.exe" to "bin\Debug\HomeInventory.exe". The process cannot access the file 'bin\Debug\HomeInventory.exe' because it is being used by another process. HomeInventory I get this same error when I'm trying to build a class library which contains custom controls. It seems that visual studio has it locked: I can restart visual studio, or switch to a different project and back again, and I can build the library successfully, once. I can then run the app in debug, but if I make changes and try to run it again I'm ...Show All
SQL Server SSIS datatypes issue.
Dear all, I’ve made a SSIS package which take a sql statement and carry on to the .xls file but when I launch that package appears these errors: Error at Data Flow Task [Excel Destination [31]]: Column "descripcion" cannot convert between unicode and non-unicode string data types. (Microsoft.DataTransformationServices.VsIntegration) Source table have the following structure: CREATE TABLE [dbo].[SIN_Siniestro] ( [Siniestro] [numeric](9, 0) NOT NULL , [Descripcion] [varchar] (1000) NULL , [FAlta] [datetime] NOT NULL , [Estado] [tinyint] NOT NULL , [FModif] [datetime] NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIM ...Show All
Windows Forms datarowview.isedit always returns true?
Hi I have a win form with a couple of databound textboxes. it's set up as follows: 'fill the ds 'bind the textboxes txtUsername.DataBindings.Clear() txtUsername.DataBindings.Add( "Text" , _TheDS.Tables( "Users" ), "Username" ) _TheCM = DirectCast ( Me .BindingContext(_TheDS.Tables( "Users" )), CurrencyManager) -------------- Dim dr As DataRowView dr = CType (_TheCM.Current, DataRowView) dr.IsEdit will then always return true, even if nothing's edited in the textboxes. dr.IsNew wokrs as expected and returns true if a call to _thecm.AddNew() has been made, and false otherwise. Why i ...Show All
Visual Studio Team System Can't get past the 26204 error
I cannot seem to get the data tier installed, it keeps failing with a 26204 error but I can't see anything obviously wrong. I've checked the list at http://blogs.msdn.com/askburton/archive/2004/09/03/225386.aspx but everything still seems OK. - The server is a Windows 2003 Enterprise Edition (not SP1) server. - It's a member of a 2003 Active Directory. - I've created a domain account called TFSSETUP and added this to the servers local administrators group. - I've installed IIS on the server. - I've installed the April CTP of SQL Server 2005 (as recommend by this post http://forums.microsoft.com/msdn/ShowPost.aspx PostID=67956 ...Show All
Visual C# Printing A Windows Form
I've done a bit of research and it looks like there is no real easy way to print a windows form. What I'm after if the ability to print my form, which contains only labels and one image. The main technique seems to be redrawing all of these controls to a graphic object, then sending that object to the print dialog. My question was, is there an easier way to print just a windows forms with labels, that has no buttons, or textboxes, etc on it Are there any free or relatively cheap components that can make this easier I've looked at the PrintForm for $299 but was hoping for a cheaper or easier way of doing this. Is there something new ...Show All
Visual Studio Team System Can a DataSource be anything other than a table?
SPROCs, dynamic SQL queries and views would all be very useful data sources. Tables are very limiting, especially when testing systems that don't have database delete capabilities I know, such a system was not designed with testability in mind, but that's my reality. I suspect its a common reality. SPROCs and SQL Queries are specifcally not supported in this version. You can always execute these SPROCS or Queries into some temporary tables then databind to those. Though not as straight-forward is the built-in databinding it should work. One interesting thing to note that Our databinding will only incl ...Show All
Visual Studio Express Editions Working with Panels ???
Hi I intend using 1 form with multiple layers to display different information. So I am attempting to use panels on my form to do this. I am going to use hide and visible commands to display the required panel depending on user selection. Is there an easy way to work with multiple panels when in design view As once a panel overlays another one I cant access the bottom panel with out physically moving the top panel out of the way. I have tried the bring to the front, send to the back and also the option select panel1 (which is the hidden one) it gets select but it still remains hidden behind the top panel (i.e panel2). It's g ...Show All
Software Development for Windows Vista Tiny question about MSDTC behaviour
Can MSDTC abort\rollback transaction if I create instance of COM-object (COM object marked as "Transaction - Not supported" in "Component Services" snap-in) during "transactioned" part of .NET code Which way MSTDC will act Alexey, MSDTC can abort a transaction at any time. By creating a COM+ object marked "Transaction-Not Supported" you will ensure that the code that runs in that component will not participate in the transaction of the caller (if any), nor the component will create a transaction of its own. I don't understand what you mean by &quo ...Show All
Visual Basic Not Focusing!
I want RichTextBox1 in Form1, my startup form, to be focused when Form1 is loaded. But for some reason, it isn't getting focused! I'm trying to do: Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load RichTextBox1.Focus() End Sub If you move the code to the Form1_Shown event it should work fine. Hope that helps, Jonathan Aneja The VB Team ...Show All
Visual Studio Visual Studio 2005 and SourceSafe 5
Is it possible to use SourceSafe 5 with Visual Studio 05 B2. Currently I get a binding error when trying to use it. Thanks, It is likely that official support for VSS 5.0 will end when VSS 2005 is released. Microsoft's standard policy is to support the latest release and the previous release. You may want to consider upgrading to at least 6.0. ...Show All
Windows Forms Updating listbox bound to collection class
I have a class that inherits CollectionBase and implements IBindingList and I have a listbox bound to it. I also have a text box bound the object.name property which is also the DisplayMember of the list box. The problem is that if I change object.name by editing the text box the listbox does not update. If I trap the change and write t ...Show All
Visual Basic ADO.NET Hell
There was a time in my not too distant past that I could open a database with ADO, query out some data, work with it, and update it. I have had VB.Net for a little over a week and I can insert data into a table. I can clear out a table. What I can't do is is iterate through the rows and update the table. I am close but I am missing a piece. From what I have read I want to create a connection, adapter, and a dataSet. I have done that with the following code. Dim conn As New OleDb.OleDbConnection Dim selectCmd As New OleDb.OleDbCommand Dim odaGPS As New OleDb.OleDbDataAdapter Dim dsS ...Show All
Visual C# Problems with the TextBox :/
I have added a text box to the form and I am trying to trap the 'enter' key in the key_up event, it does what I want it to do as far as that but I have text in my text box and when the 'enter' key is released the text in this box is added to another text box, now that works well, but it beeps when ever I hit enter in my textbox! Can anyone explain how to prevent this. I don't want the user to hear a beep everytime he hits enter in this textbox while there is data there, only when there is no data to be sent i.e. textbox1.text = Nothing... Thank you for viewing! -will, I'm sorry ming, that block is not really ...Show All
.NET Development Reciving an event when program exit
Hi all, I have a c# application. I have to write some files before program exits. Is there any event i can listen to Do I receive this event when windows shuts down (my application is a tray icon application, so probably it'll not be exited normally before shut down). Do I receive this event when the application is shut down from Task manager -> End process Thanks alot, Hisham Abu saleh Application.ApplicationExit is the event that you want to look for. If the process is killed in any manner then most likely this event will not be triggered. ...Show All
