|
+5 for explaining
I are Troll
|
|
|
|
|
thak u for your help guys..it works good now
vemedya.com
|
|
|
|
|
It is because you are adding the seconds row parameters to the existing list or command parameters. Try creating your cmd instance inside of the for loop
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Why 2 bad answers?!?
The OP question only asks WHY it does not work - which I answer exactly. It does not say tell me the answer and give me a solution. Because that would be a HOW question
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
sometime i am getting a error when trying to generate report through crystal report and c#. but this error not occured everytime rather sometime it occured. please tell me anyone why this error occur and how to fix it.
the error is
--------------
Error Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Error System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.CrystalReports.Engine, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
at EOD_Schedular.frmMain.GenerateReport(Boolean ViewOnly)
at EOD_Schedular.frmMain.Generate(Boolean ViewOnly)
Method Name: GenerateReport
Line: 0
Column: 0
Sql: Not Found
thanks
tbhattacharjee
|
|
|
|
|
Putting the required DLL into GAC may solve this problem.
Just try for it.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Hi,
can someone please explain me what are the advantege and disadvantege of winforms vs. webforms.
When i rather to user one over the other.
Please assist...
10x.
|
|
|
|
|
treuveni wrote: can someone please explain me what are the advantege and disadvantege of winforms vs. webforms.
When i rather to user one over the other.
What a strange question I've ever seen.
If you are going for windows application then use WinForms and WebForms for web application.
That is not like when to use that is by choice of people Either they are devloping web or windows apps.
Usually people are using WebForms because they want to make people to see that from the M/C connected through network rather then installing WinApp on every PC.
Your question should be of WinApp vs WebApp.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Webforms: originated from the evolution of the web.
winforms: WinForms on the other hand originated from VB, MFC and other desktop environments.
If you use Winforms, you begin having a deployment problem. You either have
to have everyone update their machine everytime you update the application,
or you have to use ClickOnce. Depending on how complicated your application
and deployment scenario would be, clickonce may or may not be an option. You
will need to make sure your users have .NET 2.0 installed (clickonce can do
this for you, I believe). Because this is an internal application only and
will not be redistributed, it may be easier to implement this.
Regards,
Sathesh.
The best way to express one's gratitude to the Divine is to feel simply Happy..
|
|
|
|
|
Sathesh Sakthivel wrote: If you use Winforms, you begin having a deployment problem. You either have
to have everyone update their machine everytime you update the application,
or you have to use ClickOnce. Depending on how complicated your application
and deployment scenario would be, clickonce may or may not be an option. You
will need to make sure your users have .NET 2.0 installed (clickonce can do
this for you, I believe). Because this is an internal application only and
will not be redistributed, it may be easier to implement this.
THIS[^] would be enough rather then writing this much.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Hiren Solanki wrote: THIS[^] would be enough rather then writing this much.
Ah don't worry, he is a master in that.
..Go Green..
|
|
|
|
|
I've no problem with you quoting from other sources, but you do need to respect copyright law and provide a reference to the original material. Just a "Read more here..." link would be perfect, and extremely helpful.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Hi!!
Hello every one...
I wanted to know what should i do to keep on listening to multiple ports for msgs and displaying on respective text boxes.
i've tried asych sockets. but cant get it right..
it listens for only one time. if i start a while loop the whole app stops responding..
i hope threading is a answer but i know nothing abt it..
plz guide me..
|
|
|
|
|
Hi,
1.
the question is unclear. What ports? TCP/IP ports? SerialPort instances? ...
2.
regardless, you can handle that with either asynchronous methods and events, or by having some kind of thread and a blocking read.
3.
in any case, you can't touch GUI Controls from threads other than the main thread. So don't try myTextBox.Text="got something"; inside a DataReceived handler. The solution is here[^].
|
|
|
|
|
Ans 1. TCP/IP Ports...
Ans 2. How can i use Threading in GUI app??? i've textbox1 and textbox2. now i need to listen port port1 and port2 and direct the received msgs to their respective textboxes.
Ans 3. thanks for that.. i've studied it already.. that cross thread funcs..
|
|
|
|
|
ayandelhi wrote: How can i use Threading in GUI app???
threading is the same in all kinds of apps, whether GUI, Console, or headless. However to access Controls you need to Invoke.
|
|
|
|
|
I'm lost in it.. i cant see thru it.. when i type a msg in msg text box i shud start a thread which sends it to client n then waits until a msg is received from client. Right.. or something else..
One more thing...
how much time does it take a msg to get delivered from client to server on a lan of max 10 pcs.. i'm asking this coz i want active feed from my clients.. wheneva they type anything on their app it shud be displayed on my window...
|
|
|
|
|
ayandelhi wrote: I'm lost in it.. i cant see thru it.. when i type a msg in msg text box i shud start a thread which sends it to client n then waits until a msg is received from client. Right.. or something else..
I don't see a specific question here. if you are not familiar with the subject, read up on it, think about it, and experiment. when stuck, ask a specific question.
ayandelhi wrote: how much time does it take
42 msec.
how long is your message? how fast is your LAN? what other traffic is there? how inefficient is your code?
if you now some app that does things similar to what you want, then that proves it can be done; if not, it may be an indication it can't be done.
|
|
|
|
|
actually... m running both client n server on my pc.. n m typin on client and it shud be visible as it is.. m sending the text to a file too and to server too.. on file i've complete text but m not getting on the server side.. i want a live feed of wat is the user typing on client not the file.. help me out..
|
|
|
|
|
Luc Pattyn wrote: 42 msec
|
|
|
|
|
Hi I have two application which I have managed to get them to exchange data however, I would like to be able to sort the data out when it is recieved by the other end (server). On the client side, the data is taken from the various forms and sent as below:
String Pname = LblName.Text;
String Pdob = LblDOB.Text;
String PnhsNo = LblNHSno.Text;
String Paddress = RtxtBxAddre.Text;
String PmedicalCon = RtxtBxMedCon.Text;
String pcallOutDetails = RTxtBxCallOut.Text;
byte[] forwardMessage = Encoding.ASCII.GetBytes(Pname + Pdob + PnhsNo + Paddress + PmedicalCon + pcallOutDetails);
sock.Send(forwardMessage);
sock.Shutdown(SocketShutdown.Both);
sock.Close();
On the other end I would now like to take each item and display it in a form, so "Pname" is taken when received and displayed in a text box and then same with the rest of the data. Unlike displaying it in a message box like I have done below:
Socket listener = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
listener.Bind(new IPEndPoint(IPAddress.Any, 2112));
listener.Listen(10);
Socket socket = listener.Accept();
string receivedValue = string.Empty;
byte[] receivedBytes = new byte[1024];
int numBytes = socket.Receive(receivedBytes);
receivedValue = Encoding.ASCII.GetString(receivedBytes,0, numBytes);
MessageBox.Show(receivedValue);
listener.Close();
Help....
|
|
|
|
|
You need to put in a delimiter to split the elements at the receiving end. One way to do this would be to use an uncommon character when forming the string, which you can then parse out - don't use a comma just in cast it's present in the input data. I like to use \n in this situation because it's highly unlikely that this will ever be in the input data. Then you simply split the data out at the receiving end using this character sequence.
|
|
|
|
|
Tichaona J wrote: Encoding.ASCII.GetBytes(Pname + Pdob + PnhsNo + Paddress + PmedicalCon + pcallOutDetails);
you can't just concatenate some strings and get away with it, there is no way to separate them again. What if they represent numbers? is 12345 the result of 1 and 2345? or 12 and 345? or...
What you could do is this:
- define a little class that holds the variables (either as strings or, better, as their actual type);
- add [Serializable] attribute;
- make one instance and fill the values from the Form (or whatever your source of information is);
- use XmlSerialize class to turn that object into one XML string;
- transmit that string;
- use XmlSerialize class again to decode the XML string and recreate an instance of your object.
I have an example here[^].
|
|
|
|
|
Luc Pattyn wrote: you can't just concatenate some strings and get away with it
You would be surprised how many people do get away with it thou - running before walking that is, some even just skip both and try to swim - and CP is the bottom of the ocean (help to untie concrete boots - URGENTZ!!!)
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I have since tried to put the strings into an arraylist but question now is how do you convert the array list into bytes, cause this doesn't work:
patient.Add(Pname);
patient.Add(Pdob);
patient.Add(PnhsNo);
patient.Add(Paddress);
patient.Add(PmedicalCon);
patient.Add(pcallOutDetails);
byte[] forwardMessage = Encoding.ASCII.GetBytes(patient);
sock.Send(forwardMessage);
sock.Shutdown(SocketShutdown.Both);
sock.Close();
|
|
|
|