|
How DataSet can be used in Client Server Application?
In my Client Server Application I had MSDE as a Server Side Database.
It has multiple clients in the same network as multiple instances of a Windows based client side applications which directly connected to the server side database(MSDE). In the client side application, it has a data entry form. In which we can scroll through records(next previous etc.) and can insert , delete, update records. For this purpose I use a DataSet in C# and when the form loads the data is retrieved from database to the dataset and for inserting, I use NewRow() method of DataSet and after inserting called the Update() method of DataAdapter. for deleting Delete()method of DataSet. In a single machine it works fine, When using the same application from multiple machines in the same network, any changes made in one machine should not be affeced in the other machine until the form is closed and reopened, because the dataset is populated at the form load event. I want to track the changes without closing. What is the best way for doing that in this kind of application ?. Can anybody give me the detailed idea of client server database application using C#?
Thanks in advance.
Cenray
|
|
|
|
|
so you had a big problem ,
i dont know you application but you can provide the form with a button for refreshing the data and get the latest changes from the database
in the button you can use fill function from the data adapter
otherwise if you want to get the changes in the real time you have to de the foolowing :
1- create function with c++ to open a TCP socket then send a string on this soket
2- compile this function to support an extended stored procedure for sql server
3- goto the sql server then add a reference to the dll which contain the function you had created
4- create a trigger on the table you want to monitor it on add or update and call that function to send an alert to all users of your application
5- in the application side you have to open a TCP socket listner for geting the alerts from the database
then you can refresh the dataset as well as you had an alert from the database
so chose one of that solutions
|
|
|
|
|
I'm writting C# code with web project, I want delele network share file, and try it
File.Delete(host\folder\filename) but it error :
[b]Logon failed
bad username and password to logon[/b]
somebody can help me to solve it
thanks
Nho'c Ti`
|
|
|
|
|
befor any thing you should use the following path :
\\computer_name\Directory\file_name
if you use that path and the error still appear you should test you permission to sccess the target computer then try it again cuz this message mean's that you don't have access permission to that folder or file in the target computer
you can make simple test try to delete it from the windows explorer
|
|
|
|
|
I can delete it form window explorer or use application project , but with webproject I can't delete it.
Login Failed
please help me!
Nho'c Ti`
|
|
|
|
|
somebodys can help me do that?
web project: why i'm try delete it but occur an error "access denied" so that folder i had shared with full control for everyone
thanks!!!
Nho'c Ti`
|
|
|
|
|
to solve this problem you have to stop the IIS service or remove the project from the IIS (Internet Information Service) then you can delete it whithout any error
|
|
|
|
|
|
Having considerable problems in storing and retreiving data from an Access memo field into a windows form richtext control. Have seached the web for a simple answer and so far haven't fount anything. Anyone have any insight to this problem? All help appreciated.
Thanks...
|
|
|
|
|
Is the memo field storing plain text? html-formatted text? rtf-formatted text?
|
|
|
|
|
Hi Mike,
I'm using richtext. I'm sure there's a way since I've done this in Delphi. I'm new to C# and just can't seem to figure it out.
Thanks,
Bob
|
|
|
|
|
Hi NG,
how can i browse the WMI Class schema on my local maschine. I would like to fill a tree view with WMI class types registered on my local machine.
i used the following code to get the namespaces:
ManagementClass nsClass = new ManagementClass(
parentNode.ManagementScope,
new ManagementPath("__namespace"),
null );
foreach(ManagementObject ns in nsClass.GetInstances()){}
the fetched namespaces are ok, but if i try to fetch the class types with
ManagementObjectSearcher searcher = new ManagementObjectSearcher(
parentNode.ManagementObject.Scope,
new WqlObjectQuery("select * from meta_class"),
null);
foreach (ManagementClass wmiClass in searcher.Get()){}
there are only __XXXX class types, the Win32_LogicalDisk for instance is missing. Seems like i read the wrong data
Any Idea what it needs to show the display names for each class like Win32_LogicalDisk etc.?
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
Jerry,
If I understand your question correctly, the code below will grab the class names for a given namespace. Note the use of the "deep" option to force a traversal of all the classes in the namespace, not just the top-level ones. Hope this helps.
Jerry
ManagementPath nsPath = new ManagementPath();
nsPath.NamespacePath = <whatever namespace="" you="" want="">;
ManagementClass nsMgmtClass = new ManagementClass(nsPath);
System.Management.EnumerationOptions enumOpts = new EnumerationOptions();
enumOpts.EnumerateDeep = true;
string clsName = "";
foreach (ManagementObject obj in nsMgmtClass.GetSubclasses(enumOpts)) {
clsName = obj.ToString();
CbxClassName.Items.Add(clsName);
}
|
|
|
|
|
Hi NG,
i try to load and save some configuration data at startup/shutdown in my vs.net 2003 addin.
But i can't create a IsolatedStorageFileStream. The exception message is
{"Unable to determine identity of assembly." }
If i run the UserControl which is nested in a ToolWindow standalone everything works fine.
Any Idea?
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
I am building a multi-threaded application with numerous amount of threads ---- The thing is for each thread it has to be a random name and I do not know howto to create and start random named threads ----
help is greatly appreciated Thanks
|
|
|
|
|
Threads = headache
Random threads = insane!
Theortically you could create a hashmap or similar, create a random string value for the key and an instance of the thread for the value.
That way you would have random names associated with the threads, plus you could still enumerate through the collection. Plus the collection could grow and shrink as necessary.
But please... dont
/**********************************
Paul Evans, Dorset, UK.
Personal Homepage "EnjoySoftware" @
http://www.enjoysoftware.co.uk/
**********************************/
|
|
|
|
|
Can one change printer orientation to landscape, using c# and no API?
I can't even get hands to default printer.
tia
|
|
|
|
|
|
You are not quite provide sufficient information for an answer.
For example, if you are using a Windows Form application, then are you using the PrintDialog control?? That gives you access to the printers and allows the user to define printing landscape.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
i am using Windows Forms application.
But i am printing a Crystal report from Crystal Viewer using its default toolbar button.
I set landscape orientation in Printing Options for the report. So, it is PRESENTED in landscape. But, when it is printed, its printed in default printer orientation.
So I need a way to change default orientation, print report, then change it back.
Sounds like "left hand to right ear", but can't see any other way.
|
|
|
|
|
I have a datagrid showing 200+ records, if user scrolls down to select a row that is off the initail screen, can I set the datagrid to show that part of data around the selected row to avoid user using scroll bar again and again.
Thanks,
|
|
|
|
|
If I understood well, you want to be able to scroll the DataGrid to a certain position.
DataGrid has some protected members that you can use to handle scrolling: VertScrollBar, HorizScrollBar, GridVScrolled, GridHScrolled.
For vertical scrolling I recommend you to do something like this:
public class MyDataGrid:DataGrid
{
public void ScrollToPos(int position)
{
ScrollEventArgs sea= new crollEventArgs(ScrollEventType.ThumbPosition,position);
this.GridVScrolled(this,sea);
}
}
Best Regards,
Daniel Zaharia
|
|
|
|
|
Thanks a lot, your method is working fine. I just put the row index as the position parameter.
Appreciate!!!
|
|
|
|
|
Do any know how to impliment adding a computer to domain using C#. I know you have to import System.Directory.Services.dll Can you please help
thanks
CJ
|
|
|
|
|
Try something like the following:
string domain = ...;
string newComputer = ...;
string groupName = ...;
DirectoryEntry deDomain = new DirectoryEntry("WinNT://" + domain);
DirectoryEntry deNewComputer = new DirectoryEntry("WinNT://" + domain + "/" + newComputer + ", computer");
DirectoryEntry deGrp = deDomain.Children.Find(groupName, "Group");
if (deGrp.Name != null)
deGrp.Invoke("Add", new Object[]{deNewComputer.Path.ToString()});
deGrp.CommitChanges();
|
|
|
|