Yonglun Li's Q&A profile
Visual Studio 2008 (Pre-release) How to set infinite activity timeout on netTcpBinding?
hi, I have a service that has an endpoint that uses netTcpBinding, the problem is that my proxy dies out after 10 minutes (inactivity timeout) I searched the forum and found some threads saying that the the element "reliableSession" should be set this way: < reliableSession inactivityTimeout = " infinite "/> but it didn't work (actually it ignored any value that I used) and the proxy still got into faulted state after 10 minutes, is there any other solution (I dont want to use "ping" to the server every X minutes) thanks in advance, ofer. Hi, thank you, it was very helpful, now I am able to control the recieve timeout of the cl ...Show All
Visual Studio Express Editions Didn't get expected dll file, why?
I am new to VC express. I just created a dll project and hope as a result, it can produce iNote.dll file in debug dir. But even though build succeeds, dll file never shows up. I can only see some intermediate files: iNote.dll.embed.manifest iNote.dll.embed.manifest.res iNote.dll.intermediate.manifest How can I get the dll file 1) Press alt+F7 (or goto project->properties menu) 2) On the left select "Configuration properties" then "General" 3) On the right click the drop down box for "Output Directory" 4) Select "Edit" from the drop down list 5) Click the "Macros" button 6) Scroll down to the bottom and examine the "TargetPath" e ...Show All
Windows Forms Opening a second form...
I have added a new form to my project. However, I don't know how to open it up when I click on a button in Form1. Help me please To show a form you need to use the ShowDialog or Show members. Here's a sample: VB: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Using form As New YourSecondForm form.ShowDialog( Me ) End Using End Sub C# : private void button1_Click( object sender, EventArgs e) { using ( YourSecondForm form = new YourSecondForm ()) { form.ShowDialog( this ); } } ...Show All
Visual Studio Team System CTP 7 on Team Suite, Schema Import - "statements were not fully understood"
There are numerous statements like this: ALTER TABLE [dbo].[DCJStatTx] NOCHECK CONSTRAINT [FK_DCJStatTx_DepartmentDeptSchedule] GO ALTER TABLE [dbo].[DCJStatTx] NOCHECK CONSTRAINT [FK_DCJStatTx_EmployeeEmployee] GO ALTER TABLE [dbo].[DCJStatTx] NOCHECK CONSTRAINT [FK_DCJStatTx_JobOpenJob] GO ALTER TABLE [dbo].[DCJStatTx] NOCHECK CONSTRAINT [FK_DCJStatTx_JobStatusStatusCode] GO ALTER TABLE [dbo].[CustInvNotes] NOCHECK CONSTRAINT [FK_CustInvNotes_Division_AcctDivisions] GO ALTER TABLE [dbo].[CustInvNotes] NOCHECK CONSTRAINT [FK_CustInvNotes_CustomerNCustomer] GO ALTER TABLE [dbo].[QQOrderDet] NOCHECK CONSTRAINT [FK_QQOrderDet_ProductID_QQProducts] GO ALTER TABLE [dbo].[QQOrderDet] NOCHECK CONSTRAINT [FK_QQOrderDet_SizeIDQQSize] GO .... ...Show All
SQL Server use exists in join
Hello, Can i somehow use exists() function in JOIN ON clause for example SELECT * FROM Table1 INNER JOIN ON Table1.Col1 = Table2.Col1 AND EXISTS(SELECT * FROM Table2 WHERE Table2.Col2 = Table1.Col2) It doesn't work on my query. So, basically i want to do an inner join so that Table1 gets filtered. Then I make sure that every entry in the filtered Table1 has an existing related entry in Table2. i need to do exists because there could be more than one relation in Table2 for each entry in Table1, but i don't want multiple repetition of entries in the filtered Table1. (Not sure if i am making it clear!) I need distict selection, but i am adding NEWID() at the beginning of my query so distinct doesn't work for the rows. with my current query, i ...Show All
SQL Server Will Debug.WriteLine work in a script component?
I have traditionally thrown message boxes while developing SSIS packages and removing them when finished, but wish to move to something more appropriate. From my understanding, Debug.WriteLine is supposed to output to the console while debugging. In various places I'm calling System.Diagnostics.Debug.WriteLine("Stuff") but nothing comes up in the output console. Am I using this the wrong way Debug.WriteLine method has ConditionalAttribute("DEBUG") applied to it, the DEBUG macro is not defined when compiling the scripts, so this method does nothing. Use Darren's code instead. ...Show All
Visual Studio Team System Is there any attribute in the Method to show it is generated by compiler
hi all Is there any attribute in the Method to show it is generated by compiler what is the mean of IsGeneric of the Method's attribute Are you talking about InitializeComponent This is not actually generated by the compiler but actually the designer. Unfortunately, there is no indication in the IL that this is a generated method. You will need to specifically check this method. ...Show All
Windows Forms Just-In-Time debugging Windows Forms
Hello, In the MSDN documentation (How to: Enable Just-In-Time Debugging for Windows Forms) it is said: In addition, Windows Forms created with C++ must have the DebuggableAttribute set in a .config file or within their code. It is well ducumented how to put the DebuggableAttributein the code, but I found nowhere how to set it in de .config file. How do you set this attribute in the .config file Or is it an error in the documentation Thank you for your help, JF Hogue Hi, I am not programming or using Windows Forms, but I am getting the same ".Net Framwork" error msg for what seems to be an exception in Document Viewer. Besides editing the registry to enable JIT in the lo ...Show All
Windows Forms from string to form
Suppose you have the name of the form : string fname = "FormSomething"; How do I create a form object with fname as name Apparently this is not enough: Form f = new Form(); f.Name = fname; Also tried: f.CreateControl(); Can anyone please tell me how to get the form object Thanks!!! Thx for the replies, but it works once. It's in a while loop and it does what it should do the first time. The second time it gives the error mentioned above. ...Show All
SQL Server Management Console Configuration
In using Windows Authentication via the Management Console to connect to a database, my user name listed is in the following format <machine name>\<user name>. I would like to change this setting to <domain name>\<user name>. Is there any setting files or registry settings for the Management Console that will allow me to modify this Hi, if you log on with a domain account this will automatically change. If you are logged in with a local account and don’t want to logon with a domain account, or your comouter is not part of the domain you can use the stored credentials cache in Windows to logon using another account: Control Panel > User Accounts > Select the user > manage my ...Show All
Visual Studio 2008 (Pre-release) How does one implement a Validation template in C# code?
The SDK provides a XAML sample, but not a C# sample ms-help://MS.MSSDK.1033/MS.NETFX30SDK.1033/cpref30/html/P_System_Windows_Controls_Validation_ErrorTemplate.htm the doc says: not all of the template functionality is available when you create a template using FrameworkElementFactory The recommended way to programmatically create a template is to load from a string or a memory stream using the Load method of the XamlReader class ...Show All
Visual Studio Express Editions Create Html table
Good afternoon everyone :) I was tring to replicate something that Dreamweaver has which creates a html table when a user clicks on the Table button. What i tried is this (see code below) but it only works if there is only 1 Coloumn and 1 Row. I am extremely bad at loops and im probably missing some stupid little thing but i can't figure it out :S Here is the code i got at the moment: Private Sub mstHtmlTable_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mstHtmlTable.Click Dim intCols As Integer Dim intRows As Integer Dim x As Integer = 0 Dim y As Integer = 0 intCols = Val(InputBox( "How many coloumns (Numbers only!)" )) intRows = Val(InputBox( "How many rows (Numbers ...Show All
SQL Server SQL Server 2005 - Reporting Services Data Sources Named Pipes VS TCP/IP
Can anyone shed light on why I cannot get away from named pipes in my SQL2005 Reporting Services Data Sources Can it not just use TCP/IP My configuration uses two servers, one in which the reportserver is setup on, and another which hosts the database that is reported against. We are trying to avoid having to open up named pipes on the server that stores the data. Any help would be appreciated. An error has occurred during report processing. Cannot create a connection to data source 'wc_datasource'. an error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote conn ...Show All
Visual C# Saving to DB after ReadXML - Update requires a valid InsertCommand when passed DataRow collection with new rows.
1) I read data from a database, then save the data locally using WriteXML, 2) I Shutdown and restart the app ( to mimic real-world user behavior) 3) I Use ReadXML to re-populate my DataSource Now at this point, if I try to save my data back to the database, I get a "Update requires a valid InsertCommand when passed DataRow collection with new rows." It appears that all the rows that have been "ReadXML'd In" are considered "New". If I ReadXML and then AcceptChanges, I can make changes and save them back to the database. But I run into a problem if I save changes locally - in other words, make a change, WriteXML, then later ReadXML. If I accept changes, then those changes that got saved locally ...Show All
Visual C# VS ComboBox missing display
I while back I wrote a C# program using (among other things) a downdown combobox with items loaded using the .Items.AddRange() function. All works fine on my computer, but on other computers (without the VS Developer software installed), the dropdown box comes up blank. One can still select the different items through the mouse scrollwheel, so I know the data is being loaded, but the dropdown window is blank. Some of our computers have both .NET Ver 1.1 and 2.0 installed, others don't (mine specifically doesn't). The program was developed with VS .NET 2003 software. All the computers are running XP Pro, similiarily configured (though mine's the only one with the VS software), and all have the latest OS updates (I just checked). Any i ...Show All
