Dongwei's Q&A profile
Visual Studio Express Editions RSS Reader Exit Problem
When I exit my RSS Reader I get the following strange error message: System.Data.SyntaxErrorException was unhandled Message="Syntax error: Missing operand after '=' operator." Also the following line in my code is highlighted: Me .ChannelBindingSource.Filter = "FolderID = " & FolderComboBox.SelectedValue This corresponds to line 506 on Snapshot 9 of the downloadable project: Me .ChannelBindingSource.Filter = "FolderID = " & FolderComboBox.SelectedValue However when I run the snapshot 9 code it works fine and does not produce the same error. does anybody know how to resolve this Thanks in advance :) Luke Ok i checked the value members and the ...Show All
Visual C# change negative sign
i have a total figure shows -200 and i want to make it display as 200.. Hi there, Is this total you have in a numeric variable (e.g. int, double, short etc) If it is, you can use the System.Math.Abs() function as this will return the absolute value of whatever number is passed to it. For example: Double test = -200.97; Double nonNegTest = System. Math .Abs(test); MessageBox .Show( "Original: " + test.ToString()); MessageBox .Show( "Alteration: " + nonNegTest.ToString()); The message boxes above are for illustration only so that it can be seen what the effects of System.Math.Abs() are. However, if your total is stored in a string variable or the like, you can convert the value to s ...Show All
Visual Basic Problems with the timer event Tick
Hi everyone, I am currently doing a simple game to generate 3 random numbers using Timer class. However, I encounter a problem regarding the Tick event. The program is supposed to roll the number when I click certain button in window form and stop after 4 secs. The thing is I don't know how to stop the timer after certain amount of time. I have tried changing the interval property of the timer but it doesn't seem to be working. Anyone can help me with this problem I am very grateful to you. Thank you The following code shows how to handle it using the timer control and the timer class. Public Class Form1 #Region "Implemented Using Timer Control" Private Sub Button1_Click(ByVal sender As System.Object ...Show All
Windows Forms Design time events
How to resolve if current root designer begin to close, in other words we click close button on designer window I read this two answers, and then i hade brain-wave, i try to use IEventBindingService to atach to form closing event. ...Show All
SQL Server How to change the CSS Length Unit of the Report?
Hi Microsoft guys, I want to set the width of the report to 800 px (pixel) , but it seems that I can only set the width to CSS Absolute length unit such as cm, mm, in, pt, or pc . Could anybody tell me how to switch the length unit from Absolute length units(inch, etc.) to Relative length units(px, etc.) Thanks a lot in advance! Danny ...Show All
SQL Server SELECT consecutive dates
I have a table called MachineDtl in SQL Server 2000 with the following fields: Date Machine# Value 1/1/06 100001 50 1/8/06 100001 -90 1/9/06 100001 -60 1/10/06 100001 -900 1/1/06 100008 10 1/2/06 100008 12 1/25/06 100008 -1 1/26/06 100008 -1 Is there a way to select only the records where a machine has a negative value on 2 or more consecutive dates For example I would only want the following returned from the sample above: Date Machine# Value 1/8/06 100001 -90 1/9/06 100001 -60 1/10/06 100001 ...Show All
Internet Explorer Development How To: Navigate too new page in new tab from .NET C#
I want to open a page in a new tab, not unlike having it popup, only instead in a new tab from inside server side C# in ASP .NET 2 Thanks Your website should have cross-browser compatibility. Tabbed browsing is not supported by all browsers. BTW, there is a W3C draft named CSS3 that have mentioned this , but it is a working deaft so IE7 does not support it. ...Show All
Visual Studio 2008 (Pre-release) how to use FrameworkElement.FindName
According to MSDN FrameworkElement.FindName searches recursively till it finds a element by the given name. "If this element has child elements, these child elements are all searched recursively for the requested named element." I believe I should be able to use this to get the textbox part of a combobox, example: TextBox tt = combo.FindName( "PART_EditableTextBox" ) as TextBox ; But it doesn't work. I tested a bit more and turns out FindName doesn't have the recursive behavior the docs says. This code works: FrameworkElement grid = VisualTreeHelper .GetChild(combo, 0) as FrameworkElement ; Border bd = grid.FindName( "Bd" ) as Border ; grid = VisualTreeHelper .GetChild(bd, 0) as ...Show All
SQL Server Joining Dummy Columns
Is it possible to create a join on two tables when one of the columns has been derived. e.g. Table 1 ID Name Price Qty 1 Sand 12,00 2 Table 2 Week Top_Sales 1 24 e.g. Select a.ID, a.price, a.qty, a.qty *a.price as "Total Sales" from Table 1 a inner join on table 2 b on b.top_sales = Total Sales Is this possible to perform this join without creating a temporary table or a view Sure, but you can't use the named column from the SELECT clause because that name hasn't been materialized yet. You will need to do: Select a.ID, a.price, a.qty, a.qty *a.price as "Total Sales" from Table 1 a inner join o ...Show All
SQL Server Strange image problem (only for experts)
i made reports includes sorting option each header column action is an hyperlink to itself with param on the header of the reopt there is a logo image. But..... The strange thing is, while i press the hyperlink the image disappear, not at all, just shows an empty box with red cross in it (dosn't show the picture) somewhy on other reports i don't have that problem and i can't find the difference help me please if you can Hi, I hope i understood your answer, I ususally use the image control, also this time I thought maybe i have some properties problem Which kind of image did you add (embedded,Project,URL,DB) Maybe you install kind of hotfix I installed SP2 I trie ...Show All
Visual Basic replacement for quick-console
After some time thinking I was crazy because I couldn't show a quick console I did some searching of posts to find out that quick console has bee removed in 2005 :(. It seems that a few people have asked what to do in its absence but have received no answer. I will see if I have better luck, because I really need its functionality. Without quick-console, what is the easiest way to quickly display text for debugging purposes without interrupting program flow I have tried using system.diagnostics.debugger, but have had no success and the docs aren't so great. SteveJ Any possibility you have "Redirect all Output Window text to the Immediate Window" checked (Tools | Options | Debugging) It will then cause all of ...Show All
SQL Server New Diagnostic Logging Entries in SP2 CTP?
Hello all- I installed SP2 CTP yesterday, and in the course of my testing ran one of my SSIS ETL jobs. I routinely log to database, and have a report designed so that I can easliy monitor the job performance, errors, etc. However, when running on SP2, there seems to be new Diagnostic entries that are logged, so much so that my 6 page report of events has now exploded into 337 pages. I have included a sample of the entries: 19838 2:13 AM ExternalRequest_post: 'ITransactionJoin::JoinTransaction succeeded'. The external request has completed. Data Mart Execution Logs User:Diagnostic Is anyone else experiencing this Did I miss a kb article I have looked around, and I find nothing. ...Show All
Software Development for Windows Vista 360 as extender to Vista MCE, DW20.exe crash??
Anybody else experiencing this problem It runs ok for a little while and then the 360 MCE stops and gives me connection error. Log file in vista says its DW20.exe that causes the fault. I've searched, and seems its to to with office application feedback or somthing. It ran smooth before, so it might be because I installed Transcode 360 beta, will of cause try and uninstall. The MCE in Vista runs smooth without any problems. Only in the 360 it appears to cause problems. I tried two different 360's just be certain the problem was not here. Any clues Thanks Please note that this forum is geared toward software developers creating their own programs. That said, see the link below which may help you wit ...Show All
Windows Forms How can we databind a PictureBox control?
How can we databind a PictureBox control I tried i tlike this picPrimaryLogo.DataBindings.Add(New Binding("image", mFcPartySetup.DSPartySetup, "PartyCompany.PrimaryLogo")) but it said someThing like that: Additional information: Could not format the value to the desired type. why does this happen i m using vb.net vs2003 with sql server 2000 personal edition & the datatype or the sqlsdatatype for the field PrimaryLogo is image datatype then why does this value/format issue occurs Hi, Dim cn As New SqlConnection(strCn) Dim cmd As New SqlCommand("SELECT Picture From myTable ", cn) Dim da As New SqlDataAdapter(cmd) Dim ds As New DataSet da.Fill(ds, &qu ...Show All
Visual Studio 2008 (Pre-release) My WPF application doesn't run on a machine which has .Net3.0 but doesnt have VisualStudio2005 and its extensions for WPF/WCF
Hello, Please let me know what are the minimum requirements for running a WPF application(using XAML) on a machine that doesnt have Visual studio 2005 and orcas Our application end users just have .Net3.0 installed on their machines.When this app.exe is run on a machine with just the .net3.0 framework, we get a msg like : "app.exe has encountered a problem and needs to close.WE are sorry for the inconvenience.If you were in the middle of something,the information you were working on might be lost." This otherwise works fine.Can you please suggest me what I am missing here Do I need to create a deployment package everytime so that all relevant dlls(w.r.t WPF) are also intalled our end user's machine.Am I missing something ...Show All
