NathanLiu's Q&A profile
SQL Server Running a package in C#
Hello all. I am trying to run a package in C# and have come accross the help file of how to do it in Visual Basic ('Running an Existing Package using Visual Basic'). However, I cannot find a reference to anything relating to DTS in my reference dialog. In the help file it says to add a reference to Micorsoft.SQLServer.ManagedDTS.DLL, however, I cannot find this reference anywhere. Am I missing something Thanks, Mike Are you using Visual Studio .NET 2005 Visual Studio .NET 2002/2003 projects can't have references to Microsoft.SQLServer.ManagedDTS.DLL, since it is built with .NET 2.0. ...Show All
Visual Basic AnalogTVTuningSpace and MSVidCtl
I´m trying to develop a decent tv tuner/capture application (since there are no such apps, nowhere, I say) in Visual Basic 6.0. I´m using the MSVidCtl component together with the AnalogTVTuningSpace and IChannelTuneRequest object to achieve this, as described here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/directx9_c/directX/htm/hostingthevideocontrolinavisualbasicform.asp and here: http://msdn.micro ...Show All
Visual Basic .KB1 extensions
I have been given the task to convert some .KB1 extension files to ASCII files. I am not even sure what the extension is and the previous coder is unavailable. Can anyone tell me how to convert them Thanks in advance! tp KB1 does not appear to be a standard file extension. Can you provide any other information by opening and seeing the file Try opening the file in a TextEditor such as UltraEdit/TextPad and use the Convert to ASCII option to see how the conversion happens. Regards, Vikram ...Show All
Visual Studio Team System SQL 2005 is not installed?
Hello, I am attempting an install of VS2005 TF - Database Tier. During the system health check it reports back saying "SQL Server 2005 is not installed on this computer" also, " SQL Server Analysis Service needs to be installed on this computer" and " SQL Server 2005 Reporting Services is not installed on this computer when in fact all of the above are installed (Using SQL 2005 Standard) (W2003 Server Ent. Sp1) Can anyone offer assistance Thanks, Paul Sampson Hi Paul, Couple of things to check: Are all the services for Sql running (MSSQLSERVER, SQL Server Agent, Analysis ...Show All
.NET Development Error while storing image into sql database.
Hi All, I was trying the below code : -------------------------------- try { MemoryStream stream = new MemoryStream(); this .gearPhoto.Image.Save(stream,System.Drawing.Imaging.ImageFormat.Bmp); byte [] content = stream.ToArray(); // insert new entry into table sqlinsert = "INSERT INTO pr_person_image (national_number, capture_date,expiry_date,operator_id, wstation_id, picture)VALUES("+ Convert.ToInt32( this .TxtNat.Text)+",'"+ this .lblCapDate.Text+"','"+ this .lblExpDate.Text+"',"+ pr_logon.prs_userid+","+ pr_logon.prs_wsn+ ",@picture)"; prscommand = new OleDbCommand(sqlinsert,pr_logon.db.prscon); OleDbParameter imageParam ...Show All
SQL Server Conditional execution of first task
I have a situation where I'd like to conditionally execute the first task in a package based on the contents of a user variable. If user variable "Var1" is false I want to begin execution with the first task. If "Var1" is true I want to begin execution at the second task. My first thought of course was SequenceContainer, but the same issue would exist for the first task in a SequenceContainer. Is there a way to do this Thanks! To conditionally execute a task you would use a constraint with an expression on it, but you need two tasks (containers) to do this. The ideal answe ...Show All
Windows Forms under the hood
Hi, Void HandlSomeEvent(...) { Form f = new FOrm(); f.Show(); } Now,normally right after f goes out of scope,which is rather immidiatlly,because Show() is a non blocking methohd,f will be disposed(in the next cycle of the Garbage Collector). In practice it dosent happen,not before the Forms Close() method is called. What happens under the hood Who co ...Show All
Visual C++ Bug report: static string in dllimport-ed class causes internal compiler error in p2symtab, line 4553
[ Microsoft Visual C++ .NET 69586-335-0000007-18332 ] Hi, I'm not sure this is the right place to report bugs in MS Visual C++ .NET 2003, but I couln't find a better place. In any case, the code below causes the following error: main.cpp(22): fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symtab.c', line 4533) My code: // Bug report: static string variable in dllimport-ed class causes // internal compiler error in p2symtab, line 4553 #include <iostream> #include <string> using namespace std; class __declspec(dllimport) input_port { public: &nb ...Show All
SQL Server how to convert string to numeric data?
I have a function that apparently returns value in string format (pls correct me if I'm wrong). When I try apply this in ‘textbox13’ =Sum(Code.HoursUsed( Fields!date_opened.Value, Fields!last_updated.Value )), it brings me error "The value expression for the textbox ‘textbox13’ uses a numeric aggregate function on data that is not numeric. Numeric aggregate functions (Sum, Avg, StDev, Var, StDevP, and VarP) can only aggregate numeric data." What I'm doing wrong and how to get the numeric data Public Shared Function HoursUsed(ByVal date_opened As Date, ByVal last_updated As Date) AS String Dim DaysPassed As Integer = DateDiff(Da ...Show All
Smart Device Development Query performance in SQL Mobile
I am using SQL Mobile as database for my PDA application.I have aroud 2000 records in the database.Performing a search query in my program takes around 8 secs while the same query on the query analyzer on the PDA takes .114 secs. My search query is SqlCeCommand cmd = new SqlCeCommand ( "Select * from Premise where houseno=2001" , con); Can anyone please tell me how to improve the response time in my program.What is the actual issue which is causing the delay. You probably measuring first run of the query which would involve JITing of your code, usually few seconds. If that’s n ...Show All
Windows Forms To update a combo box collection
Hi. In the form that i made, I have a combo box that shows a list o directories thay I need to use in the aplication. When the application starts up it executes a procedure that updates the collection of that combo box with the name of all the directories names that I need. In order to update the combo box, I craete a While procedure like this: While a < My .Computer.FileSystem.GetDirectories( "\\172.17.1.7\comum\AA_Ficheiros Comuns\AA_FOTOGRAFIAS\" ).Count scu = My .Computer.FileSystem.GetDirectories( "\\172.17.1.7\comum\AA_Ficheiros Comuns\AA_FOTOGRAFIAS\" ).Item(a) GestorFotos.Frm1.CboSuc.Items.Add(scu.Remove ...Show All
Visual C# good c# book for window form and ADO
I have read Jesse Liberty's Programming C# third edition. Now I am working on C# 2005 ( window , ADO ,database) , and looking for a good book with more pratical codes inside. Please give suggestion. Pro C# 2005 and the .NET 2.0 Platform Thrid Edition by Andrew Troelsen Published by Apress...Has a good amount of what your looking for has a lot of code threw out the Entire book...Well Explained and Commented...I own the book and like it alot.. Might want to give it a look threw.. ...Show All
Visual Basic How to tell when a user logs on to windows?
I am using VS 2003 to write a service in VB, this service will run in the background and has to run on a user account rather than the local system so cannot do any GUI stuff (as far as I know). I have written a second app in c# to handle the GUI side of things and I want to run it when the user logs in to windows. Does anyone know how I can tell when a user logs on - is there a registry key I can check every few seconds or is there a more elegant solution Thanks. The _most_ elegant that I can think of is simply to install a short cut to your application into the 'All Users ...Show All
Visual Studio Express Editions Drawing a grid of squares - more efficient method possible?
I'm writing a proof of concept program that needs to be able to graphically display data that comes from an underlying array. Each "cell" in this two dimensional array has a floating point value that will be classed as highest decile, second-highest decile, etc. The highest ranked cells will be colored Red, the lowest, Blue. One thing to note, similarly ranked data will be non-contiguous. So, if we displayed this with x's being the top 50% and o's being the lowest 50%, we'd be looking at something like this: xoxoxoxoxxxxxxxxxooxooooooo ooooooxoxoxoxooooxoxoxoxox ooxxxxoxxoxoxxoxoxoxoxoxxxx ooxxxxoooxxoxoxoxoxoxoxoxox T ...Show All
.NET Development Validators in ASP.NET 2
Hello guys, we moved from 1.1 to 2.0 and now we have tons of javascript errors. The problem is related to validators, we have fully rewritten the domvalidators of 1.1, and some added function was very useful. How can I override the new validators rendered from webresource.axd and change some thing inside the js code We can't use ours any more because the postback javascript whas changed, and onche the control comes to my js code, the event is undefined. Any idea You could try to replace the HttpHandler for WebResource.axd by a custom handler that returns your preferred javascript if the validator ...Show All
