|
My pleasure, glad I could help a bit
|
|
|
|
|
EgyptianRobot wrote: About saving two records at same time I follow the following
What business case drives your expectation that this is even possible?
What business case drives your expectation that if it did occur it would be a problem?
As an example, you have a customer screen and two users update the address field at the same time. Exactly what are the duties of the people who actually do these updates such that two of would be attempting to update the same customer at the same time? And if they did why would they be using different data?
|
|
|
|
|
I did not warn for concurrency problems on a business-case, but a technical reason. Why? Because it happens in practice; a manager "rectifying" an error in a record, while one of his worker is updating the same record. Whose values would the database be saving, and whose would be discarded?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Why? Because it happens in practice; a manager "rectifying" an error in a
record, while one of his worker is updating the same record.
Do you have a specific industry and specific type of record/field for that example?
Moreover what is the work flow? In a standard call center, which is the only one I can think of for that example, the worker is already on another case before the manager reviews the worker updates.
|
|
|
|
|
jschell wrote: Do you have a specific industry and specific type of record/field for that example?
Yes, multiple.
jschell wrote: Moreover what is the work flow? In a standard call center, which is the only one I can think of for that example, the worker is already on another case before the manager reviews the worker updates.
Not every software-shop take the time to analyze the workflow. Imagine a MDI-form with a huge switchboard made of Button s. Each button represents a table and opens a grid. 40 users, approx 120 tables. Administration-package, homes for the elderly. A single record might look like this;
PrimaryKey SetDataBits
123 101011110010101000100001000001100101010000001 Another example?
Same kind of "architecture" (I don't come up with them), a VB6 application that shows "Buttons" on the start-screen. Tables again, with grids. Their "workflow" consisted out of arrows drawn between the buttons. "First this table, then edit that table". Over 200 concurrent users. They discovered parameterized queries last year.
Another example?
Someone doing a MAX on a table, while another part of the computer does an insert. No, of course it ain't wrapped in a transaction. Which part of the app? Well, the logger of course
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Yes, multiple.
Then provide a specific example.
Eddy Vluggen wrote: A single record might look like this;
No.
First can you provide a REAL example? I have written code for a call center, a doctors office and many apps for telephony and financial centers and have never come up with a real business use
Second your example seems to demonstrate, at best, a poorly written app. And then you derive the need from that. What I asked for was a business case. A business case describes the needs of the business (not technology) that requires that two users of the application will be working on the same data at the same time.
Eddy Vluggen wrote: Someone doing a MAX on a table, while another part of the computer does an insert
I don't understand what that has to do with what I said. Obviously that isn't two updates but rather a write and a query. And one can in fact decide to do it without locking based on the needs of the query.
|
|
|
|
|
jschell wrote: First can you provide a REAL example? I have written code for a call center, a doctors office and many apps for telephony and financial centers and have never come up with a real business use
I cannot think of one. Good point.
jschell wrote: I don't understand what that has to do with what I said.
Providing an example, which, in retrospect, is unrelated to the subject.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Yeah, what Eddy said. Plus Grids are horrible anyway -- not very user-friendly.
|
|
|
|
|
usually I use grid to show data only, and above the grid I have insert,update,delete buttons.I guess now it's user friendly,Isn't that?
|
|
|
|
|
Better create a server which talks to the database. And all your clients connect to the server. Because all changes have to go thru the server now, the server can generate appropriate events.
|
|
|
|
|
may you give example or link to sample, I feel your solution will be the best...
thanks in advance....
Actually I don't know what do you mean by createing a server
modified 28-Aug-12 3:37am.
|
|
|
|
|
The "server" s another application running on a different computer (I recommend to use the same machine as with the SQL server). That applciation is often a Windows service, without any user interface.
The client applications connect to that server. You can use e.g. .Net Remoting, or more modern WCF.
When you start learning these things, they may look complicated, and it may take some time to get familiar with the concepts. But it's worth learning.
|
|
|
|
|
Eng Bernhard Hiller, I really appreciate your help and you really give me new solutions cause till now I have just two choices (timer which I dislike AND SqlDependecy).
what I understood from your post that Through WCF I will get notified when database changes occurred.Is that right big brother?.do you think it will be better than using SqlDependecy ?.
(actually i'm entirely new to WCF,I didn't use windows service before and I can't imagine how it will work)
thanks for your help and wish to get your suggestions and advises.
|
|
|
|
|
Dear frnds i need code for , How to upload videos and images with class
|
|
|
|
|
|
Please read the top message on this board ("How to ask a question") otherwise people will down-vote your question, I note this has already happened once. Asking for code like this is unlikely to get a response as we are pretty much all volunteers here. Everyone will assume you have tried nothing even if, in reality, you have spent hours figuring it out - we can't tell.
It is better to ask a specific question, outlining what you have tried to achieve, or, what the exact problem is you are having getting started.
|
|
|
|
|
shubahm saxena wrote: frnds
At least have the decency to spell something out. Text speak crap only irritates people. The look at the tip how to post a forum question as the other poster has mentioned.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
i have deployed a web project in IIS Express using the below coding.
Process process;
IISExpress(string args)
{
this.process = new Process();
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = @"C:\Program Files (x86)\IIS Express\iisexpress";
psi.Arguments = args;
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
process.StartInfo = psi;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.CreateNoWindow = true;
process.Start();
}
public static IISExpress Start(string args)
{
return new IISExpress(args);
}
After deployment of my project in IIS Express, i want to run the project in the browser using the link generated in IIS Express(say http://localhost:13356) using c# coding. i have tried the following code. but no use.
IISExpress sample = IISExpress.Start("/bindings.[protocol='http',bindingInformation='*:8063:localhost'] ");
How to run the samples in browser using IIS Express(in c# code only not by manually click the link in the system tray).
Also, i can able to run the samples in browser even after close the visual studio.
can any one help on this.
|
|
|
|
|
I've got an icon of application in a tray. I need to duplicate this icon context menu into taskbar application context menu (menu has type ContextMenuStrip). The only way I found is this:
protected override void WndProc(ref Message message)
{
const int WMessageRightClickTaskbar = 0x313;
if (message.Msg == WMessageRightClickTaskbar)
{
this.AdapterClientCtxtMenu.Show(Control.MousePosition);
}
base.WndProc(ref message);
}
This method doesn't work unfortunately. I run the application, it comes into WndProc, but message.Msg never takes the value of WMessageRightClickTaskbar = 0x313. I got to know, that 0x313 code is acceptable for windows not younger than xp. In vista and above it means shift+right click. Now the task is to find out the code for right click in taskbar menu for vista and above.
I need to get a modified menu, the similar as in the picture, using only .NET 2.0 environment.
|
|
|
|
|
hello , i think my qustion is very simple .
i have one Mdiparent and one childform or simple form . i have one button on the mdiparent form .
what do i need to do is that when im opening my form in my mdiparent i want the button come before the form (childform) .
i have used the sendtoback method but it's hiding the button instead of send it back to the form .
and to know what im using .
private void MDIParent1_Load(object sender, EventArgs e)
{
form1 form = new form1();
form.mdiparent = this;
form.show();
//
button1.sendtoback();
}
|
|
|
|
|
Because of the way forms work in general and MDI forms work in specific, this cannot be done. MDI Forms display MDI Child forms in what is called client area where other controls in the MDI Form cannot be shown.
|
|
|
|
|
so , do you have any other idea (related to my qustion) , but plz if you have another idea . just let the mdiparent be part of it .
any suggestion can help me . ty
|
|
|
|
|
mohammadkaab wrote: i want the button come before the form (childform)
In that case, the button should be ON the child-form.
mohammadkaab wrote: i have used the sendtoback method but it's hiding the button instead of send it back to the form .
SendToBack[^] works with the Z-order of the controls-collection of the form, not over "all" forms. You need to add the button to Form1 if you want it in front, or display it on another location where it is not obscured by Form1.
private void MDIParent1_Load(object sender, EventArgs e)
{
using (var formInstance = new form1())
{
formInstance.mdiparent = this;
formInstance.ShowDialog(this);
Button newButton = new Button() { Location = new Point(0,0) };
formInstance.Controls.Add(newButton);
}
}
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
im sorry , when im start my program i want to see this button on the mdiparent , not on the childform .
the childform has another controls. and it's not related to mdiparent.
this not the ans im looking for
|
|
|
|
|
mohammadkaab wrote: this not the ans im looking for
I cannot change the technology to fit your requirements.
mohammadkaab wrote: when im start my program i want to see this button on the mdiparent , not on the childform .
Then use a <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa511500.aspx">ToolBar</a>[<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa511500.aspx" target="_blank" title="New Window">^</a>] , or any other container - if you block it from sight by putting a Window over it, it simply will not be visible. This works the same for all WinForms-applications, and you'll find that the toolbar[^], the ribbon and the mainmenu are the most used solutions.
Take a few pieces of paper from the printer. Draw a button on one. The papers are your Windows. Put a paper over the drawn button. It works that way on a technical level - it's a physical limitation. Other applications work around it by showing their buttons at the top of the window.
The MainMenu is an antique way to attach possible actions to a Window. A ToolBar is an always-visible version thereof, and the Ribbon being the newest thing in town.
..or confuse your users by floating the button on top on a transparent form.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|