|
How can I save DLL file to database and download DLL file from database in C#.
I want to save DLL file binary format in database.
Note: I use MS SQL Server 2008.
Thanks...
|
|
|
|
|
Keep it in a varbinary(max) column. BTW, keeping a DLL file in database seems to weird.
Best wishes,
Navaneeth
|
|
|
|
|
|
Hi All,
When I set the ReceiveTimeOut of Socket to some milliseconds then Socket throws the timeout Exception while the period expires and the problem is that then Socket is disconnected therefore i am unable to send and receive again with this socket.
I want that it waites for sometime for receiving but after elapsing the time,it should not be disconnected so that i can use it again n again..
Plz help...Its urgent.
Best Regards,
Lalit Narayan
|
|
|
|
|
From MSDN:
The ReceiveTimeout property determines the amount of time that the Read method will block until it is able to receive data. This time is measured in milliseconds. If the time-out expires before Read successfully completes, TcpClient throws a IOException. There is no time-out by default.
Read more here[^].
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
But when the socket throws exception ,socket is disconnected...this creates the problem 4 me,plz give the solution so that the socket should not be disconnected.
Best Regards,
Lalit Narayan
|
|
|
|
|
I think that is what happens when the time-out period is exceeded, the Receive method will throw a SocketException. Have you tried catching the exception, checking whether the socket is still connected (see here[^]), if not try to reconnect...
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi,
Actually i am working on Server Side,the connection requests comes from the Client Side,i can not reconnect to the Client through Socket....
The Server has TCP Listener on its own side,that waits for the Connection Request from the Client and make the Socket after Accepts the request.
Best Regards,
Lalit Narayan
|
|
|
|
|
As far as my understanding of TCP/IP clients and server(s) goes; it is the client initiates the connection. So, if the client disconnect in any way from the server, when it is the clients 'responsibility' to reconnect to the server.
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi,
The Client Side Code is written in C at Embeded Side n it takes some time to show the status "Disconnected" this creates the problem 4 me,they find the state of Socket "Connected" while it is disconnected at Server Side...
Plz do the needful.
Thanks and Regards,
Lalit Narayam
|
|
|
|
|
|
Well, I think you can't do that.
Imagine the situation:
Server starts reading.
Client starts sending. But, for some reason, the connection is VERY slow.
Server then receives the time-out (imagine it does not disconnect).
The server then asks for more data... but, the client is still sending the old-data. So, the server must now wait for what? The old data? The new data? How will it differentiate one data from the other?
I think the fact the connection is closed is on purpose. If you want, I think you may NOT use the ReceiveTimeOut. Instead, create another thread to call "abort" in the reading thread if it takes too long, so the connection will not be aborted, but I don't really know what will happen with the data in this case.
Also, depending on your requirements, it's possible to use UDP to receive the data.
|
|
|
|
|
is it a problem of my compiler?
if(((1*1*1)+(64*64*64))==(1*1*1))
printf("my name");
the printf()is printing "my name".
|
|
|
|
|
What compiler are you using? I tried with GCC and MSVC. printf is not executing in both places.
BTW, you are on a wrong forum.
Best wishes,
Navaneeth
|
|
|
|
|
this does not look like C# code (printf is a C function); if your environment is using 16-bit arithmetic, then 64*64*64 would overflow as it equals 2^18
|
|
|
|
|
I had a similar thought. But will it error out when overflow happens?
Best wishes,
Navaneeth
|
|
|
|
|
This needs to be in the c++ message board, assuming you haven't implmented printf yourself.
I replaced printf("my name") with Console.Out("my name") , and the code worked as expected, its unlikely that the compiler is wrong. Also the code is pretty unreadable, those nested brackets should be factored out.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
Hi Friends..!
After Deployment of the Application in client system I need to Open an new Microsoft Powerpoint 2007 ..!
How can I achieve it?
Please Help..!
Thank You..!
modified on Wednesday, December 9, 2009 5:24 AM
|
|
|
|
|
Hi everyone!
I have a MDI app. In parent form, there is a MainMenu that includes MenuItems: (File, Window, Layout). Child form also has a MainMenu including MenuItem(s): (View, Effective). When running app, parent form appears and has menu (File, Window, Layout). Then when opening a child form, I want to insert its menu (View, Effective) and program's menu becomes: (File, View ,Effective, Window, Layout)(Please notice to order!). I use MenuItem and MainMenu class with MergeType, MergeOrder properties not MenuStrip. Please help me! Thank you so much!
|
|
|
|
|
hi,
when i connect to sql server give error
Error is
"Cannot open database "PENTIUMD" requested by the login. The login failed.
Login failed for user 'sa'."
i am using blow code
SqlConnection con = new SqlConnection("Data Source=(local); Initial Catalog =PENTIUMD;User ID=sa;Password=java;");
servername=pentiumd
user=sa
password=java
thanks in advance
mjawadkhatri
|
|
|
|
|
And is "pentiumd" your local machine where you run your code?
What if you change the <cdoe>Data Source=(local) to the actual IP-address?
|
|
|
|
|
(1) Check either SQL Login is enabled or not?
(2) Use the Instance name instead of (local) and check the enabled protocols for the same.
|
|
|
|
|
I want a notifier in the system tray for my c# console application.
When I will start my console application it should should notify me and will stay in the system tray. That means in the task bar like antivirus, DAP etc).
I can create it for windows application. But I need help to do it for console application...
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:56am.
|
|
|
|
|