san7's Q&A profile
SQL Server Last & First SQL aggregate functions
I'm trying to migrate an app. from Access to SQL Server, and find that Transact-SQL does not support LAST/FIRST functions. Is there any alternative to these Below is the Access SQL statement: SELECT Last(tblZoneNameString.Val) AS strZoneName, tblZoneNameString.TagIndex FROM tblZoneNameString GROUP BY tblZoneNameString.TagIndex HAVING (((tblZoneNameString.TagIndex)>0)); In SQL Server 2005, you can do something like this: select tblZoneNameString.Val as strZoneName, tblZoneNameString.TagIndex from ( select tblZoneNameString.Val as strZoneName, tblZoneNameString.TagIndex, rank() ov ...Show All
.NET Development try/catch fails ?
I have an app that I work on for a guy in the US (I am in Australia), and I've noticed a consistent problem. My code looks like this: static void main { bool owned = false ; Mutex mutex = new Mutex( true , Application.ProductName + "manifest", out owned ); try { if ( owned ) { // lots of startup stuff Process process = Process.Start( Application.ExecutablePath ); process.WaitForInputIdle(); Application.Exit(); } else { // this if the first instance and the manifest file // already exists, run this version Run(); } mutex.ReleaseMutex(); } el ...Show All
Visual Studio Debugging 64bit code locally (Amd64 running XP x64)
has anyone actually gotten the debugger to work when running 64bit native code on xp x64 (In vc++ 2005) It seems like i've tried everything, but it won't actually debug. When running my application, my breakpoints say "This breakpoint will not currently be hit. No symbols have been loaded for this project." After researching the subject, I know that local debugging is supposedly actually done with a remote debugger. However, I am still unsure if I'm supposed to try and set up the remote debugger, or if this is simply "under the hood" and I'm supposed to leave it set to debug on the local machine. I tried running the x6 ...Show All
SQL Server Transferring data from AS400 - Please Help!
I am attempting to transfer a table from an AS400 to SQL Server 2005 through SSIS. I am using the IBM DB2 UDB ISeries IBMDASQL OLEDB Provider as the source connector. I have tried to set up the source connector using the Table or View option but it says that No Tables Could Be Loaded. I can specify an SQL command and it shows the columns and appears to set up correctly except for showing a warning indicating that it cannot retrieve the column code page information from the OLEDB provider. When I run the job, it fails with the following error: Name: OnError Computer: BAMBIG1 Operator: BAM\infausr & ...Show All
Visual C# Polymorphic Collections
In one project (assembly), I have some interfaces: public interface ISecurable { int SecurableID { get; set; } string SecurableString { get; } ISecurableContainer SecurableParent { get; } } public interface ISecurableContainer : ISecurable { List<ISecurable> SecurableChildren { get; } } In another project, I have some classes: public class Item : IComaprable<Item> { ... } public class ItemCollection : List<Item> { ... } public class Detail { private ItemCollection items = new ItemCollection(); ... public ItemCollection Items { get { return items; } } } In my intranet project, I wrap t ...Show All
Windows Forms how to retrieve text from a textbox in another form
i created a windows application in c# that have the most functionality of notepad but . it consists of 2 forms one is mdicontainer and the else has a multiline textbox in the first i put a menu that process the text in size font , color i included also a new menuitem when clicked it opens new window which is the second form . but i need to retrieve text from it to be processed in the first one HOW You need to expose a public property on your child form or make the textbox control in the child form public. For instance (using the property): public ChildForm : Form {   ...Show All
.NET Development How do I change the namespace of a WebService reference added to my project in VS 2005
Hi, I am creating a class library, which needs the services of a web service. When I add a new web reference for that web service, it is placed in a default namespace i.e., the webservice can be accessed by MyProjectName.NameOfMyWebReference.NameOftheWebService However, I want my Webreference to be in the same namespace that I put all my other classes. I want to access the webservice as follows: MyNameSpace.NameOfMyWebReference.NameOftheWebService How can I do this I cannot find anything that lets me change the namespace a webreference belongs to May be this snapshot from my Object Browser helps Thanks. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Is this a job for Direct X or GDI?
Hello. Maybe someone can answer this for me. I have to develop a piece of software that does some very simple animations upon request. (Make a circle go from one color to another, and have a gauge like control). All 2d animations nothing 3d at all. The program has to be able to go full screen. Should this be done in direct x or is gdi a better option Thanks ...Show All
Visual C# error:No value given for one or more required parameters.
I am using C#.net to write a program. I have an update to update the database when the user changes the cooment. All values that I have assign to the datarow as data in it. Here is the code: foreach ( DataRow dr in _dsComment.Tables[0].Rows) { if (dr[ "CommentId" ].ToString() == strId) { dr[ "OrdNo" ] = _Order; dr[ "Comment" ] = frmN.Comment; dr[ "Date" ] = System. DateTime .Now.ToShortDateString(); dr[ "Name" ] = UserName; } } _DaComment.Update(_dsComment, "Comment" ); _dsComment.AcceptChanges(); the Error I am getting is: No value given for one or more required parameters. this is throw at the update. my updat ...Show All
Visual Studio Team System Web test walkthrough fails
I attempted to repro the web tests per the walkthrough at http://msdn2.microsoft.com/en-us/library/ms243142.aspx When Iattempt to run the tests I get the message Could not run web test 'WebTest1' on agent 'ComputerName'; Could not locate table 'Colors' in data source 'DataSource1' of test 'blablabla Any suggestions Thanks, Tom K As I get into it more, I find that the exact match apprears to work. When I point to an access database with more info in it is where I have a problem. As I get more details I will update this thread - Is it more tables in the db, more fields in the table, DB name(length ) table name (length ). Let me know if ...Show All
SQL Server Chart combination
Hello, I would like to combine an area- and line graph (something like this: http://www.graphicsserver.net/images/thumb%20area%20bar%20line%20graph.png , without the bars), can this be done Thanks, IIMA You will probably need Dundas Charts or another 3rd party control to do something with that effect. It is possible to overlay 3 charts with transparent backgrounds, but I do not think that the effect will be pleasing. ...Show All
Visual C# May help writes a use (C# 2.0 generic syntax ) the code example
May help writes a use (C# 2.0 generic syntax ) the code example:-) This page is a good place to start: An Introduction to C# Generics. ...Show All
Windows Forms Create Trial Period for Windows Forms Application
Hi, I need the idea how to create create Trial Period for Windows Forms Application . Thank's Alexei Basically, you need to store when the app was installed, outside the install directory, and in a place that you don't remove when you uninstall. Then, you need to check that date when your app runs, and stop after a certain time span. And, if you're using C#, you need to obsfucate your code, or anyone can reverse engineer it, remove the time check and have a full version. In fact, even with obsfucation, this is possible, it's just harder. ...Show All
Visual C++ C2061 Compiler error
Hi. I got error message when I try to build my project "d:\Documents and Settings\Phoenix\ \My_app\autonapominalka\main.cpp(164): error C2061: syntax error : identifier 'form1'" Code sample: //-------------------------- Form * form1 = new error; //some code form1->Controls->Add(listbox);// error shows on this string form1->Show(); //----------------------------- So, I have declaration but Visual C++ thinks that form1 is undeclarated. How can i resolve the problem I use Visual Studio .NET 2003 Could you post a complete small sample code that can reproduce the issue Edit: Marking the ...Show All
Smart Device Development How to deploy my apps?
Hi All, I have develop Pocket PC Application which is running perfectly from my development PC using iPAQ PDA. Now, I need to install my apps on the iPAQ PDA. Anyone can help n guide me step by step on how to create .cab files, .inf files ,.msi files (package n deploy app) and also how to install .Net Compact Framework and SQL CE on the PDA. I'm using : - - VS Net 2003 - .Net Compact Framework 1.0 - Windows Mobile 2003 Version 4.21.1088 - ActiveSync 3.8 Thank you Please see links below: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnnetcomp/html/deploy_cf2_ap ...Show All
