KyleB's Q&A profile
Visual C# What should be the best practice to check the object ?
Hi, Normally we check a value by this format if ( obj == null ) { //do some code } I know it is good for readability. But for performance reason I am suggested by one of my coleagues that we shuold check the constant value first i.e. if ( null == obj ) { //do some code } What is the best possible way to check the object Could any body give the proper reason to use the later one. Not sure if ther is any difference ... only 1 way to know ... just run a test :) ...Show All
SQL Server Linked servers
Does SQL Server 2005 Express support linked servers You can add a linked server in SQL Express. A good SQL Express 2005 overview, including what is not supported, can be found here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnsse/html/sseoverview.asp HTH, Boris. ...Show All
Microsoft ISV Community Center Forums Runtime Error #13 Type mismatch
Ok I have a speadsheet with a userform that adds data into the spreadsheet when the add button is clicked. This has worked fine and all of a sudden today it decided to give me a runtime error. Here is the code it seems to have a problem with. Do While Not Cells(row, col).row = Range("InsertRow").row frmDate = frmMonthlyExpenses.txtDate rowDate = Cells(row, col) row = row + 1 Loop I don't understand what is wrong. It worked fine and then crapped out. It also did this same error on another sheet that I am using. Please Help!! Tiger Hello Tiger, The problem is y ...Show All
Visual Studio Team System VS 2005 Team automatically includes local files into the solution/project
Visual Studio 2005 Team - Architect with/without Visual studio sourcesafe 6.0d Visual studio 2005 team architect automatically adds the local exisiting files into the solution or project by default. "Exclude Files" doesn't work the same way that in VS 2003. For example if you close your project and copy some source files in to the project folder. after you reload the solution, VS 2005 recognises those files as newly added files and attempt to check into the source safe. Therefore if you delete or rename a file in the solution, it will be updated in the sourcesafe by you but your team member will put the old files back into t ...Show All
SQL Server storing values
I want to store the whole values returned by a while loop. How to do this my store procedure is like this create proc start_proc @country varchar(20), @c_code int, @p_id int, @out_put varchar(500) output as if exists(select start_date from new_start where country=@country and country_code=@c_code and program_id=@p_id) begin set nocount on declare @@msg1 datetime Declare out_put cursor local Scroll Keyset Optimistic For select start_date from new_start where country=@country and country_code=@c_code and program_id=@p_id open out_put fetch absolute 1 from out_put into @@msg1 while @@fetch_Status <> -1 begin print @@msg1 fetch next from ...Show All
Visual Studio Express Editions sorry
How do you create multiple lines within a message box when combining a string with variable values I know... it would probably be easier to just create a seperate form and load the form.... just wondering if it was possible to not have to do such though. What if the data that is to appear on the next line is - lets say - the value of an array. I'll explain my question. What if I want to display a list of values which the user entered....not for confirmation purposes but just to show what data had been entered...into a declared array. So.. Dim intArray(5) As Integer Element# Element Value 0 = 11 1 = 22 2 = 33 3 ...Show All
Visual C++ Visual C++ .net 2 Book
Hello, I've been wondering if anybody knows why Microsoft isn't planning on publishing a Visual C++ .net 2 book. It's not on their coming soon list (http://www.microsoft.com/mspress/hop/). With Thanks, Gal Beniamini. I asked this at the PDC pre-conference and was told that Stan Lippman and other MS folks are planning a number of VCPP 2005 titles from Apress. For whatever reason, it appears MS would rather let an outside publisher carry the load. You can read about two forthcoming Apress volumes her ...Show All
SQL Server Could not create DTS.Application because of error 0x800401F3
I am trying to run an ssis package from a classic asp web page. if I run it from the command line it works as expected. dtexec /f D:\publish\mypackage.dtsx however if I try to run it from the web page - I get the following error: "Could not create DTS.Application because of error 0x800401F3" I am assuming this is a permissions error - can anyone help Can I run a dts package from classic asp Google the error code and it comes up with "Invalid Class string" or "invaldi ProgID" which means the COM component is not installed or registered. Check you ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Direct3D Initialization
I am trying to initialize Direct3D using this code: Imports microsoft.DirectX Imports Microsoft.DirectX.Direct3D Public Class Form1 Private dev As Microsoft.DirectX.Direct3D.Device = Nothing Private Function Init3d() As Boolean Try Dim pparams As New PresentParameters pparams.Windowed = True pparams.SwapEffect = SwapEffect.Discard ...Show All
Visual C++ Using variable in two forms
I have my class (rCurrency). I've got two forms (frmLoading and frmMain). To create a variable of "rCurrency" I write in the top of frmLoading: rCurrency myCurrency; But then frmLoading closes and frmMain opens. I want to use my veriable ( myCurrency) in frmMain. But I can't do it. I've got an error Error 2 error C2065: 'myCurrency' : undeclared identifier frmLoading.h 96 So, what shall I do to use the variable in twp forms If you are opening and closing forms in a sequence, you should probably use an underlying function outside these two classes to perform this. In this case, ...Show All
Windows Forms Dataview Search with Wildcards
Hello, The code below lets me search a dataset field called Category with an inputbox. Is there a way to allow Wildcards to help in the search, If the search criteria is not exactly like the data in the dataset, it will not show. Private Sub btnSearchCategory_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearchCategory.Click &nb ...Show All
Visual Studio Team System Handling Hidden Fields And other dynamic parameters.
Hi I have recorded a web page for a .NET application. In the web test Editor's request tree, I see that each request has a ExtractionRules folder defined under them. How is it that those extraction rules (Extract Hidden Fields) have been automatically defined I have not added any rules manually !!! Is the web test intelligent enough to add the Extract Hidden Field rules for all the Hidden Fields or do we need to do it again Please explain. Also, I would like to know how to handle the Hidden fields and other dynamic parameters. I did not understand the procedure given in some of the documentations. It would be really helpful if s ...Show All
Visual Studio Express Editions Error spawning cmd.exe in simple C++ application
I got a big problem. I do not know why I write a very simply C++program.I put it below #include<iostream> #include<cstdlib> using namespace std; int main() { cout<<"helo to C++"; return 0; } When I build it , it will show me a error: hello.cpp Linking... Embedding manifest... Project : error PRJ0003 : Error spawning 'cmd.exe'. Build log was saved at "file://c:\Documents and Settings\LXY\My Documents\Visual Studio 2005\Projects\hello\hello\Debug\BuildLog.htm" hello - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== But if I run it through the Visual Studio 2005 Command Prom ...Show All
Visual Studio Team System Backup Problems
I am trying to backup the SQL server on my TFS B3 Refresh server (single server install with the DEV version of SQL 2005 RTM). I am getting the following error trying to set up a Maintenance plan using the Wizard: TITLE: Maintenance Plan Wizard Progress ------------------------------ Create maintenance plan failed. ------------------------------ ADDITIONAL INFORMATION: Create failed for JobStep 'Subplan'. (Microsoft.SqlServer.MaintenancePlanTasks) For help, click: http://go.microsoft.com/fwlink ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.Fai ...Show All
SQL Server ReportViewer usability Problems
If I put the reportviewer width to 100%, it still does not automatically resize itself. The reportviewer goes way beyond the screen area for lesser resolution screens and you are required to scroll to the right to view the "View Report" button. However, if you look at the report manager, the report viewing area automatically resizes. Anyone knows how this can be done thanks. When you use width in % for ReportViewer on a web page, you need to remove the DocType element. Try removing doctype element from the web page. It should work. ...Show All
