vito1281's Q&A profile
SQL Server Logical XOR operator in T-SQL (SQL Server 2000)
Hi all.... I was wondering why SQL Server 2000 lacks a logical XOR operator. Do you have a ready to use function that implements it How can I program one by myself I know that A XOR B is equivalent to NOT A * B + A * NOT B. So I tried to create this function : CREATE FUNCTION XOR ( -- Add the parameters for the function here @A BIT , @B BIT ) RETURNS BIT AS BEGIN RETURN NOT @A AND @B OR @A + NOT @B END But it didn't compile. How can I pass boolean values as parameters any other hint Thanks Jaime There is no boolean data type in TSQL and there are only few system built-ins like CONTAINS that can be used directly in a WHERE clause. So you need to use the XOR ...Show All
.NET Development Help with XML
Sorry I’m new to C#. Trying to retrieve information from the following XML code with the “ AccountFunds” routine below. There is a class that is drived from the API XSD file, in here “accountSnapshot.availableToBetBalance” is declared as a double. The code line “accountSnapshot.availableToBetBalance = nodeList.Item(0).InnerXml;” raises a Error “Cannot implicitly convert type 'string' to 'double'”. Ive tryed this line “accountSnapshot.availableToBetBalance = ((double)(nodeList.Item(0).InnerXml));” but this gives rise to a “Cannot convert type 'string' to 'double'” How do you convert the “ nodeList.Item(0).InnerXml” so that it is a double. Is the “ AccountFunds” routine the logical way to extract the XML code. ...Show All
Windows Forms How to do the total between two text box? (Vb.Net or VS 2005)
Hi I am tryingto do the following. 1. I have 3 text box (VendorNo ,PurchNo and Purch_NINo) (Text boxes are only for numbers) 2. total of two boxes must not be exceed 99 3. I have tried the following code but the I am getting ERROR msg Error Msg: Converting string to double is invalid 4 I have tried WITHOUT "CDbl" in front of text box but it give me the following output If I put 1 in "VendorNo" and 34 in "PurchNo" the output in "Purch_NINo" = 134 Public Function ValidateVendorPurch() As Boolean If (CDbl(VendorNo.Text) + CDbl(PurchNo.Text)) >= 99 Then MsgBox("The Total of Q34 and Q49 cannot exceed 99") Return False Else Return True End If End Function Pr ...Show All
Visual Basic Server Explorer and SQL 2005
I have Sql 2005 Dev edition and VS 2005 Pro. I cannot access the server from server explorer. I know the SQL server is up and running. I cannot access it from Access either. I have tried the Data Connection Wizard (as outlined in the tread "Server Explorer - Sql Server) but no SQL server is there. I have no idea of how to proceed. Suggestions please Thanks Glen for the input. I can open the "connect to database" dialogue. I choose SQL server as data source and .NET for SQL as data provider. On the next screen the server name is empty. If I click "refresh", I get a long delay with the hour glass before it times out without yielding a server name. I cannot get past this step. I am using windows authent ...Show All
Visual Basic array of controls..
is it possible to create array of controls in UI.. i need to create array of buttons (as similar to VB6) is there any way to do this Thank you, spotty; that did the trick for creating the buttons. Now I'm having a bit of trouble with the handler. Along with the me.controls.add code, I added a common click handler: Me .Controls.Add(theButton) AddHandler theButton.Click, AddressOf theButton_Click that event handler simply verifies the button that was clicked and turns the button background red: Private Sub theButton_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Dim s As String = CType (sender, Button).Name Dim clicked_button As Button = CType (sender, But ...Show All
SQL Server Controlling flow in ForEach Container
I have a few hundred data files that I need to process in groups from oldest to most recent. To that end, I have created staging folders for each date that appears in the file names (example: 20060213) and moved all of the data files to the appropriate folders. I also have these folder names in a recordset that has been sorted in ascending order, so the oldest date should be the first record, the second-oldest date should be second and so on. My thinking is to use this recordset with a ForEach Loop Container to loop through each folder, but I am not sure if Integration Services will necessarily loop through the records in order. Can someone tell me whether the records will be processed in order or suggest a better alternative to make ...Show All
Visual Studio Team System Process Templete Editor fails to open WI that contains a custom control
We have a WI with a custom control and the process templete editer fails with this error - There was a problem loading the work item type definition: File c:\Program Files\Microsoft Visual Studio 8\Common7\PrivateAssemblies\bug.xml There is an error in the xml document (1,21122). See the event log for furthur detail. I should still be able to open in the IDE but it must be mapping to the Process Editor and end up with same error above. Is there a way to get around this without un-installing power toys PS. It seems to open WI without a custom field defined ok. Following is what the event log displays - Event Type: Error Event Source: MicrosoftR Visual StudioR 2005 Event Category: No ...Show All
Visual C++ CreateProcess starting 16-bit Windows program problem
I am calling CreateProcess on a 16-bit Windows program, followed by WaitForSingleObject on the process ID with a timeout value. The 16-bit Windows program shows up in the Task Manager but never shows its initial screen until after the timeout occurs and I put up a MessageBox in my parent process asking the user if I should continue waiting for the child process to finish executing. If I double-click the 16-bit Windows program from Explorer the program puts out its initial screen immediately. Does anybody have any idea what I have to do, without putting up a MessagBox in the parent process, to get the 16-bit Windows program to execute and put out its initial screen immediately. This appears to be a common ...Show All
Visual C++ Convert System::String to Double in Managed C++
Hi, I am just starting to use Managed C++ in Visual Studio.NET and I have a problem converting a System::String to double. I have this code: System::String^ money = txtMoney->Text; How do I do to make money a double I am grateful for all answers /M double foo = System::Convert::ToDouble(money); ...Show All
Windows Forms Newbie needs advise
I am trying to build an online form but am unsure as to what product to use to meet my specs. I needs it to be fairly easy to use as my developer skills are limited. This form is used to provide access to our Oracle biz modules where a user selects a module and then chooses a responsibility. Here are the specs Basic free form text fields (name, dept, phone, etc) Smart logic fields or AI fields. For example I want to have a drop down box listing available modules. When module is selected another box should appear with related responsibilities for that module. Once a responsibility is selected, if it has criteria or a note associated then it would provide that info. Button for user to add another responsibility that would foll ...Show All
Visual Studio Express Editions including code
Is it possible to include in a project the code contained in another file (let's say abc.vb ) Which characteristics must file abc.vb have Does it have to be a module A class And if I modify the code in abc.vb , do the projects referring to it change too That is, each time they are loaded (with open-file I mean) do they re-read the code contained in abc.vb Thanks A project is simply a abstraction relating to a collection one or more files. Files could be source code files such as classes, modules, interfaces. Or simply data files such as txt, graphics files etc. A project also contains information about references to other code - which can be contained in a class library (dll file) So in ...Show All
Visual Studio Express Editions Drawing some lines and scroll bar,
Dear Friends Hi 3 questions: 1- I use draw method for drawing some lines in a window , but when I do scroll window, lines are not scrolling ; for example for creating a (music) staff. 2- I want to draw lines that I give width and height in percents not int 3- I want a window in A4 print size Please reply with c# and C++ thanks a lot Please, one question per thread. The odds you'll find somebody that can answer all three are slim. Re 1: offset the Y-coordinate by AutoScrollPosition.Y Re 2: just scale the X- and Y-coordinates from percentage to pixel Re 3: make the window size proportional to the A4 size, scale the coordinates ...Show All
Visual Studio 2008 (Pre-release) How do I scroll a TreeViewItem into view?
Is the a ScrollIntoView equivalent for TreeView As to event issue, you can register an event handler to hanlde Mouse.MouseEnterEvent and Mouse.MouseLeaveEvent using EventManger.RegisterClassHandler() method, and in the event handler, you can examine the MouseButtonEventArgs.OriginalSource property to check whether or not a TreeViewItem is the original source of this event, then you can do the actual work you want, after everthing is done, you can mark the event as Handled to prevent the parent get noticed about this event. Sheva ...Show All
Visual Studio Team System report designer don`t find all fields
hi, i`m using report designer to create reports on my self-created work-items. but i did not find all fields and types in the selection in the report designer. i create a new report project. connect to the ms sql server 2005 analysis service. use the following conneciton properties: server-name: atvie-tfs01 database-name: TFSWarehouse i tested the connection and the connection is ok. in the query builder i choose the "team system" cube. and then i get the first problem. i added work item - System.WorkItemType to a filter with "Add to filter". in the filter i want to choose in the filter expression one of my newly created work-items. one is called ReleaseItem. but it is not available in the drop-down! but i imported alr ...Show All
Visual Studio Empty directories in ASP.NET 2.0 web projects
Hi, I don't know if this applies *only* to web projects, but I'm having a stupid problem. I want the application to write some files server-side, and I'd like to keep these files in a directory of their own. These files are part of the systems data, not its logic, so in my solution and in VSS I would like only to include the empty directory. However, when I add the new directory it's only created locally, not in the source control system. Hence the application crashes when it tries to use the directory that does not exist. I do not want to make the application check for the existence of the directory and create it. I know this is a possible solution, and I know it is fairly low overhead, but it is just too stupid. Adding a file ...Show All
