Jan DHondt's Q&A profile
Visual C# Syntax using an array of classes bizzare error with language parser
This is a simplified version of my code to highlight my problem. It seems as if the parser loses the type information. namespace myname { class A { public string b; public FileSystemWatcher c; public A() { c=new FileSystemWatcher(); } } public class D { A []e=null; public void f() { for (int index=1 to 10) { e[index] = new A(); e[index].a="Test"; e[index].c.Filter = "*.wav"; e[index].c.NotifyFilter = System.IO.NotifyFilters.LastWrite; e[index].c.Path = sub.GetValue("Directory", ""); e[index].c.Changed += New FileSystemEventHandler ( OnChanged); e[index].c.EnableRaisingEven ...Show All
.NET Development WebService Timout troubles
My webservice times out after insterting 15 or 16 rows into an access database from a mobile device. I read that databse querys and things of that nature take a long time. (well longer than regular methods) Ive gone into my iis server setting and changed the script timout to a higher value (longer than what its timeing out at) no change. i put <httpRuntime executionTimeout="600"/> in the web.config for the service. Not sure if this even does anything anyway. in the call from the mobile device I have done instance.Timout = 600000 I have tried the first and second things together no change have not tried all three togeth and I doubt it w ...Show All
Smart Device Development Suddenly get "sql server does not exist or access denied" after connected for ages.
Hi all, I'm developing a PDA app using the compact framework. It connects to a SQL server 2000 database calling stored procedures to read data and update it etc.. It all works absolutely fine for 10 minutes or so - reading and writing lots of data. Then all at once I get the error "sql server does not exist or access denied". In my error handler I try to reconnect - but it seems once this error has happened it's not possible to reconnect. I don't know whether it makes a difference but the PDA is connecting to a database on my machine via a USB connection and the ActiveSync (the very latest version) program. Any ideas would be much appr ...Show All
Visual Studio Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Any ideas why I am getting COMException when I was expecting and handling an exception of type CrystalDecisions.CrystalReports.Engine. InvalidArgumentException Why are those nasty interop exceptions showing up Thanks Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Source Error: ...Show All
Visual C++ Mixing ml64.exe and Win32 C++: is it possible?
I am currently running WinXP Pro on a dual AMD Opteron system. The development project I'm working on is a high-performance CAD/graphics program. The project is mostly Win32 C/C++, but we also have many specialized performance-critical subroutines hand written in assembler. These assembler files are part of the Visual C++ project and each has a custom build-step that uses ml.exe to compile. We would like to take advantage of the 64-bit registers in our hand-coded assembler routines. The use of the 64-bit registers would only be for mathematical computation, e.g., we don't need the full support of a 64-bit OS with 64-bit memory addressing. So ...Show All
.NET Development SecurityAction.DemandeChoice is obsolete ?
I'm working with Beta 2 (v2.0.50215) and I'm using PrincipalPermissionAttribute. As I wished to use more than 1 attribute on a single method, I tried the new SecurityAction.DemandeChoice flag. To my surprise, the compiler said this flag is obsolete ! I've not found anything about that on the web (nothing about that on MSDN2 for example) except in a Mono mailing list. Has this new feature been removed Is there other removed features Thx Hi Nicolas, LinkDemandChoice was in earlier builds of Whidbey, but we did decide to remove it from the final shipping bits. There was some internal architecture work that we th ...Show All
Windows Forms Editing Data on a Report
I have a CrystalReports report in a ReportViewer on my Form. I need to allow the user to edit the report numbers directly on the report. My thought was to just have them double click a number on the report and a textbox woud appear where the number was allowing them to enter a new number. How would I do this Is there an&nbs ...Show All
Windows Forms how to get the parent form of a control???
Can anybody tell me how to use the "parent::get()" property of a text control in order to obtain its parent form Thanks!! The Parent property will give you the parent Control of another control. The parent is either another control or the form. The TopLevelControl can be used to get the highest grand-parent in the hierarchy (normally the parent form). Michael Taylor - 6/21/06 ...Show All
Visual Studio Team System Project Portal My Bugs only shows bugs assigned to TFSSERVICE
While I was evaluating creating and using a Team Project from an account other than a 'Namespace Administrator', I ran across a problem with the 'My Bugs' Report. When displayed in the SharePoint Project Portal, the report always displays bugs assigned to the TFSSERVICE account rather than bugs from the account running Visual Studio. If you run the 'My Bugs' report from the Report Site, you get the toolbar that allows you to select which user's bugs to view. I've submitted as a bug at the Product Feedback Center, but wanted to make a note here so that others aren't surprised when 'My Bugs' doesn't show anything. Note: The data source for the ...Show All
Visual Studio Custom code for New Project Templates
I'm trying to get a handle on how much the design of the New Project Templates has changed from 2003 to 2005. One quick question at the start of this process: In VS 2003, you wrote custom code (to be run when a new project was generated) in Javascript. Is it correct that in VS 2005, that new code has to be written in a .NET language and must implement the IWizard interface Thanks, Chuck So, Craig, if I want to stick to the VS 2003 way of creating new templates, can I just put my Javascript file into the .zip along with the other project files Chuck ...Show All
Visual Basic Lotus Notes
Guy's I have a windows form application that I am working on in Visual Basic 2005 and I am trying to start lotus notes, add an attachment and then send it all from my application, however although I am using lotus notes here is there a way to just open the default mail client and do this if not then if I can just fine a way to open any mail client and do this I will be happy I understand that there is a way to do it in vb 6 with a MAPI call I found this code to do it in VB 6 what is the equivalent in 2005. 'Start MAPI (email) Session MAPISession1.SignOn MAPIMessages1.SessionID = MAPISession1.SessionID 'Compose new message ...Show All
SQL Server Accessing Initiating Event + Data From Existing External DB
Hello, I have been exploring NS and I would like to use it as a rudimentary transfer tool. I have an existing database table from where I would to transfer a record to subscribers and then possibly move the records out of that table. 1. How do I set up the ..\SubscriptionClasses\SubscriptionClass\EventRules\EventRule so that it reads from another database The TSQL Statement should probably work accross databases 2. As I scroll through the sample ADFs I would think that ..\Providers\HostedProvider should also change too to another type. Thank you very much, Lubomir Hi Lubomir - Using the SQL Server Event Provider, you can collec ...Show All
SQL Server XP_CMDSHELL -- Microsoft guidance on using/not using
Is there any guidance on using Xp_Cmdshell from the SSIS team at Microsoft We're needing to remotely execute SSIS packages on the server where MS SQL Server 2005 is installed. FYI, I've researched this heavily and know about the common ways--re: Using SQL Agent or the Microsoft.Dts.Runtime library in .NET with a web service etc. We are needing a strategy for LOTS of applications to use at this client. This is a large customer with many applications, constraints on security, deployment, and so on. The SQL Agent approach isn't a bad workaround, but it isn't something I'd want to see continue into pe ...Show All
Visual Basic ToolStripDropDownButton item.
Well i have a toolstrip1 at the top of my app, i then have a ToolStripDropDownButton1 on it which i have named menu On the menu there are a couple of catagorys: Most useful, less useful etc I want them to be able to there own programs to the catagorys, so i added a button when this button is clicked it brings up the openfiledialog, here is the code i used for that: Dim myStream As IO.Stream Dim openFileDialog1 As New OpenFileDialog() openFileDialog1.InitialDirectory = "c:\" openFileDialog1.Filter = "exe files (*.exe)|*.exe" openFileDialog1.FilterIndex = 2 openFileDialog1.RestoreDirectory = True If openFil ...Show All
Visual Studio 2008 (Pre-release) Use of OperationContext.Current for duplex
Hello In all the samples of duplex the callback is set using OperationContext.Current inside a method called by the remote application. However, this approach requires the client to initiate a call a method on the service before the service can use the callback to send messages to the client. How can I enabled the service to send messages to the client using the callback after the client connects, but BEFORE the client sends anything The transport connection is made usually when you call a method on the proxy. You can change that somewhat by doing the following: IClientChannel clientChan ...Show All
