|
Thank you this helped greatly.
Marty
|
|
|
|
|
Hi, i want to create an application that can be loaded into anyone computer.. But the database has to be consistent, so i was thinking of using my web server mysql database.
but how do i use the database from the application i created?
|
|
|
|
|
Use a webservice to communicate with the database and have some sort of authentication system for your client.
|
|
|
|
|
can give me some idea of what web service?
|
|
|
|
|
|
dont quite understand..
anyway can use mysql connection string? den replace localhost with my server ip?
|
|
|
|
|
check out this site[^] as it's the leader with connectionstrings, but yes that's pretty much it.
|
|
|
|
|
how do work program database in c# with sql server
|
|
|
|
|
Go buy a book on basics, a forum post can't nearly cover this topic.
|
|
|
|
|
|
Hi There,
Any code snippet in C# on how i can insert a string value in a ByteA column in PostGreSQL ?
Reagrds,
X
Yeee
|
|
|
|
|
in VB . a class can have constructor and funstion or sub. so how to create a function return a value in C# class ?
|
|
|
|
|
you lazy little *&^@!
use google[^]
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
musefan wrote: you lazy little *&^@!
lol! +5
|
|
|
|
|
Hi,
both subroutines and functions are called methods in C#; they may or may not return one value or reference, depending on the return type in the declaration. Same as in C, C++, Java, and a lot of other languages (except they often are called functions, with or without a return value).
I suggest you buy and study a tutorial on C# so you can reach structured and illustrated knowledge in minimal time.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Seriously, this is a C# 101 class question. Pickup a beginners book on C# and work through it. It'll answer just about all of your basic questions like this.
|
|
|
|
|
Epic fail. How can you be asking about events first and only after that want to return values? Obviously something is wrong here. I think you're some gold member who thinks it's funny to ask crazy questions on purpose. And if that's true, well, ok it would be funny I suppose.
|
|
|
|
|
I have searched high and low for an answer to this one. I'm sure someone has
run into a similar situation.
Basically, I set up a serial port with a ReadTimeout of 10 seconds; open it; send a "command"
character to a serially attached device and expect an answer within this period of time.
If data is received, the serialPort_DataReceived event handler fires and reads the data.
However, I want to be able to notify the operator of a problem, should the external
device not reply within 10 seconds. This could indicate the device is not attached or
not powered up.
Appreciate the help,
Steve.
|
|
|
|
|
thompsons wrote: I have searched high and low
Not high and low enough then. It took me 10 seconds to find this[^]
The SerialPort class provides a timeout mechanism on its Read methods. When the read timeout is exceeded, a TimeoutException gets thrown.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks for the reply. I also found that; it did not directly answer my question.
This implies that I need to make a call to serialPort.ReadLine() before any notification occurs in the case of a timeout. One of the reasons folks join these forums is because they want answers in plain English and not the somewhat vague documentation offered on MSDN.
Sorry I asked such a silly question that caused your sarcasm to manifest itself.
Regards,
Steven.
|
|
|
|
|
The quality of the question directly dictates the quality of the answer.
If you don't start a read operation, you're not going to get a notification that anything showed up. What if your code isn't ready to recieve yet, but there's pending data? That's why it works this way.
|
|
|
|
|
So you want to get an event because data that you did not request did not arrive in time?
That is not how Windows (or any other OS I am aware of) works. You can get an event when something unexpected happens (e.g. DataReceived, ErrorReceived) or you can get an Exception when something you did order did not succeed for some reason.
If you are not satisfied by the DataReceived events (and I can imagine several scenarios where it is insufficient), then you must create your own thread and have that perform synchronous read operations, with or without timeout.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
My normal way to do SerialPort uses an AutoResetEvent to do the timeout control. The general format is something like this:
dim port as SerialPort
dim ReceiveResponse as AutoResetEvent
Sub SendCommand(data() as Byte)
sendTries = 0
while sendTries <= MaxTries
sendTries += 1
port.Write(data)
if ReceiveResponse.Wait
'you got a response
else
'you didn't get a response in time
end if
end while
End Sub
sub PortDataReceivedHandler(sender as object, e as DataReceivedEventArgs)
if processIncomingData() then
ReceiveResponse.Set()
end
end sub
Obviously, this is missing a lot of actual code, but it should point you in the right direction.
|
|
|
|
|
I'm upgrading an app from 1.1 to 3.5, and my googlefu is failing to tell me anything about what was changed between the two classes except that it happened in 2.0.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
By my understanding, its appearances. MSDN says that there are additional features, but I can't find anything going into detail
|
|
|
|