Jason Manfield's Q&A profile
Visual C# table size
I'm a newbie. in C# If I add and delete, to and from my table, how can I detemine the number of records in my table at any given time. What I want to do is to read only the last 50 records of my tabel so I will only see the latest entries. Any help is greatly appreciated. Jim Diamond I'm assuming here that you have a SQL Server backend or something like that. The easiest way would be something like SELECT TOP 50 * FROM Table1 ORDER BY anIDField DESC Where anIDField is either an autoincrement field or a datetime field [I'd prefer a datetime field just because you know WHEN the record ...Show All
.NET Development Socket crashes on AccessViolationException when the peer side aborts (net2.0 beta2)
Hi, I experienced a weird problem with socket on my machine. On my colleague's it works like a charm. When I have socket, waiting for incomming data (after I called BeginReceive) and the peer side aborts - eg. I kill the telnet.exe who I used as a client, the socket throws AccessViolationException on unknown module. The crash itself is in > imon.dll!20b0cd39() did anyone experienced something similar, or it's problem on my machine regards georgem Unfortunately, I can't get this to repro on my side using a current build and the dump file you sent contains only a ...Show All
Windows Forms Advice requested: Windows Forms Binding:
I have been trying to get the following Windows Forms binding working, without success. The following Code, successfully populates the GridControl, and both combo boxes with data. The two comboBoxes represent: SalesOrderType, and SalesOrderStatus. There six SalesOrderTypes, and five SalesOrderStatus values. The GridControl contains all of the Sales Orders. My Problem: I want the comboBoxes to display the same value that is in the DataGrid, each time a user clicks on a different DataGrid Row. I want the comboboxes synchronized with the dataGrid control. I am using: VS2005 Beta 2 C#. 1 DataGridView 2 ComboBoxes SqlConnection con = ne ...Show All
Visual Studio 2008 (Pre-release) Compile error
I had the PDC 2005 LINQ Preview version installed and was able to create a LINQ console application in VS Beta 2.0. I ran into the following error in compilation "; expected" in the p declaration using System; ..... using System.Query; using System.Xml.XLinq; using System.Data.DLinq; var EvenNumbers = from p in Number where p == 4 select p; What did I miss Thank you all in advance for your help I found out what the problem was. After the installation was completed, the screen will follow with a page as the link below: C:\Program Files\LINQ Preview\Docs\ReadMe.htm. Go down to the sec ...Show All
Windows Forms Having Trouble with A MultiSelect List Box and A Typed Array
So here is all the code, and then I'll explain the problem: First I have a multi-select listbox: this.lblPossibleBaseCurrencies.Location = new System.Drawing.Point(312, 184); this.lblPossibleBaseCurrencies.MultiColumn = true; this.lblPossibleBaseCurrencies.Name = "lblPossibleBaseCurrencies"; this.lblPossibleBaseCurrencies.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.lblPossibleBaseCurrencies.Size = new System.Drawing.Size(120, 56); this.lblPossibleBaseCurrencies. ...Show All
Windows Forms Retrieving the values from a datagrid
I select values from the database and display them in a grid but first I apply formatting to the values. So from the database I may get the value 5236.2389 but the grid may display $5236.24 due to my formatting. What I want to do is retrieve the value that is displayed in the grid ($5236.24). All efforts so far of trying to access the&nb ...Show All
Visual Studio Tools for Office Sending email using Outlook 10.0 Object Library
In my application I am using the Office XP PIAs to communicate with the local Outlook client in order to send email. I am using the Office XP PIAs because I have to support Office 2000,XP, and 2003. Yes, I am aware that MS only supports using the Office XP PIAs for 2000 and XP, but I had problems trying to include references to both the Outlook 10.0 object library and the Outlook 11.0 object library.The problem is that in testing the function that sends the email, I get a dialog box in Outlook that warns me a program is trying to send an email message on my behalf. Is there a way I can set the security or trust when I deploy the project so t ...Show All
Windows Forms Custom Forms Designer Serializer Issue
Hi, I have enhanced custom forms designer from http://support.microsoft.com/ id=813808 http://download.microsoft.com/download/f/d/9/fd986a23-d3d6-44c3-8fa0-75e21b0094bf/designerhost.exe (C# code examples from Microsoft) It works nice with .NET Framework v1.1. Recently, I have migrated entire project to .NET framework version 2.0. The application compiles without any errors, but when I add any controls like button, textbox, custom forms designer doesn't serialize any code. It returns the following error: --------------------------- Error:The object 'System.Windows.Forms.Form' failed to serialize itself. It may not support code gene ...Show All
SQL Server Joining two fields in a query
I am trying to join two fields in a query in SQL 2000. For example. Update myTable SET field_1 = @field_1_value , field_2 = @field_2_value , field_3 = @field_1_value + ' x ' + field_2_value Is this even possible. I want the user to input values for fields 1 and 2, then in the background combine the two and insert that value in field 3. Thanks in advance, Scotty_C that'll work! there's just a typo for the @field_2_value Update myTable SET field_1 = @field_1_value , field_2 = @field_2_value , field_3 = @field_1_value + ' x ' + @ field_2_value ...Show All
.NET Development WSDL command script
I am trying to use vs2005 web service features such as creating a ws in a file location instead of a iss location. I have created: I have created my web service file at: c:\webservice\website4 If I run the webservice project in vs I get internet explorer opening my ws as: http://localhost:2758/WebSite4/Service.asmx This works fine and all my web methods are exposed. I don't understand what the "2758" is My next objective is to create a WSDL file which I can reference in my windows form application. If I understand correctly, I now need to replace localhost with my server ip address. ...Show All
Visual C++ Why do I get C1001 (internal compiler error)?
Why do I get C1001 with the following code array < float ,2>^ arrGrayscale = gcnew array < float ,2>(100, 100); pin_ptr < float > pp = &(arrGrayscale[0,0]); Notes: If I change the array element type from float to short, the compiler does not complain. Thanks Internal compiler errors are compiler bugs. Could you please log the issue at http://lab.msdn.microsoft.com/productfeedback/default.aspx Also, please make sure to reply back on this thread with a link to the bug so that others can follow on its status. Thanks in advance for taking the time to report the ...Show All
Visual Studio Tools for Office Access ICal UID from VSTO
Hello, I'm working on a system that will syncronize appointments between outlook and my web application through web service. My application already export appoints to outlook with ics files (ical) BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT DTSTART:20060529T184000Z DTEND:20060529T184500Z LOCATION:room1 UID:12345 TRANSP:OPAQUE SEQUENCE:0 DTSTAMP:20060529T210534Z DESCRIPTION:Test this is a test SUMMARY:Test PRIORITY:5 X-MICROSOFT-CDO-IMPORTANCE:1 CLASS:PUBLIC END:VEVENT END:VCALENDAR this works great, but my problem is with the UID. I can open the appointment in outlook and do save as "ics" file and I se ...Show All
Visual Studio 2008 (Pre-release) looking the difference between Asynchronous Message Exchange Patterns and Asynchronous Operation Implementations
Hi I had readen the WCF documentation about asynchronous calls but I can't undestand well the differences between Asynchronous Message Exchange Patterns and Asynchronous Operation Implementations. Is there a sample of Asynchronous Message Exchange Patterns Thanks Javier Yes. Have a look at Steve's quick discussion here. http://hyperthink.net/blog/2005/11/27/A+Little+Bit+About+Async+In+WCF.aspx . If you wanna ask questions, come on back and we'll be glad to help. Simple contract that specifies an async message pattern : [ServiceContract] public interface AsyncMessages { [OperationContract( ...Show All
Visual Studio Express Editions How to connect two tracking bars and a data table?
Hi! Me again, with my next "small" problem. I have a SQL database table, with two primary key coulums. In my application I would like to use two slide bars (each of them to be bind to one of the DB coulums), to select the data to be displayed on the form. Can someone help me on this issue Thanx! hi. Is your problem solved could you be more clear in your problem definition Thank you, Bhanu. ...Show All
.NET Development Mht Email (Html Archive)
It is possible (out of the box) to send Mht email now in .NET 2.0 I've taken a look at LinkedResource & AlternateView and I'm able to send out emails. However, there is no documentation on what is going on behind the scenes. http://msdn.microsoft.com/library/default.asp url=/library/en-us/e2k3/e2k3/_clb_sending_a_web_page_by_smtp_mail_using_cdosys_vbs.asp offers some insight into this... ...Show All
