Kees_de_Waard's Q&A profile
Visual C# Throw Exception gets unhandled error
I am creating a multi-layered application using dlls' and want to throw any exception that occurs (and also create my own exceptions to throw) back to the originating code. When I try this though I get an error that the exception is unhandled. I am trying to handle it by just throwing it. This occurs at the first throw which is in class a catch clause. The following dll deals with database access. The code snippet is : class a{ public object ExecuteScalar( QueryBuilder QB){ object res = "" ; try { string sql = BuildSQL(QB); // connect to the database and run the query SqlCommand cmd = new SqlCommand (sql, DBConnections .SQLConn); DBConnections .SQLConn.Open(); res = cmd.ExecuteS ...Show All
.NET Development Error on using multiple data reader
Dear All, I have a multiple number of reading done so for the first one I have actually done the reading and close the the reader. Then upon reading the second one I also have close the datareader. But when I run my third reader is gives me this error "There is already an open DataReader accosicated with this Connection which must be closed first.". I have even check using the method IsClosed for the first and second and both shows that is true. What is the possible error. I dont think so that I must open and close my connection always rite. Thanks for your kind replies The simplest solution is that You can load the results of Select query in a DataSet and close the connection associat ...Show All
SQL Server Grouping problem
I am working on a report for a small POS. The report should allow the user to choose the time interval to group sales records, e.g. 1 hour, 2 hours or 4 hours. I believe I can setup this by the DiscretizationMethod and DiscretizationBucketCount of the Hour attribute in my DimTime dimension. However, the problem that I am facing is this POS will support multiple branches. Each branch will have their particular opening and closing hour. So, how can I group all the transaction into groups, said "Before Shop Open" and "After Shop Closed" This sounds strange but will happen quite often as overtime work is always expected in my living place. If this is infeasible, is there any workaround I think the business user certainly want to know how many ...Show All
Smart Device Development Dll Import from Regular C++ to C#
Hello, I am developing a smart device application in VS.NET 2003 and want to import dll from C++ program. [DllImport("mydllimportTest.dll")] public static extern int GetInt(); While the import command works fine with normal windows application project, the following error is generated in smart device application. "An unhandled exception of type 'System.MissingMethodException' occurred in.." Can you please help me out Thanks Tijnars Hello, I installed vs.net 2005 and still at the same point. With VS.NET 2005, the error message is more descriptive. " COM object with CLSID '{2AF1578B-3628-49E8-B0FF-6C86A41C8F8A}' cannot be created due to the fo ...Show All
Windows Forms Concurrency violation at update
Hi I had a working vs 2003 application with access backend. I added a couple fields in a table in access db and then to allow user to have access to these fields via app I did the following; 1. Regenerated the data adapter sqls by running the data adapter wizard and pasting the resulting code into my app. 2. Deleted the data adapter correspond to the relevant access table from the dataset and re-dragged the table to dataset to have the new fields included in the resulting data adapter. 3. Used below code to bind the windows form field to the underlying table field; db = New System.Windows.Forms.Binding("Text", ds, "tblClients.MyField") txtMyField.DataBindings.Add(db) Now when I run the app I can view t ...Show All
Visual C# What is the maximum literal address for a local file?
I thort it was 255 but when tried I found it only == 248 CHAR full LITERAL filename & path string length!!! How do I determine what the user can enter before submitting it to the OS as the intended filename Actually NTFS allows path names with a length of up to 32K but the underlying API's are limited to path names of a length of 260 bytes. As mentioned before there are some Unicode versions of API functions that allow 32K path lengths. However when you use these API's you have no guarantee that the shell can handle these files... ...Show All
Visual Studio Express Editions How can I insert my program to the msconfig startup list?
Hi, I want that the user will run my program ones and then the program will run automatically when the user is turn on the computer. How can I force that my program will start before other program that in the list(when the computer start) If I can run my program automatically only 1 restart Best Regards, Yaniv Pinhas Yup, the task scheduler is really useful: that's how I start off my backups (never found a better backup mechanism other than good old XCOPY). ...Show All
Visual Basic Where the my.settings is stored
The question is about my.settings in vb2005 Ive read in a book that when user scoped settings are stored, they are saved in the documents and settings folder for the user who is logged on to windows. But then i cant make settings that are available for every user. If i instead use application scope, its stored in programs folder (wich i would like it to do) but then i cant save the settings from my application in runtime. I would like the settings to be stored in the programs folder so that no mather who is logged on its the same settings, but you can still edit the settings in the program and save them. Anyway around this If your intending to use clickonce as you deployment technology and thi ...Show All
Visual Studio Express Editions how to make oledb connection
I am new to database program in mfc(vc++6.0). I want to to make oledb connection to store data in msaccess database but i dont know where to start (1) How to make oledb connection . (2)i have created table t_quote in odl.mdb (3)how to use this table in program to enter data. can anybody help me to do this. I have read so many of tutoriel but I think more study more confusion.Sorry for this but pls if naybody can help me atleast to get start.Or you can suggest me some direct source link code for this Thank you ...Show All
Visual Basic Sending emails with Lotus Notes
Hello, Does anyone have experience in using (e.g. sending emails with) Lotus Notes (6.x) A solution direct from IBM's site http://www-1.ibm.com/support/docview.wss uid=swg21178583 Shows how to send Lotus Notes mail messages with Microsoft Visual Basic ...Show All
Visual Studio Team System Parameters in Report Server
Hello. everyone! I have this error when I run my report from the browser or from the report manager. An error has occurred during report processing. Query execution failed for data set 'DataSet6_generar'. For more information about this error navigate to the report server on the local server machine, or enable remote errors I already check in the local server machine, and apparently the error is because it doesn't identify the parameters that I defined in the ObjectDataSource of the reportviewer. this is the error of the reportserver on the local server machine: An error has occurred during report processing. (rsProcessingAborted) Get Online Help Query execution failed for data set 'DataSet6_gene ...Show All
Gadgets Submission - what's the second file? Rejection reason?
Two things about gadget submission. 1. When you submit a gadget you get two fields for files. The first is for a thumbnail, but the second one requires a ZIP file and it doesn't say what the ZIP is supposed to contain (at least in FF). So wht should it be 2. I just submitted a WebGadget and it was rejected, sadly I didn't get any info as to why it was rejected so if somebody could get back to me on that I'd really appreciate it, since I can't fix things without any info. (It's definately not an IP problem, I wrote the game myself). Here's the gadget url: http://tapper-ware.net/patience/live/patience.xml And my website: http://www.tapper-ware.net/ The "second file" is a zip of your gadget, with t ...Show All
.NET Development Web Services & Partial Encryption
i am developing a set of web service methods which return reporting data. ideally i do not want to use HTTPS due to the extra performance hit. what would be ideal is to encrypt only that data which is sensitive. for example, 1 particular report has 12 columns of data. but only 1 column of data really needs to be encrypted over the wire (the client name). at the moment my web service method returns a dataset. although i can change this, if it is easier to implement partial encryption by returning a different type. please could anyone advise if it is possible to perform partial encryption in .NET2.0 like this if so i would be grateful for any advice, URLS, etc. to get me off on the right foot. thanks ...Show All
Visual Studio Deploying Crystal Reports in a Server - I need help ( VS 2005 was used )
Hello: Managed to develop a report in VS 2005 and it works fine. The next question is how do we move the web site to some server that does not have Crystal Reports The following site gives you a good idea: ( works well fro VS 2003 ) but not for VS 2005 Anyone of you out there who had success with deployment Sorry ! Forgot to include the site. h ttp://aspalliance.com/672_Deploying_a_Crystal_Reports_Application_to_a_Remote_Server ...Show All
Visual C# Create Derived instance of Base instance
Hello, I was wondering if it is possible to have a base class and create a new reference to it which is a derived class. Here is a little example of what i mean: class Program { static void Main( string [] args) { BaseClass b = new BaseClass (); b.num = 5; DerivedClass d = new DerivedClass (b,true); Console .WriteLine( "derived :" + d.num); //The output is: derived: 5 b.num = 6; Console .WriteLine( "derived :" + d.num); //The output should be: derived: 6 Console .ReadLine(); } } class BaseClass { public int num = 0; } class DerivedClass : BaseClass { public DerivedClass( BaseClass bClass, bool access) { if (access == true) { ...Show All
