|
Yes this is actually application requirement and not just data duplication.
|
|
|
|
|
My post will assume that clients and server are under the same domain/firewall.
If that's not the case, please ignore it.
OK, so it most definitely depends.
IF there are lots of clients(100+) and lots of Hits to SQL Server(or whatever) like a Tracing Application(LOts, batchs, labels...):
I would go for a replication solution. A local DB on each client(SQL express or ...) the sql server and a socket based communication
between clients and server. Every 10 minutes or so the local machine would send the commands to the Soket server and in turn
the "socket server" would run some batch inserts on the sql server sending back to the client the result(succes or failure).
You'll also need to set up a Replication app/UI.
It's a complex solution but for let's say 100+ clients each sending a insert every 10-20 seconds it's better then opening a connection each time.
ELSE a direct ADO.Net solution I think would be best.
All the best,
Dan
|
|
|
|
|
- This application is definitely on the same domain (most probably on LAN).
- Number of clients will be no more than 5.
MDL=>Moshu wrote:
ELSE a direct ADO.Net solution I think would be best.
On the above info, can I say that you are inclined to direct access to sql server (remotely), on machine 1?
|
|
|
|
|
Hold On.
What I understood(wrongly) is that machine 2 is server the rest are clients.
Does machine one needs to send data to server and server also needs to send data to machine 1(clients)?
If machine 2 needs to send data to machine one too then:
I would opt for a simple socket architecture to send data from machine 2(server) to machine 1(clients)
and regular ADO.Net for the other way around.
I misunderstood your requirements. My bad.
All the best,
Dan
|
|
|
|
|
What you understood wrongly (by your perception) is actually right.
Machine 2 is server and it will not send data (of any sort) back to machine 1. It will just get the data and store it in the sql server. Machine 1 (the client) is going to send this data.
I hope im not confusing you.
|
|
|
|
|
No, not at all.
Then ado.net.
No remote needed.
String con = "connstring for machine 2";
....
And just send data from client to server using standard insterts/queries statements.
All the best,
Dan
|
|
|
|
|
thnx for your valuable input
|
|
|
|
|
glad I could help
All the best,
Dan
|
|
|
|
|
overloaded Name wrote: This application is definitely on the same domain (most probably on LAN). -
Number of clients will be no more than 5.
Oh... then who cares? pretty much anything can handle 5 clients. I'm surprised you got jerky refreshes with a polling implementation with only 5 clients.
|
|
|
|
|
i would go for remote access for the sake of simplicity if you re not transfering any huge data.
Δημιουργία websites, web εφαρμογών και εφαρμογών ηλεκτρονικού υπολογιστή. http://www.remiakstudio.gr
|
|
|
|
|
I am doing some project which has interactions with an existing excel file. i have successfully connected with the excel file and i have already retrieved data from it to a DataGridview. But i am having one big problem. when the data from the excel sheet is displayed on the DataGridView, the format is changed and it is just a scrambled data.... i can only see the perfect tabular data if it is with out merged cells,charts or pictures.
can anyone help me how to import data from the excel sheet to the DataGridView with the same look as it is in the Excel sheet?.... Thank u in advance!
|
|
|
|
|
The DataGridView doesn't support anything other than cellular data. So what you're asking is impossible.
If you want a fully functioning Excel, why not just embed Excel?
|
|
|
|
|
Thanks for the quick reply BobJanova!
Ok, but besides importing charts or pictures, I just want to import cell formats of the excel sheet. as i said yesterday, most of the cells in the excel sheets are merged to make the data organized in some structure. so while i import it to the DataGridView with out any other pictures or charts, it does not have the same look as it is in the excel sheet. any suggestion please? and if datagridview doesn't allow the pictures thing what else shall i use other than the datagridview? Thank u again!
|
|
|
|
|
JoeManche wrote: what else shall i use other than the datagridview? Bob Janova's answer nailed it for you; the only other alternative would be to pay big buck$ for a 3rd. party .NET control that can duplicate all of Excel's (innumerable ?) presentation options ... and good luck with that !
best, Bill
"The first principle is that you must not fool yourself, and you are the easiest person to fool." Richard Feynman
|
|
|
|
|
Is there anyway to create a executable file that support mac ?
I know there are few third party softwares that can help running exe files on mac. But is there any direct way?
Thanks
|
|
|
|
|
Do you count Mono? That's the only way to get C#/.Net applications to run on Unix variants (which includes Mac OS).
|
|
|
|
|
|
mono though does not cover all the things that .net does. So bare in mind you might have to do some things on your own whereas at .net its already been done.
Δημιουργία websites, web εφαρμογών και εφαρμογών ηλεκτρονικού υπολογιστή. http://www.remiakstudio.gr
|
|
|
|
|
Mono covers pretty much anything you'd actually want to use. (See here[^].) The only major omissions are WPF and Entity Framework.
|
|
|
|
|
hi
i have this code:
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.Value != null)
{
string l_value = e.Value.ToString();
char[] l_array = l_value.ToCharArray();
Array.Reverse(l_array);
e.Value = new string(l_array);
}
}
it reverse all of the datagridview
i need only column 2 that be reverse
how to change this code ?
thanks in advance
|
|
|
|
|
This because you are doing it in a function that would be called for every cell and hence the reversal on all values for all columns
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
Hi,
I want to display(on a Form) a 32bit bitmap with Alpha channel transparency, so thet the transparency is honoured.
I have tried a Picture control but it ignores the Alpha channel.
Any ideas?
Thanks - John
“If I had asked people what they wanted, they would have said faster horses.”
― Henry Ford
|
|
|
|
|
What format is the image? As far as I'm aware a bitmap doesn't support the alpha channel in Windows, but you would rather manage it using a chroma key (that's where you choose one colour as being transparent). If it is a bitmap, then you might want to try out the code sample here[^]
If you are using a PNG (for instance), then just set the appropriate PixelFormat , i.e. PixelFormat.Format32bppArgb;
|
|
|
|
|
|