lityk's Q&A profile
SQL Server INNER JOIN between a CLR-TVF and a table returns no rows
I have the following query: select sq.*, p.numero, p.nombre from paf p right outer join dbo.GetListOfSquaresForShippingLot(@lot) sq on sq.number = p.numero and sq.version = p.numero The @lot parameter is declared at the top ( declare @lot int; set @lot = 1; ). GetListOfSquaresForShippingLot is a CLR TVF coded in C#. The TVF queries a XML field in the database and returns nodes as rows, and this is completed with information from a table. If I run a query with the TVF only, it returns data; but if I try to join the TVF with a table, it returns empty, even when I'm expecting matches. I thought the problem was the data from the TVF was been streamed and that's why it could not be joined with the data from the table. I tried to solve that pr ...Show All
Visual Studio 2008 (Pre-release) Events in 3D objects
I have MeshGeometry3D object and I want to use MouseEnter \ MouseDown to this object, how it can be done (the only event I have is Changed…) I guess I need to use the Page object events MouseMove \ MouseDown and check if my MeshGeometry3D in the area, but how can I check it Thanks, Omri I see in some threads that interactivity isn' t supported in 3D objects (and it would not be in this version) . Search for interactivity in this forum to see datails. Alberto ...Show All
SQL Server Replacing Active X/VBscript used in SQL2000 data transformations to SQL2005 SSIS
Hi I am new to SSIS and have the following problem. I used the following script to clear data in columns of any CR/LF/Commas and char(0)'s. Can I just transfer this to SSIS and how exactly do I do that Any help or advice would help. Function Main() Dim x For x=1 to DTSSource.count If Isnull(DTSSource(x)) = False Then DTSDestination(x) = replace(replace(replace(Replace(DTSSource(x) , chr(13),""),chr(10),""),chr(0),""),","," ") Else DTSDestination(x) = DTSSource(x) End If Next Main = DTSTransformStat_OK End Function Andre Andret, I am also facing the same problem. Have you fou ...Show All
SQL Server Parameter location
With 2005, is it possible to control the position of the parameter boxes I have 3 parameters, the first 2 lay out horizontally, the third stacks up under the first. There is plenty of room across the report for all the parameters to display in one row. You can not change this behavior if you are using Report Manager. If you wanted to you could write your own web app and use the Viewer Controls and display the parameters anyway you want. This does however require you write a fair amount of code for rendering parameter areas. ...Show All
Visual Studio Tools for Office Event Handlers not working
I'm trying to attach a simple event handler to a CommandBarButton and it' when I run my example the event is never triggered. Is there something I need to do outside of assigning a Click event handler The most common reason for this is that you've not declared the button object variable at the class level, so it goes out of scope and is eventually garbage collected. If that's not the problem in your case, you need to provide more information. 1. Type of project: VSTO, WinForms, Addin 2. Show the code you use for instantiating and creating the button 3. With which Office application (including version) are you working ...Show All
Windows Forms Restore combobox items
I've got 2 comboboxes, cmbStatT and cmbEndT respectively, both with items added manually at design time. These comboboxes have the same number of items that are of the same value, these are time values to be precise. Depending on the index of the selected item in cmbStatT, I would like to remove a range of items in cmbEndT. If a user selects an item at index 3 (09:00 AM, starting from 07:30 AM till 16:00 PM), cmbEndT should only show items from index 4 (09:30 AM, starting from 07:30 AM till 16:00 PM). Meaning remove items in cmbEndT starting at cmbStartT.SelectedIndex back to index 0. This works just fine the first time. 09:30 AM of cmbEndT is now at index 0 and the user decides to change the value in cmbStartT say, to 10:00 AM which ...Show All
Visual C# change first line of a file
Hi, I have a big-sized file and I want to replace the first line of my file with some text then save changes to the same file: for example : abcd efghij klmnopq rst uvw ======>>> some text1 some text2 efghij klmnopq rst uvw What is the most optimized way to do it thanks in advance. one way would be to read the entire file in a string[] array, the modified the first element of the array (or whichever line) and save it back. This can be done like so, for example: string [] theFileContents = System.IO.File.ReadAllLines( fileName.txt ); if (theFileContents.Length > 0) { theFileContents[0] = "New Value"; //sets the new value of the first element in the array (the first line ...Show All
Visual Studio Help me decide: how to generate my Data Access Layer ( please :)
Hello, In lue of ado.net vNext, I'm trying to figure out how to generate data access libarary for my C# project. I would like to take a step by step approach: 1. Generate wrappers for my stored proces. 2. Generate data object classes (entity classes) from xml schema file. 3. Define mapping between the data object classes attributes and some how automate the population of the data objects. 4. I'd like to do most of this from the command line (I'd want to run it during the build). Are there GAT code snippets out there that achieve any of these steps. Where should I start Thanks Houman PS. I can't use datasets Hi Houman - Yes the Service Factory ships with full source cod ...Show All
SQL Server Can I get a Query from a Fetch_cursor in SQL2000
Hi, The main application we used uses prepared cursors when running statments against the database. This makes it very hard to debug the querys as if you get an error or lock on the database all you can see is the Fetch_curror statement and the number of the statment. If you know the lock is coming that's fine as you can run up the profiler but if you don't know it will happen then the profiler doesn't help as the cursor has already been prepared. Is there a way of using the cursor number to query the SQL engine and find out what statment was prepared If your app is doing server side cursors and names them then you may be able to use sp_cursorlist, sp_describe_cursor_tables and sp_describe_cursor_c ...Show All
SQL Server How can i make an updatable view???
Please read this example: I got 2 datatables PersonName: wich contains IdPersonName, Name and IdPersonLastName PersonLastName: wich contains IdPersonLastName and LastName I know that i need to make a relation between Person and PersonLastName I want to make a view named Person: wich contains PersonName/Name and PersonLastName/LastName and i want to make updates to the two datatables when i insert data in the PersonView I hope someone can Help Me I Made This code ALTER Trigger Trigger1 ON dbo.PersonComplete INSTEAD OF INSERT AS BEGIN SET NOCOUNT ON IF ( NOT EXISTS ( SELECT C.Name, C.LastName FROM PersonComplete C, inserted I WHERE C.Name = I.Name AND C.LastName ...Show All
SQL Server my problem also not solved yet
Upper case sentece in normal case sentence Michael Hotek wrote: Of course you have to figure out what to do with exceptions such as O'Malley, acronyms, any sort of name and a variety of other things. There isn't a routine for doing this simply because there are a virtually unlimited set of exceptions to "proper casing" something. Thats what he was told in the other thread also... But I guess thats not what he wants to hear. He wants to convert a whole lot of CV text into propper cases, and the input is "only" uppercase. But i think the Word solution mentioned here is one of the best aproaches. (At least for a start... The result would still have to be proof read/edited) But if you want the text ...Show All
Visual Basic The same value just onetime
Hi I use this code: For Each currentFolder As String In theFolders T ry Directory.Delete(currentFolder, True ) Catch ex As IOException theErrorCounter = theErrorCounter + 1 fejl.ListBox1.Items.Add(combotype.SelectedItem & taltekst) End Try Next The value in fejl.ListBox1.Items.Add(combotype.SelectedItem & taltekst) can bee the same several times but i only want to see the value one time, can i do that Alvin You're just adding strings to the ListBox so check to see if it already contains that string: Dim newVal as String = combotype.SelectedItem & taltekst If Not fejl.ListBox1.Items.Contains(newVal) Then fejl.ListBox1.Items.Add(newVal) ...Show All
Windows Forms inherited forms, something missing
Hi, I'm playing around with inherited forms but I'm somewhat confused. I build a normal Windows Application (vb.net2005) and added a baseform to it. Added some buttons as shown in the Walkthrough and added some code to the button_click events. Finally I builded the project. So far so good. After adding a new inherited form (called testForm) based on my baseform I can add and change properties for the buttons. However the code I added is not there and so when I click the buttons on my testForm nothing happens. Clearly I'm missing something but I don't see what. Anyone Cheers, Frank (crossposted in Windows Forms Designer, sorry for that) Hi again, I don't get it. There something I'm missin ...Show All
SQL Server SQL Server vs Windows Application Project maintenance?
I'm a database newbie, trying to decide whether to create an SQL Server or Windows Application project that uses SQL Server 2005 Express. As I understand it, the advantage of an SQL Server project is that the app deploys somehow as part of the database. If that's the case, how would I handle the scenario where the database has been updating at customer site and I need to install just a new release of the software Would I be better of creating a Windows Application project and connecting to the database explicitly Thank you. Sorry for the confusion. I do need a GUI, if that's what you mean by presentation layer. In the .Net new projects dialog, there are choices to create a SQL Server project or a Windows Ap ...Show All
Visual Studio Team System does microsoft team foundation server require visual studio team system?
we currently have visual studio professional edition (not team edition) and vss. if we were to purchase microsoft team foundation server, do we need to upgrade our studio version to get full benefit what are the benefit differences between visual studio professional vs. team when using the foundation server secondly, can someone point me towards VSS to VSTS migration information thanks, jason meketa progarmmer/analyst webtrends Hi, If you plan to use Team Build you will require Visual Studio Team System Developer or Tester Edition of the software be installed on the machine you select to be the build server. VSS => TFS try this MSDN article Wes ...Show All
