I'm using Remoting with Configuration Files on the server and on the client. I've read that after RemotingServices.Configure(filename) I can use the new operator to get the remoted object from the server. But how does the compiler know to get the remoting object from the server and not simply creates a new object of the RemotableClass? RemotingServices.Configure("Client.config") RemotableClass rem = new RemotableClass(); Thanks.
STW
Posts
-
Remoting Configuration Files and the new Operator -
Designer - Components - Properties only visible in derived classesThanks for reply. Yes, right. I forgot to mention that I set [Browsable(true)] for the property. Is there anything else? Stefan
-
Designer - Components - Properties only visible in derived classesI've made an Interface IDataFactory with a property ISqlDbComponent{get;set;} a component with the interface IDataFactory: public class DataFactory : System.ComponentModel.Component, IDataFactory The property should be visible with [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] but isn't. When I derive a component from DataFactory, the property ISqlDbComponent IS visible. I don't understand why and which Designer Attribute I have to add to the property to make it visible in the first implementation and not only in derived classes. The property is implemented in the component "DataFactory" so why it isn't visible in the designer? Thanks a lot Stefan
-
Designer - TreeCollection of items which have themselves a collection like treenodecollection causes error when adding itemsThank you for your answer. I design the Collection in the Form-Designer, so Debugging is not possible. The problem is that I cannot see what the Designer wants to code because the designer tries to put code and cannot because the code would be wrong, so I can't see what the designer want to write. Thanks Stefan
-
Rags To RichesI nearly always make an interface for a class, because this keeps you thinking about what the class should do, rather than the implementation. Another advantage is that a class can be derived from multiple interfaces, so cunning class-hierachies are possible. Develop, develop, develop.... Books: Design Patterns for C#!!! Implement classes for Standard Things, Login, Database Access, Controls and implement them a common way, not specialized. Split your project into logical items: Login, MdiForm, Menu {ToolBar, Treemenu, MainMenu}, Reports, MainInfo, InfoLists, Searching, New and Edit, .... Parts {Bureau, Production, ...} and split it. Most people think in a one-dimensional way (a simple line) but most programming things are Multi-Dimensional Tree-Structures!!! and trees aren't so simple to keep in mind... You could also have a look at the Document-View Architecture in C++. There is shown how to split Data from the View of the Data. I don't use UML because I just not used my time to learn a UML-Programm but if you can, use it! Good luck! Stefan Werdenberg, www.adwise.ch
-
Designer - TreeCollection of items which have themselves a collection like treenodecollection causes error when adding itemsI'd like to store components in a TreeStructure and wanted to be able to design the TreeStructure within the designer. So I've made a Class Item which itself has a Collection ItemCollection (this is the same like TreeNode which has itself a TreeNodeCollection). This should work and it worked, but: As I add my items and the subitems and want to save with "OK" there is the following error: "Object not set to an instance of an Object" - this happens only, if I add Items to a level higher than two: Item1 SubItem (OK) SubItem (Error when saving) Item2 Item3 ... I do not know which Object is null. Can anyone help me with this problem? Thank a lot! Stefan
-
Update Stored Procedure throws Exception "Expects Parameter..."My Table "Adressen" has as PrimaryKey "adid". When I want to update the Adressen Table occurs an error: Procedure sp_AdressenUpdate expects parameter @Original_adid which was not supplied. This error occurs only if I edit a row and update, NOT when I add new Rows and update then. The parameter @Original_adid exists. I hope you can help me! Thanks Stefan
-
Global VariablesIs there a way to make Global Vaiables? Can I add them to the Application or ApplicationContext? Stefan
-
MDI Client Area ColorI'm sure you mean the client area of the MDI-Form. You have to use the Paint Event of the MDI-Form, get the rectangle of the Dark Grey Area and fill it with your Color. Stefan
-
TroubleShotting working with Data SetSo you make a View and then copy the sorted rows to another DataTable. Your solution is to create a new DataTable. Good luck Stefan
-
TroubleShotting working with Data Setpublic DataSet YourMethod(String Table, String Column or DataColumn dc) DataTable dt=DataSet.Tables[Table]; DataRow[] rows=dt.Select(strExpr, Sort, RowState) better: DataSet.Tables[Table].DefaultView.Sort="ColumnName DESC"; Perhaps you don't know that you can bind your DataGrid to a DataView, too! DataGrid.DataSource=DataSet[Table].DefaultView; If I did not understand your needs try to reexplain or use another language to tell me. German or French, perhaps?
-
TroubleShotting working with Data SetOmar, So please tell me what you want to do practically. I'm sure that you don't have to remove and re-add your table. Maybe I can help you. Stefan
-
TroubleShotting working with Data SetPlease tell me more about why do you remove and then re-add the table TableName. This can't make sense! Stefan
-
Primary Key as a Foreign KeyI didn't really understand right. Questions: 1. These 37 Tables do they all have the same Fields or what is different between them. 2. Do you store different Projects in different Tables? 3. Just show me the first 4 Fields of two Tables that I can understand. 4. What is the relation between the Tables? Database Design is more difficult than many people think. A good structure may help the developers. Please tell me more. Stefan
-
Updating Related Tables1. Did you call AcceptChanges somewhere? Don't call AcceptChanges before Adap.Update(). 2. Clear the EventHandler for RowUpdate. This may call AcceptChanges() 3. Try to edit a Row and immediatly afterwards check it's RowState. If the RowState is unchanged I don't know what's wrong. AcceptChanges is a tricky thing: after this call all Rows are marked unchanged! So there is nothing what could be Updated by the Update Method of Apt. Please inform me about Point 3. Stefan
-
Updating Related TablesPlease show your code which updates the Child Tables. Stefan
-
ReEdit Data freezes Controls; No Edition possibleI have Data in a typed DataSet and a Form to Edit it. First Time I edit the Data with the form everything works fine. But if I want to reedit the Data, as I first changes something by the form everything freezes, means that I can't change data in any Control on the form. Even the OK, Cancel Buttons doesn't work anymore. I have to exit by the Close Button of the Form. Any Ideas?
-
updating dataset through datagridNo, DataGrid.DataSource needs an object which can be a DataSet, Table, View, ...You can read this in the help. Yes, the DataGrid is "equal" to the Table. When you change Data in the Grid, the Table will change at once, too. Two questions: 1. When you make changes to the two lists you have, is the correct Data shown in the Grid? 2. When you Update the Tables, DataSet is the new data written to Sql-Server?
-
updating dataset through datagridNo, the DataSource Property of a DataGrid needs an object which can be DataSet, DataTable, DataView. So now I think now I understand your question. Yes, all changes made in a datagrid will change the underlying DataTable, View. When you then Update via an DataAdapter, the new data will be written to the Sql-Table. The DataGrid is synchronised with the Table, View. But now I'm not anymore sure if I understood your problems with the grid. 1. When you change your two lists is the correct Data shown in the DataGrid? 2. When you changed Data by writing in the DataGrid and update it, is the new Data written to the Sql-Server? If you answer the two question with Yes I don't understand the problem.
-
updating dataset through datagridI think that dataGrid1.SetDataBinding(dvm2, null); is wrong. try: dataGrid1.DataSource=dvm2; What method is FilterView?