scott Li's Q&A profile
SQL Server Programmatically Set Flat File Destination Name (relating to timestamp)
One simple question: I need dumping data from table to a file daily with file name relating to time stamp. The flat file connection manager editor only allow you to set the STATIC file name. Suppose I programmtically passing the time now to a User::TimeNowVariable, how do I set the file name programmatically relating to this variable This is a very classic issue associated to Graphical Programming, it seems to be very difficult to understand how to do a very simple programmatic property setting like this, uncless you KNEW it. I appreciate any helpful info provided. Jordan ...Show All
SQL Server Simulating Errors
How could I create an allocation or consistency error (or otherwise corrupt a db) in a database to test a backup and restore system it either does not return allocation or consistency errors from changing a few binary lines, or too many binary lines are changed and it does not recognize the file as a database file and will not attach it. Is there another way, or is there certain lines of binary i should look for to change ...Show All
.NET Development TableAdapter Update problem
Hello, i have problem in my application. I create dataset with single table. In MainForm i have 2 texboxes and update button. This is code for update button: [CODE] Klient klient = new Klient(); klient.ShowDialog(); KlientDataSet dataSet = new KlientDataSet(); Serwis.KlientDataSet.KlienciRow klientRow = dataSet.Klienci.NewKlienciRow(); klientRow[0] = Guid.NewGuid(); klientRow[1] = klient.Imie; klientRow[2] = klient.Nazwisko; dataSet.Klienci.AddKlienciRow( klientRow ); int result = this.klienciTableAdapter1.Update( dataSet.Klienci ); [/CODE] I got 1 in result variable so i think that database was updated. No my dat ...Show All
Smart Device Development VS2005, no Form designer visible
Hello, I have here a strange problem even with the simplest project. When I create e.g. a device application for a pocket PC 2003 smart device (C#) I cannot see the Form. The Designer opens "Form1.cs [Design]", but not the form itself with the title bar, ... I can see only the part where you place timers,... This space is already filled out with a menu "mainMenu1" This behaviour we don't have on another PC. The problem does not occur with PC applications. ---- I have had the VS2005 beta before, but uninstalled everything as mentioned by MS before installing the VS2005 Release. Also I did the followi ...Show All
Visual Studio 2008 (Pre-release) joins in linq
Consider this query which implements a join. var q = from c in Customers, o in Orders where c.CustomerId == o.CustomerId group o by new { o.CustomerId, c.CompanyName } into g select new { g.Key.CustomerId, g.Key.CompanyName, NumOrders = g.Group.Count() } As far as I can tell, this implements a nested-loops join, which has O(N^2) performance. Is there a recommended way to do a more efficient join in LINQ Can we consider more general Join - e.g. from co in customers.Join(orders, (c,o) = > c.CustomerId==o.CustomerId) select new {co.CustomerId} ...Show All
Visual Studio Language addin
Hi guys, i have a language addin for VS2003. The only info i had when writing it was the Babel example & document that came with the VS2003 extensibility SDK, and this is what my addin is based on. The Babel doc contains a good but limited quantity of info. Is there any better or more comprehensive guide out there for language extensions The two most important things i am trying to find are the required registry entries for my addin - it works but i want to make sure i have a correct and complete install. And i would love to know how to introduce collapsible sections (regions) into my language - simple things like that can add hugely ...Show All
Visual Studio Team System Testing multiple implementations of an interface / abstract class
Hey, I have an abstract object model that I implement multiple times in my project. I would like to test all the implementations through the abstract classes and I am not sure how I could do this. I thought of inheriting from a [TestClass] and adding the [TestInitialize] method there but VS2005 doesn't seem to like this. What is the recommended way of doing this Right now I redefine all the tests for all the implementations and call the base class where I have all the test methods but there must be a better way. Hi RGabo, One recommendation is to create a helper method that tests the actual method. ...Show All
SQL Server Log Shipping from SQL Server 2000 to SQL Server 2005
I work for a small state government department. We are about to install SQL Server 2005. A national government department that runs on SQL Server 2000 are willing to give us a backup of their database (20 gig I think) and then log ship to us regulary. Our aim is to have a copy of the database that we can query from and that is only a day or so out-of-date. I'm having no luck. 1. I can backup the SQL Server 2000 database. 2. I can restore the SQL Server 2000 database onto the SQL Server 2005 box no worries. 2. BUT, if I attempt to restore the 2000 database with the option 'Leave the database in read-only mode . ...Show All
SQL Server Is there a way to set a variable in a data flow from a SQL statement (like in control flow)
I'm currently setting variables at the package level with an ExecuteSQL task. This works fine. However, I'm now starting to think about restartability midway through a package. It would be nice to have the variable(s) needed in a data flow set within the data flow so that I only have to restart that task. Is there a way to do that using an SQL statement as the source of the value in a data flow OR, when using checkpoints will it save variable settings so that they are available when the package is restarted This would make my issue a moot point. Good news Gordo ...Show All
Visual Studio Team System VSSConverter for TFS Beta3
Hi, I am trying to convert a VSS database to TFS Beta3 using VSSConverter but I'm stuck on the settings.xml file. Can anyone give me an example settings xml file that will work with TFS Beta 3 I have tried several things as suggested here http://blogs.msdn.com/akashmaheshwari/articles/386062.aspx but I can't get the format right!! Regards Graham For deleting team project issues, see post http://forums.microsoft.com/msdn/ShowPost.aspx PostID=3978 . This might help you (see 3rd page). For using same team project name for converters, do not delete the team project. Instead move the files and folders under ...Show All
.NET Development Parent Child Relationships within a Datatable
Hi there, I've read some of the threads on parent-child relationships but nothing seams to deal with relationships within the same table. I'm using ADO.NET 2.0. Basically I have a DataTable which I add rows to during my processing. It contains parent child realtionships within the table. When I call the update I'm getting Foreign Key Violations obviously because the child is being filed before the parent. I don't have any control over the order in which I add the records to the DataTable. To make things more complicated, the Parent and Child IDs are GUIDs which means sorting is no use. Can anyone assist me with a pattern h ...Show All
Visual Studio 2008 (Pre-release) LINQ = .NET Framework 3 ?
WinFX is now .NET Framework 3.0, does this mean Linq is also 3.0 or will it be 4.0 or ... that's why I'm asking. because vista will include .net 3.0 (old winfx), does it mean it will include also linq ...Show All
Visual Basic How can i generate Serial Number in Data Report
Hi How can i generate Serial Number in Data Report while retrieving rows from Sql Server 2000. I am using VB 6. Any help is highly appreciated and thanks in advance. rahman A couple of points here This forum is not for vb6 questions you might want to try one of the vb6 newsgroups . And what sort of serial number are you trying to generate Just a unique id for each record (in which case you would define some form of index) or are you looking for some form on sequential number for the records in the report. ie. 1,2,3,4... ...Show All
Windows Forms My latest wishes
This is my latest list of .NET framework enhancement wishes. Some of these problems have workarounds, but are kludges that I'd rather be able to remove from my code. The issues dealing with GDI+ performance and bugs are most critical to me. 1)Never use private, internal, or protected in framework classes, use virtual wherever possible. My life would  ...Show All
Windows Forms DataGridView KeyDown?
(VS2005 - beta 2) Hello, is there anyway to capture a keypress or keydown event in the DataGridView I know there's events called KeyDown and Keypress, but if the DGV is in edit mode, they never get caught. My ultimate goal is to make it so pressing enter moves to the Cell to the right, instead of to the next row but I need to know what key is being pressed before I can do that. Thanks -Adam Ive the same problem. Its ridiculous that such improved control cant do that simple thing. Ive tried a lot of ways such Overriden ProcessCMDKeys and nothing. Also ive been searching for help in a lot of ...Show All
