David Ing's Q&A profile
SQL Server How can I get a row count of CTE recordset?
Hi everybody, I want to get a row count of temporary CTE recordset. My query is like this: With SQLPaging As ( Select Row_number() Over (Order by Row_num) as RowNumber, Row_num, Column_A, Column_B From OriginalTable ) Select * from SQLPaging Where RowNumber between 21 and 30 Let's assume SQLPaging definition contains 1,000 rows. If I use @@rowcount, it returns only 10. I.e. number of actual rows per page. What I want is that I want to know row count of SQLPaging CTE without extra counting query. I think SQLServer already knows how many rows CTE definition contains. The reason that I don't want to use extra counting query is that if SQLPaging definition has row performance query (lik ...Show All
Visual Basic Nested classes as arrays
I'm still getting lost in some of the features/syntax of .net (VB2005), so my searches through here and on the net so far have been fruitless. I am reading in a data set to my program. I have created classes for the different types of data that i will be processing. I have declared arrays of the various classes to store the info. Where I am having problems is with the data that is multi-leveled, for lack of a better word. For example lets say i have a 'MyPlant' class. Nested in the 'MyPlant' class I have a class for 'Stems', a class for 'Fruit', each of these nested classes have thier own properties, methods, etc. Additionally each plant may have a different number of stems, and pieces of fruit. What is the correct way of doing t ...Show All
Software Development for Windows Vista The referenced component 'Outlook' could not be found.
Hi, I am trying to run the Human Workflow sample "Simple Human workflow" I am getting the following Build error for namespace "Microsoft.Office.Interop.Outlook". The type or namespace name "Interop" does not exist in the namespace "Microsoft.Office". I have added a reference for Microsoft Outlook 11.0 Object Library from COM tab. But it is adding with a yellow mark to the reference list. Can anybody please suggest me in working with this sample and how to give reference of Outlook. Thank you in advance. ...Show All
Visual Basic [VB.NET] How to merge many GIF Files into one file
I need to create a software that it merge many GIF File into one file container. My application has this form I want that when i click "Add File" it shows an OpenFileDialog and that add file's path in the ListBox And when I click "Merge File" It merge all GIF file present in ListBox And when I click "Split File" it split all GIF File present in a File Container and that It save GIF Files in the same directory of the File Container I tried to write the code but it change any bytes of the GIF Files when I merge :( and i don't know how to use Split Function in VB.NET [Off-Topic]I'm new in VB.NET and i don't know fine this new programming language Best Regards Flash Thanks!!!!!! ...Show All
Visual C++ Is it possible to consume a VB.Net .dll from C (unmanaged not c++)
I have a VB.Net dll that contains functionality I need to access from a C program. As GetProcAddress won't get me where I need to go (right ) and I cannot create an instance of anything (C not C++) is there a route possible to loading this library Ok I am sure I am not getting how you are suggesting I factor things. If I try simply moving things into the header such as in MgdInterface.h pragma once #include <windows.h> #using <mscorlib.dll> #using "TestDll1.dll" class MgdInterface { public: MgdInterface(void); ~MgdInterface(void); double ShowDisplay(double*, wchar_t*); double HideDisplay(double*, wchar_t*); private: TestDll1::ProbeMeasurement * tdll; }; I get the compile ...Show All
Visual C# Create new c# project similar to an existing c# project
In Visual Studio programming C# How do I create a new project that is similar to an existing project I want to keep BOTH the new project and the old project. you can add as many project files in 1 solution, even with multiple .NET languages combined, such as VB.NET and C#. Just right click on your solution in solution explorer and go to add > new project ...Show All
Visual C# Breakpoint on exit of function due to exception?
I have been looking through code that some of my collegues have written, and I have found many instances in their code where they do the following: public void SomeFunction() { try { } catch(Exception ex) { throw ex; } } When I ask them why they've done this, they tell me that its because they want to be able to put a breakpoint on the line "throw ex", so they can see if a particular function is throwing an exception. The problem is that this code goes into production, and I know that try blocks have performance overhead. Is there anyway to put a conditional breakpoint in a method, perhaps on the closing brace, such that it only stops if the function is exited due to an uncaught exception ...Show All
Visual C++ Mirroring of an application
I'm dealing with the arabisation of an application. I started by adding SetProcessdefaultLayout(LAYOUT_RTL), Then i tried many to Set RTL style to my Dialogs. Impossible! I did static solution by adding EXSTYLE WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT for each dialog , the result is that i have the whole dialog RTL, but i loose my controls. DLG_SORTIE_RC_ARABE DIALOGEX 100, 100, 102, 79 EXSTYLE WS_EX_LAYOUTRTL STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "GLWIN Confirmation" { CTEXT "Quit this session ",ID_STATIC,25,10,70,8 DEFPUSHBUTTON "OK",IDOK,6,30,43,12,WS_GROUP PUSHBUTTON "Cancel",IDCANCEL,53,30,43,12 LTEXT "",ID_SORTIE_TRAIT1,-3,48,106,1,0,WS_EX_DLGMODALFRAME CHECKBOX "&Save desktop ...Show All
SQL Server Save time in Script Component which is almost forwarding
Hi, I have to add the fields coming from the source AS IS but, I need to add current date as a column to it. So, What I do is to add an Script Component and add each and every output column in that along with defining their types and writing an "assignments" script. Is there any possibility for me to save time in the scenarios where I am almost passing on the information to next level in the data flow Any input regarding this will sincerely be appreciated. Fahad ...Show All
.NET Development Timer doesn't seem to last forever
Hello. I have a timer in my app that fires every 15 seconds calling a function. It appears that after about 8 hours of running the timer stops calling the function even though the program continues to run. I define the timer in my main class like this: private System.Timers.Timer timer = new System.Timers.Timer(); Then in one of my init functions I set it like this: timer.Interval = 15000; timer.Enabled = true; timer.Elapsed += new ElapsedEventHandler(UpdateStats); timer.Start(); The function UpdateStats is called for about the first 8 hours. Then it isn't called anymore. To confirm that it isn't called anymore I have a a file being written to in the function that appends the current to the file. After 8 hours the f ...Show All
Visual Studio Express Editions Two questions
Im using the following code to display an image when a checkbox is checked Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If Me.CheckBox1.Checked Then Me.PictureBox1.Load("c:\logo1.gif") Else Me.PictureBox1.Load("c:\logo2.gif") End If End Sub My question for this is what difference does the "me" do before CheckBox and PictureBox I tried the same code without the "me" and i ...Show All
Visual Basic searching for & highlighting text
hi, i am trying to make my application search for text (in a combobox called "comboboxfind") in a listbox ("showbox") when i click on a button (called "findnow") can someone help me not quite... when i click yes on the msgbox it keeps the same line highlighted, it comes up the same amount of times as items found but doesn't highlight the next line.i realy wanted the msgbox to contain the number of items found, and another button, when clicked, to highlight the next found line. ...Show All
Visual Studio Problem using debugger with database project
Hi, All, I have a database application. I created a stored procedure and deployed it to the database. I'd now like to use the debugger. When I start the debugger, when it gets to the statement "SqlDataReader reader = command.ExecuteReader();", a new file called Dynamic T-SQL opens. If I try to continue debugging, I get an error that says "Unable to step. Operation not supported. Unknown error: 0x80131022." What's going on How do I get around this so I can debug my code Thanks, Stephanie I am geting the same error with a VB.Net project. It worked fine on Sunday, but on Monday I start getting this error. I changed nothing on my system. I repaired the VS install and it did not f ...Show All
SQL Server SQL 2005 Ent (64 bit) Running in SQL 2000 Compatibility Mode
Hi all, I was wondering fi somebody could help shed some light on the following question... I have a customer who is starting to plan for some new Enterprise applications which will all have SQL as the backend database. Pretty standard architechture, DB Tier, App Tier, Presentation Tier. One of our applications does not yet support SQL 2005 Enterprise Edition x64 running in native mode but will in Q3 this year. To aid future upgrade paths the vendor has recommended we go with SQL 2005 Ent (64 bit) running in SQL 2000 Compatibility Mode. I am trying to determine what performance improvements we will see while SQL (64 bit) runs in 2000 Compatibility Mode on W2K3 Ent x64 compared to a similar standard 32 bit SQL impl ...Show All
Visual Basic Array or object to string
Hi this is probably really simple - I want to convert an object (could be an array) to a string, so that I can save it in a text file, and then retrieve it and recreate the object at a later date. The object could be a muti dimentional array or an object with mutiple properties. Many thanks Thanks I was looking to produce a general purpose tool that could take an object and then fire the resultant string at where ever I wanted, to be recovered at a later date or other location. seemed like a really useful building block to me (once the work was done). I looked at the serializable link. It is going in the right direction, and now I know know what it is officially called! Thank again ...Show All
