Stephen Castle's Q&A profile
Windows Forms System.Security.Permissions.FileIOPermission Exception
There is a user control Which has functionalities of open any image file from user machine and allow user to apply effects and filters on it. This control is working fine if I place it on windows forms application. I am getting "file ,System.Security.Permissions.FileIOPermission,mscorlib,version ,PublicKeyToken=b77ka323adgf2e23 failed" exception if I placed same on &n ...Show All
SQL Server XML data sources in SSRS 2005
I have a reports that are trying to read data from a public web service. 1) I couldn't get the report datasource to read the web service (it returns an XML document). I had the asmx URL in the data source and used the <Query><SoapAcition> in the dataset. 2) So I wrote an aspx page that writes the XML. So that it will write a secured, dynamic, page with text XML data. I got it to work once, but is not consistant. Now it gives me this error: "Data at the root level is invalid" Let me know what else you need to help you understand my question. Do you have any ideas Thanks! ...Show All
Visual C# can anyone explain polymorphism
can anyone explain polymorphism with simple example Polymorphism means “many shapes”. Study the following example. Note that a football, while actually a “ball” may require a different Bounce() method than a Hardball. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Ball { double diameter; double coeffOfRestitution; public Ball( double ...Show All
SQL Server Ordering Parameters Query Results?
Hi, I am using Reporting Services 2000 and i was just about setting the parameters queries so it would allow me to select 'ALL' or a certain item from a especific table.. The query looks like a normal UNION Query but i wanted to have ALL at the top of selection and the rest of the data ordered by a certain field.. I am beeing able to do this... Any ideas Regards, Luis Simoes Yes that was the way i managed it Thanks anyway. Your answer was very clear Regards, ...Show All
Visual Basic Running "Show Data Sources" or "Add New Data Source" Generate Error of True Type Font
Hi, I am using VB 2005 Express Edition Beta 2. When I tries to add data source and click over "Add New Data Source" under "Data" Menu it generates following error "Only True Type fonts are supported. This is not a True Type font." This message also appears when "Show Data Sources" option is clicked. Can anyone help me. Regards. Hi, This is a known issue http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=122156 . This will be fixed in the next release of Visual Studio. To work-around it now, you can change this setting: Display Properties | Appearance | Advanced | ...Show All
Visual C# Separating data access form code.
Greetings All, This inquiry is regarding the separation of data access from a windows forms application. I currently have a class called Data which exposes static methods that basically take in the form variables and then creates, updates and deletes those variables from a sql database. So in my form class I can call this: Int Success = Data.UpdateDate(DateTime date); (return -1 if unsuccessful) My question is – is there a better way to separate the data from the form logic. What are some more popular methods used I often hear the phrase n – tier application - where you would separate out GUI, busin ...Show All
Visual Studio Express Editions how to code "add/modify/remove" events in c#.net2005 express?
in my btnModify.onClick event, i have: this.freedom_Scooter_Service_ReminderTableAdapter.Update(this.freedomScooterServiceReminderDataSet.Freedom_Scooter_Service_Reminder); seems that it works, however, when i restart the application, the data remains unchanged, which means that the change was not commited to the database. how should I code for the modify and remove events to make them work properly and also the add new event btw, i use ACCESS db with 2 tables, "service" and "customer" plz help ok, I figured out something for this topic: 1. adding new record: //to set fields in add new mode, i.e. cl ...Show All
Windows Forms Help w/Decision - embedded controls vs inherited forms
I have a VB6 app which contains an architecture that I am very proud of and has proven to be very extensible. I now need to take that piece of the app over to winforms and am trying to decide whether to continue using this architecture or use some new tools that the framework has given me. Here's the deal. The app is for a lab. They ...Show All
.NET Development CDO Equivalent?
I can't seem to find in the BCL the classes to retrieve mail (POP or from Outlook store) like in CDO. Are they not available Thanks That said, if you would like to see a POP3/IMAP4 implementation in System.Net please send an ask to nclasks@microsoft.com.dontspam (remove the .dontspam) ...Show All
.NET Development error: oledbexception nust declare the variable '@Eff_Date'
Here is the code in my Load event after declaring cn, da and cm cn.ConnectionString = "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=matrix;Integrated Security=SSPI;" cm = New OleDbCommand("select * from lk_Feat", cn) cm.Connection = cn da.SelectCommand = cm cm = New OleDbCommand("UPDATE Lk_Feat SET Eff_Date=@Eff_Date , Exp_Date = @Exp_Date ......etc. .., cn) cm.Parameters.Add("@Eff_Date",System.Data.OleDb.OleDbType.Date,8, ''Eff_Date'') cm.Parameters.Add("@Exp_Date",System.Data.OleDb.OleDbType.Date,8, ''Exp_Date'') ........and all other f ...Show All
Visual C# Out of Memory?
When using my application I seem to get an Out of Memory error at random. I cannot find any common "action" that leads to this. additionally it occurs more frequently when the application is either minimized for more then 5 minutes or is a background window (not the active application) for more then 3-5 minutes. It doesn't happen all the time. I seem to only get it once a week at most. It does not seem to occur when the application is the active window. It's a web browser application and uses the WebBrowser control. it is running on a system with IE6 all latest patches. what's wierd is that I would expect this to occur when the app ...Show All
SQL Server Excel add-in does not pass filter parameter on drillthrough request
We used profiler to see what the difference was between the Excel Add-in and the cube browser in Analysis Services 2000. We created the same reports in both, and the Excel Add-in did not pass the page filter parameter to the stored procedure that processes the drillthrough request. It works with the Foodmart cube, but the underlying database there is Access, not SQL Server. I have not been able to find this mentioned as a bug in the product, but it seems more major than the known issue of not being able to drillthrough on the non-default partition. Has anybody run into this issue ...Show All
Visual C++ Flicker on custom draw control (ocx) after enabling XP Manifest
Hello, I've developed an OCX using Visual Studio 6 and MFC; this OCX subclasses the standard Button class and performs custom drawing of its surface and has been working without problems since 1998... If I add the control to a MFC application, developed using VS.NET 2005 with VC++ and MFC, I can see that the control flickers when the mouse rolls over the button surface (internally I call the COleControl::InvalidateControl MFC function) in order to change the surface color: note that I'm using double buffering in order to avoid usual flickers on drawing. If I remove the XP Manifest support, the flicker disappears: how can I exclude my control ...Show All
Visual Basic Executing stored procedure that returns parameters
I'm trying to execute a stored procedure "spImport" that returns three values: @InvalidCount (bit), @InputRecords (int), @Message (str) The following code gives me an error about SQLCommand: Dim TransferCommand As SqlCommand = stConnection.CreateCommand() TransferCommand.CommandType = CommandType.StoredProcedure TransferCommand.CommandText = "spImport" Is there a better way to write the code The problem is exactly as stated. There is no CreateCommand method for a string object. Here's what you need to do: Dim stConnection As String stConnection ...Show All
Visual C++ serialPort
Version 2.0.0.0 from Microsoft Corporation .NET Component serialPort, I need some examples of code for this component in VC++. Regards, Check this : http://www.codeproject.com/system/cserialcom.asp and u can see more stuff in that web site ...Show All
