Vasura's Q&A profile
Visual Studio 2008 (Pre-release) How to desing data manipulation services?
My question is not a new one. This problem appeared long ago about web services. Assume, that I have a WCF service to manipulate some data. I have the data layer as well, and a business logic layer with huge number of business objects in separated assembly. The business objects know some logic, so they have lot of methods impelmented about validation, manipulation and so on. I want to share these business objects with the clients allowing them to validate user input. I use the WCF service as a facade layer therefore the interface methods has the shared business objects as parameters or return values. I can use the business objects both at server and client side by adding a reference. When I want the client proxy to be generated the svcuti ...Show All
Internet Explorer Development ActiveX raising common dialog in IE 7.0 fails
Hi all, I am not certain if this is the right forum, if not please accept my apology and perhaps help me find the right forum. My question: I have written an ActiveX (digitally signed) using Visual Studio C++ 2003, that will, as it is embedded in a html page, appear with a nice dialog for the user. The user pushes a button and the ActiveX will attempt to display the File Open common dialog. This causes the infamous pop up blocked bar to appear on top of the ActiveX window. So far this is fine, accepted. But then, when I click the popup blocker to turn of the blocking, it actually states Pop up blocking is not enabled. So, there is no way I can get to display the dialog. This works like a champ with IE 6, so I assume ...Show All
Commerce Server Discount Problem
Hi, I have to apply one critical discount in Commerce Server. Summary is like this :: I want to apply the discount that is more benficiary to merchant Let's suppose we say that we created three order header discount Discount 1 : 20% (Order Subtotal 10000) Discount 2: 500 Amount off (Order Subtotal 10000) Discount 3: 20 % (Order Subtotal 10000) While Order will be placed we have to apply only that discount which is more benifecery to merchant Is it possible in the commerce server This does not help me. Max, I have two other questions Can be add new dictionary in the Context dictionary. If yes then how How can be cast the discount cache to use in custom component. Thanks ...Show All
Visual Studio Tools for Office How to access an email Internet Header?
My add-in uses Outlook.Interop, and I work with MailItem objects for mail messages a;; the time. BUT these objects do not expose the Internet (SMTP) headers of the message, nor many of the fields in the header. I noticed that System.Net.Mail.MailMessage has a Headers property, but I don't know how to cast or convert a MailItem to a MailMessage, or even if that is the best path. I have seen examples of accessing the MailItem.MAPIOBJECT property, but these examples use a MAPI namespace that I can't find in Vis Studio 2005 for C# and .NET. Does anyone know how to get at the underlying email message Where I can find the assemblies for working with the MAPIOBJECT Other ideas Thanks! -Allen Extended MAPI isn't supported ...Show All
SQL Server SSIS Data Flow: Connection Busy with results from another command
Hi, We have a SSIS package which has 4 parallel data flows and they share a common OLEDB connection. When executing the package I am encountering error "connection busy". As per my understanding this issue is related to inability of the OLEDB data sources to have multiple active result sets on a single connection. To fix this: If I set "MARS Connection" = TRUE on the connection property then the error goes not come and data flows complete. I am using Native SQL OLEDB provider. But, the strange part is: On my single proc laptop I am able to conistently reproduce the error. 1 of the 4 tasks (random) definately fails (until I set MARS = TRUE). But, on my colleagues laptop the 4 data flows do not fail and execute successfully. ...Show All
Visual Basic "The operation could not be completed. Access denied"
Hello people, I’m a really annoying issue with VS Express, and I can’t seem to find any way around it. If I load a project in VS and press F5, the build is successful and the program runs, but only ONE time! If run my program again, I get the following message: "The operation could not be completed. Access denied". However if I skip debugging by pressing CTRL+F5, everything works fine. If I restart VS, I can use F5 once again, but still only one time, then another restart is required. Below is the output from the build. To me it looks like the build process completes every time, and that it is the debugging that for some reason gives me this access denied. I earlier had an evaluation version of VS Pro, with the exa ...Show All
.NET Development How to use the generated dataset in webservices project?
Sorry for the novice question. I created the Webservices project and inside it I add the new dataset.xsd page. Next i design my dataset schema from my server dataconnection. I did samethings lot of times. But before with the winform project the dataset generator always created me authomatically the dataset class which I futher utilize in my code. But here in web service project I couldn't find how to start that dataset generator or how it starts or how to prompt it to start. Plz help me understand what is wrong ...Show All
SQL Server SQLDependency is very slow
I posted this in the .Net data access forum with no replies, so I'm trying it here and apologize for the cross-post. I'm researching using SQLCacheDependency in an application to keep caches up to date between applications. I could also use SQLDependency, just haven't tried that yet. I've tried a test where I read 1000 rows from a database, cache each one, and create the cache dependency. The dependencies work fine. My problem is that it is 100 times slower to read and create a dependency than it is to just read the row. At this rate, I need a 99% cache hit ratio just to make my caches break even! Is caching even worth it at this rate Why is it so slow Thanks very much for any insight. Here is the code: for (int i = 0; i < 1000; ...Show All
Windows Forms Binding custom collection to datagrid remove problems
Dear All. I've problems about Datagrid concurrency. I've implemented a custom collection (implementing IBindingList) that notifies changes to the datagrid that is binded to. In addition i've a button that in it's click event call a function that remove all the custom collection items but after a while the form closes throwing a StackOverflowException. Is it a winforms bug when pinting am i doing somethig wrong Help me please. Thank you. Of course: The code for the Custom collection: public abstract class CustomCollection : CollectionBase,ICloneable,IBindingList { public CustomCollection() { // // TODO: Add constructor logic here // } #region ...Show All
Visual C# merging multiple files into 1
Hi, I made an arraylist and put there 10 txt files. And i got 10 checkboxes. I want to bind the checkboxes (which are also in an array type of CheckBox) with the corresponding index of the arraylist. And after that i want to merge all the files into one file. This is the code: private CheckBox[] checkBox = new CheckBox[10]; public void Method() { ArrayList fileArray = new ArrayList(); string file1 = File.ReadAllText("file1.txt"); string file2 = File.ReadAllText("file2.txt"); string file3 = File.ReadAllText("file3.txt"); string file4 = File.ReadAllText("file4.txt"); string file5 = File.ReadAllText("file5.txt"); string file6 = File.ReadAllText("file6.txt"); string file7 = File.ReadA ...Show All
Smart Device Development Winsock and timeout under WM5
Hi everyone, My application connects to a server using GPRS. Since the application is running in the backgroung, I want to ensure that whenever the user presses the red key (stopping GPRS connection), the appli connects again. I could achieve that but the thing is that now, my server is asked to reply as late as possible (to minimize GPRS traffic). When a request is sent, the appli is waiting for an answer, if I press red button at that time, the application won't connect again. I again there is a failure in the timeout handling in the winsock. I use the command : setsockopt(this->m_iSocket , SOL_SOCKET , SO_RCVTIMEO , (char*)&iTimeOut , sizeof(int) ); to set the timeout, but it seems reading MSDN that SO_RCVTIMEOUT option is not i ...Show All
Visual C++ Why only static const integral data members can be initialized within the class
My code is like this: class HMatrixCompute { ... static const double _thresh = 1.5; }; It's wired that the data member initialization line is an error in term of Visual C++ 2005 Express. Why Leo The in-class case is really a declaration + an initialization expression. It is not a definition. I think that Visual C++ 2005 finally gets this correct - i.e. it gives a linker error (with /Za) on code like the following: struct X { static const int Answer = 42; }; void f(const int*) { } int main() { f(&X::Answer); } So the compiler needs to be able to use the constant as it - it can't wait until it sees the definition in order to generate it. The problem is that on some platf ...Show All
Visual Studio 2008 (Pre-release) How to use constructors or methods of data object with WCF service
I have some questions regading how to use of data object using WFC Service. For example I have an object called Student (see codes below), and property IsOver25 this is readOnly property. However, if I do not put set { ;}, it's won't compile . What I need to do here in order to get rid of set { ;} statement. Another problem is using contructors and methods of data object. Since we don't put [ServiceContract] on the data object, I could not use the override ToString() version of Student object on client side. So the question are: 1. What should I do in order to use the constructor of data object 2. What should I do in order to use the methods on data object ( will not many but somes) Regards, John dang using System; using Syste ...Show All
.NET Development You need to add XmlChoiceIdentifierAttribute to the 'EvalDate' member.
Hello, I am trying to make a custom XMLserializer for my class. wrote a simple writeXML method for my class and it works. My class has int members. However, when I add a member of type datetime, the writeXML doesn't work anymore! This is the sort of an error i get: System.InvalidOperationException: There was an error reflecting property 'datetime member'. ---> System.InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'datetime member' member. here is my code for writeXML: public void WriteXml(String filePath) { StreamWriter stWriter = null; XmlSerializer xmlSerializer; xmlSerializer = new XmlSerializer(this.GetType()); stWriter = new StreamWriter(filePath); System.Xml.Serialization.XmlSerializerNamespac ...Show All
Windows Forms Filling a column with Null in VSC# 2005 (Windows Application)
Hi, I'm trying to fill one of my columns with Null Value using the following code: MyDataSet.Tables[ "myTable" ].Rows[myTableBindingSource.Position][ "Column1" ] = DBNull .Value; this .Validate(); this .myTableBindingSource.EndEdit(); this .myTableTableAdapter.Update( this .MyDataSet. myTable ); But it doesn't work. Am I doing something wrong Thanks, Mathew Hi,Mathew1972 Have a look at my sample: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Samples { p ...Show All
