Michael_Shao's Q&A profile
Visual Studio Express Editions Import Fixed Width Text File
Hello, I want to import a Fixed Width Text file so that I can display the results in my Datagridview1. The data looks like this for about 97,000 lines: 999999JoeSmith 33 Main St. 123120060000005035 999999JohnSmith 450 Main St. 10212006000000 503R I can break this down with " Microsoft.VisualBasic.FileIO.TextFieldParser" and create a Dataset then use my BindingSource to populate the Datagridview1. The problem I'm having is the R in the 503R is a value representing a negative value(503R is actually NEGATIVE 5039) where the R is equal to 9. Is there a way to change the R to the 9 before it hits my Datagridview1 and make the number a NEGATIVE value I want to be able to Sum up the values 5035 and -5039 to equal -4. Th ...Show All
SQL Server insert into : performance issue
Hi, I have a insert into statement in sp1 which executes sp2.sp2 retuns around 2000 rows after lot of processing.When I execute sp2 directly from query analyser it takes about 2-3 mins but if I do the insert into tab1 exec sp2 It takes 20 mins. what are my other options, how can i improve the performance Thanks, ssm Check the plans of the different executions (using QA or SSMS) and see if you see any major differences. Without seeing it directly, I would guess a poor plan is being chosen for the call based on some complexity of running it in a procedure rather than directly. It may also be better to rewrite as one procedure. ...Show All
SQL Server error when using IIF with sum()
I have a field I need to have a count for, which is fine, but if that count is equal to nothing I don't want anything to print out in that textbox. It works if the count is equal to nothing BUT if the count has a value I get an error message. My logis is if count = "" then print nothin else print the count =iif( Sum(Fields!delStatusCount.Value, "dsDelStatusCount") = "", "", "DEL = " & Sum(Fields!delStatusCount.Value, "dsDelStatusCount")) Thanks The function sum will return a value. So you can not compare with a string ("") try to replace the string of just =iif(sum(x), x, ""). ...Show All
SQL Server SQL Server time zone?
I don't know what is going on, here's the error message, could someone please answer thanks Server Error in '/' Application. Paul Randal - MSFT wrote: Did you try changing the code to pass that parameter Perhaps I'm misunderstanding what you are talking about, please explain in alittle more detail ...Show All
Visual C++ Class object Creation
hi , i have a doubt . when does the object of a class created.. is it created after the call to one of the constructor. or before the call to constructor. i think that object is created before the constructor . and initialization of those objects during constructor execution.. plz reply, manish It depends on what you call "created". The memory for the class object is allocated by the new operator. But it isn't yet fully ready to be used until the constructor has finished executing so that the object is properly initialized. The very last thing that happens in the constructor code is execution of a bit of code that the C++ compiler generates that puts the true v-table in pl ...Show All
Visual Studio 2008 (Pre-release) how to retrieve values from arraylist using xlinq
hi all, i'm using xlinq and i got a problem in it.That is how to get values from ArrayList using xlinq . Can you be more specific If you are trying to perform a query against an ArrayList, you must first convert it to an IEnumerable<T> type sequence using either the Cast or OfType operators. If you are building the ArrayList privately and can KNOW it has all the same type of elements, then Cast is fine. However, if the ArrayList gets passed into your code and you can't be sure the ArrayList contains all the same type of elements, use OfType. Here is an example: ArrayList al = new ArrayList(); al.Add(4); al.Add(1); al.Add(3); al.Add(2); IEnumerable ints = al.Cast().Where(i => i > 2); foreach(int i ...Show All
Windows Live Developer Forums How to use the adCenter API from a JAVA application?
Hi, Does someone use the adcenter API from a JAVA application I am stuck at the first step - connection to the API - since I have no class named Administration after generating the JAVA classes from the WSDL files (using the Axis2 WSDL2Java plugin for eclipse)! I only have a AdmimistrationStub class which does not contain a method to set a ApiUserAuthHeader for instance... Any help is welcome! Thanks. Hello Ludo-R, Here is how it works on my side: AdministrationSoap _administrationService = new AdministrationLocator().getAdministrationSoap(); ((Stub) _administrationService).setHeader(NAMESPACE, "ApiUserAuthHeader", new ApiUserAuthHeader(USERNAME, PASSWORD, USERACCESSKEY)); ...Show All
.NET Development Expose DataSet for web service client
Hi: I have a web service with a typed dataset defined. I also got a windows form as a web client to consume the web service. In the win form project I successfully added a web reference to the web service but was not able to reference the typed dataset defined in that web service. I took a look at the Issuevision sample and confirmed that the client was able to reference the typed dataset referenced in the web service. So I'm missing something here hope that someone can give me a hint. Both solutions were developed in the VS 2005. Much appreciated. Let me understand your problem here.... When you said you're unable to reference the dataset in the client.... do you mean that the dataset is not the ...Show All
Visual Studio Tools for Office Accessing Excel ComboBox values programmatically
All, I have created an Excel add-in that loads information from Microsoft Project Data Server into a spreadsheet. For each row of data added to spreadsheet, I add a combobox that is populated with several options to choose from (there is a different default value for each combobox). I use the following code snippet to add the comboboxes to my spreadsheet: Microsoft.Office.Tools.Excel.Controls. ComboBox comboBox1 = this .Controls.AddComboBox( this .Range[ "C" +(i+7), missing], "comboBox" +i); comboBox1.Items.Add( "" ); //index 0 comboBox1.Items.Add( "blah" ); //index 1 comboBox1.Items.Add( "blah blah" ); //index 2 comboBox1.SelectedIndex = 0; I have two question ...Show All
Smart Device Development Exiting a Smart Device Application
I am developing a smart device application in Visual Studio 2005 for a Symbol handheld pocket pc device. I have two forms for the sake of this discussion lets just label them Form1 and Form2. Form1 is the login form that is loaded by the application using the following code: Application.Run(new Form1()); After the user is authenticated on Form 1 I create a new instance of Form2 and open it using the following code: Form2 frm = new Form2(); frm.ShowDialog(); There are now two instances running one of Form1 and one of Form2. I know this because when I check the system memory I can see both processes. My question. If I am on Form2 and I create a exit button how do I close the entire application. How do I close both forms and en ...Show All
Visual C# How to call .NET 2005 assembly from .NET 2003?
Sample source code will be great. Thanks hi, It's ok for you to call assemblies of Framework1.1 (VS2003) in Framework2.0 (VS2005). But Framework2.0 has some break changes from Framework1.1, it cannot be compatible forward, since may touch the break changes. Thank you ...Show All
Visual C++ Files paths withing VS 2005?
I guess I'm not smart enough to figure out how to get the file path of a file opened inside VS 2005. With VC6 you could get a file's properties and there view the path. I guess Microsoft determined that wasn't usefull so its not in VS 2005. So is it possible to get the path of a file opened in VS or is a yet another thing that makes me wish I could go back to VC6 The file isn't in the Solution Explorer. Its an include file not in the project. I've got 5 versions of that file and I need to figure out which one I'm looking at. ...Show All
Visual Studio 2008 (Pre-release) Viewport3D view converting to an image
Hello, I want to convert the view of Viewport3D to an image. So I added the following code: Image myImage = new Image(); RenderTargetBitmap bmp = new RenderTargetBitmap(180, 180, 120, 96, PixelFormats.Pbgra32); bmp.Render(Viewport3D); myImage.Source = bmp; StackPanel myStackPanel = new StackPanel(); myStackPanel.Children.Add(myImage); this.Content = myStackPanel; But after the execution of this code, StackPanel was empty (there were no image inside the StackPanel). Could anyone help to sove this problem Howdy... You can set your viewport into a brush by using the following In your stackpanel, add a rectangle and name it ViewImage ViewImage.fill = new VisualBrush(myViewport); ...Show All
Windows Live Developer Forums please can someone explain how to upload a picture on my website
I am just trying to upload a picture on my new website tutorial and having no joy! Any tips at all would be great...please be warned I am complete Novice to this....but eager to learn1 Was it not enough --> http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=504992&SiteID=1 ...Show All
Visual Basic My application acts like a parasite?
Hello! Strange subject I'll explain. I’ve got a very simple application. A client module that calls a login form, followed by a mdiparent form. This module connects to a remoting server. The client module is deployed via ClickOnce. Why do I say that my application acts like a parasite Because, sometimes, the last application (i.e. notepad, internet explorer, outlook, “you name it”) used before opening my application looses its independence. Steps: Open notepad (set focus to it) Open MyAPP (through menu created with clickonce) Focus notepad (impossible) – MyApp link in taskbar starts to blink. Minimize MyApp Click notepad link in taskbar MyApp maximizes ...Show All
