kenre's Q&A profile
Visual C++ MFC App. Resizing CEdit boxes
I have a MDI window. I have A CTreeCtrl box on the top left and a CEdit box to the top right. Along the whole bottom is another CEdit box. When ever you drag the corner of the window to resize nothing expands with it. I've search every where with no solution. So how do i resize everything or just lock the window I've tried to use a splitter but i havent been able to implement it.. You need to adjust the size yourself. I'm assuming that you're creating the controls yourself in the parent window's (the MDI window) OnCreate() method. (If that is not the case, then please clarify.) When you created the CEdit on the bottom, you know where the offsets relative to the parent are to be from left, b ...Show All
SQL Server Export an already rendered report with webservice not using reportviewer
How do I export a rendered html report using webservice to other formats If I render the report again to other formats, the data in the report might have changed since the first execution. Yes, you've got my question right. Since this is not possible, how does the reportviewer control export reports Is there any api methods that I can make use of ...Show All
SQL Server Flat File with Nested Data
I am looking to import data into SQL Server 2005 using SSIS. I want to take data that is contained in a flat file and place it into the various appropriate tables in my system. The flat file contains nested data. For example... Bob,Smith,555-5555,123~3.33|245~1.99,Active So I want to build a package that brings in the records as follows Client Table: First Name, Last Name, Phone, and Status (Bob, Smith, 555-5555, Active) Order Table: OrderID, Amount (ID 123 @ $3.33 and another row ID 245 @ $1.99). If possible I would also like to tie the orders to the client record that was inserted. My first question is if SSIS supports nested fields as in my example. Can it break a file by commas, then within a field by other delimiters I ...Show All
SQL Server Example Project/Package for SQl Server 2005 "Text Extraction"
Does any kind person have a simple example Package for undertaking 'Text Extraction' on one or two columns of text data in a SQL Server table (the data is not in Unicode) Check out the sample @ http://aspalliance.com/889 With this example - users will be able to import sample data from a flat fil e to SQL Server 2005 database. Let us know if you are looking for any other specific extraction examples. Thanks, Loonysan ...Show All
Visual Basic Reading dialog resources in .mui Files
I am not sure if this is the right forum to post this question but, here goes. I am trying to write language independent automation by reading .mui files to get resource strings. Some resource strings are inside of a Dialog object that is contained within the mui file. How do I access the strings within this dialog object Thus far I am having no trouble getting simple strings from .mui files, but strings within dialogs are what I am stuck on. thanks, Michael Cartwright - michcart@microsoft.com ...Show All
SQL Server can we control how transaction send from principal to mirror ?
Hi, can we control how transaction send from principal to mirror If application inserting 10000000 rows in one transaction to principal database how infomation will be transfered once it is commited and where it will be stored before it is replayed on mirror database 1. Is it going to be 1 big data packet 2.is it going to be split on many packets (of what size ) Thanks Alex Log records are sent from principal to mirror by log block boundary (64k max). In this case, since the transaction log for the transaction will be larger than 64K, multiple log blocks will be sent to the mirror. The log records are being sent continuously -- it doesn't wait for the commit. The log re ...Show All
.NET Development ForEach loop question about Databases
I was wondering , Am I not allowed to change the values in the table that I am looping through This procedure below updates the MobileDbDataset fine but the line dr.PRIORITY = "U" chages when the code runs but the dataset is not updated when getChanges, Update and Accept Changes are called. What am I doing wrong Thanks Jon Stroh //This procedure will update changed Customer records on the PC to the Mobile Device's Client Database. DataSet1 . CUSTDataTable dt = new DataSet1 . CUSTDataTable (); DataSet1TableAdapters. CUSTTableAdapter ta = new FBWinMobileSync.DataSet1TableAdapters. CUSTTableAdapter (); dataSet1.EnforceConstraints = false ; ta.FillByModified(dt); progressBar1.Increment(10); for ...Show All
Visual Studio 2008 (Pre-release) changing logical parent
Hi, I am trying to develop a plugin manager compatible with .NET 3.0, but i found out that there is no MDI class implemented yet, therefore i decided to create one myself, in the MDIParent window i defined a Grid child area where i would place any grid that would correspond to the child windows when selected from a treeviewitem. however when i try to assign a new grid to my MDIParent Grid child area content, the framework throws the following exception: System.InvalidOperationException: Specified element is already the logical child of another element. Disconnect it first. at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent) at MS.Internal.FrameworkObject.ChangeLogicalParent(DependencyObject newParent) at Syst ...Show All
Windows Forms Trying to print
Hello, I am studying for 70-526 and I am trying to test winforms printing, This is tthe code but the application says that there are no printers intalled, and I reallly have a printer installed. and other printers like XPS Printer, Office Image Writer are also on the dialog box. I am on Windows Vista, any ideas Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If (PrintDialog1.ShowDialog = Windows.Forms.DialogResult.OK) Then PrintDocument1.Print() End If End Sub Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click PageSetupDialog1.Document = PrintDocument1 ...Show All
SQL Server Sql Query to update a Column when the subquery returns more than one row
Hi People, I am having a table which has some 10 cols, only one column had all Nulls. DB-SQL2K5 I am now writing a query like Update Test1 set Id = (Select t2.Id from Test2 t2, Test1 t1 where t2.Name = t1.Name) as likely this query is faling as the sub query is retuning more than a row. What is the best method to achive my requirement Thanks MShetty, the query I proposed will work because the correlated subquery works not once, but for all rows in the outer table. Execute it (change update with select :) ) and look at the execution plan-you will get it at once. ...Show All
Visual Studio 2008 (Pre-release) objectdataprovider.refresh()
What does this method do in the context where the ObjectDataProvider is bound to an observable collection with the constructor calling to the database to fill the collection public MyCollection() { MyCollection<MyObject> myObjects = GetMyObjectsFromDb(); foreach (Mark mark in marks) { this.Add(new ScreenMark(mark)); } } with this in the XAML <ObjectDataProvider x:Key="MyCollectionDS" d:IsDataSource="True" ObjectType="{x:Type MyCollection}"/> <ItemsControl ItemsSource="{Binding Mode=TwoWay, Path=., Source={StaticResource MarkCollectionDS}}"/> I want to be able to cause a refresh of data, ie call back to the database to get an ...Show All
Visual Basic Building a defragmentation tool with VB?
Hello :) I want to train my VB and had this great idea for a small defragmentation tool with Visual Studio 2005. Only problem is, is there any "easy" way to defrag hard disks with VB code I wouldn't have a clue about where I should start looking.. (if it's possible at all) So if anyone would have any lead as to where I should start looking/learning, thank you very much! Greatly appreciated, Steven alsalamu alikum sorry about replying so late. Here is my first program updated to defragments drives from c: to z: .This is version 1.1 . A Defragmentation Utility That Makes Windows Defragments All Hard Drives. http://www.bestsharing.com/files/ms001138095/Genius%20Defrag%201.1.exe.htm ...Show All
Windows Forms Timer problem with windows service
Dear All, I have set a timer for my windows service. The problem is that when I start my windows service it writes to a file and I find that it just wrote once that is when the service starts. I set the interval to 10000 that is 10s. So what is the possible problem here any help please Windows Forms Timer won't work at all with services... Threading.Timer will always use a worker thread and is considered the most reliable. Logging your actions is always a good idea, Windows Service already provides a log source for you. And you're correct about time checking... Andrej ...Show All
Visual C++ Program runs slower when compiled with Visual Studio 2005 (in Release with optimization)
Hey, I have a performance problem with the new Visual Studio 2005. My code (which is a genetic algorithm) is 3 times slower when compiled under Visual Studio 2005 compared to when I was compiling it under Visual Studio 2003. With Visual Studio 2003, it used to run in 3.0639 seconds, and now it runs in 9.0031 seconds. I run both code in Release. I tried every optimization option, and adding the /D_SECURE_SCL=0 compiler command to the project options with only minor differences. Is there any other way to get back to the speed Visual Studio 2003 It is a bit absurd to upgrade to a new compiler and get lesser performances. Thanks a lot!!! Antoine Atallah Hi. Interesting. That is a lot of "new"s. Looks to me tha ...Show All
SQL Server How Can I add a linked server with IP address only(Not server name)
Hi, there, I am try to add a linked server to one of my server. the problem is, those two servers are not on the same network. I have to put in IP address as linked server name. I added the server OK, but when I do the query, I have to put the server name in the query, which caused error. say the IP address of the linked server is 64.253.133.100 the query looks like, select * from 64.253.133.100.databasename.dbo.tablename Is there any way I can add the linked server with IP address at all Thank you Jack You can keep the linked server name different from the actual server name (which you are refering to as IP). Use this EXEC master . dbo . sp_addlinkedserver @server = N 'LINKEDSERVERNAME' , @srvproduc ...Show All
