|
Hi
Yes it really helped me a lot. Thanks for your prompt reply bro.
I have voted 5 for your reply and that shows how much I am satisfied with ur reply. Tthanx buddy for excellent explaination.
And just for your knowledge XPO is one of ORM tool, which Mapps Objects to database. it creates db tables and relationships based on your classes and relationships betwn them. Relationships among classes, we can achive using Association and attributes, we just need to create classes and ORM tools creates database tables along with relationship/constraints for you and thats for any database.
So I have come to know that without any TPC we can create db independent application using strength of core .net.
one more thing, while implementing your code I came across IDataParameter also. Can you please update me what is that and whats difference betwn
IDbDataParameter and IDataParameter? is it a alternate of each other in discussed case?
Thanks
Niraj Parikh
|
|
|
|
|
wow that sounds interesting
then i missunderstood the actual question
uhm about that IdbDataParameter and IDataParameter.. IdbDataParameter has only 3 properties precision, scale and size and i'm not exactly sure what that one's for..
in my example it was a typo that i used that one.. i meant IDataParameter...
greets
|
|
|
|
|
Hello,
I have an application with two buttons. First one connects to a server, second one should read data. But compiler does not know the name "master".
How could I manage this?
Thank you and regards,
Jens
private void Connect(object sender, EventArgs e)
{
TcpClient client = new TcpClient("127.0.0.1", 502))
ModbusTcpMaster master = ModbusTcpMaster.CreateTcp(client);
}
private void Read(object sender, EventArgs e)
{
// read five input values
ushort startAddress = 100;
ushort numInputs = 5;
bool[] inputs = master.ReadInputs(startAddress, numInputs);
for (int i = 0; i < numInputs; i++)
Console.WriteLine("Input {0}={1}", startAddress + i, inputs[i] ? 1 : 0);
}
|
|
|
|
|
Hello Jens,
You have to declare your ModbusTcpMaster outside the method. (class lokal)
private ModbusTcpMaster master;
private void Connect(object sender, EventArgs e)
{
TcpClient client = new TcpClient("127.0.0.1", 502))
master = ModbusTcpMaster.CreateTcp(client);
}
private void Read(object sender, EventArgs e)
{
// read five input values
ushort startAddress = 100;
ushort numInputs = 5;
if(master!=null) //Allways do a != null check
{
bool[] inputs = master.ReadInputs(startAddress, numInputs);
for (int i = 0; i < numInputs; i++)
Console.WriteLine("Input {0}={1}", startAddress + i, inputs[i] ? 1 : 0);
}
}
All the best,
Martin
|
|
|
|
|
|
|
Hi All,
Greetings. I've to assign the enum value to a object property. Which shows the following error.
Cannot convert type 'string' to 'Common.Enumerations.OffDate'
searchUIO.OffDate = (OffDate)ddlOffDate.SelectedValue;<br />
in this (OffDate) is an enum. the drop down list will contain the values lastweek, lastmonth like that. so i have to assing the value to the lefthand site object.
thanks in advance
Regards
babu
|
|
|
|
|
Take a look at the static Enum.Parse method.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hello,
As enum is an int type, you could make the enum casting with the SelectedIndex method.
searchUIO.OffDate = (OffDate)ddlOffDate.SelectedIndex;
All the best,
Martin
|
|
|
|
|
Thank you for your response. But i need to take the text value from the dropdown list.how i can do that??? Could you tell me the solution.
regards
babu
|
|
|
|
|
Have you tried the solution "Stefan Troschütz" posted?
|
|
|
|
|
Can i make a program that get some text from user and convert it to a sound ?
how make that ?
thanks
|
|
|
|
|
There was an API in C++ for converting text to speech. It sounded terrible. There's nothing built in standard, that's for sure.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You need a Text To Speech interface.
Such an interface is provided by Microsoft free and is called SAPI (Speech API) but i think that it was going to be upgraded and change name. Sorry i haven't gotten around it since 2003.
Need to know stuff.
SAPI is something like DirectX. It's Microsoft attempt to provide a generic interface for each interface realted to Speech Applications. Theretically each provider would comply and make his engine SAPI compliant.
SAPI when i used it in C++ it was very harsh. Even harsher than DirectX and there is not a lot of development going on, to find easily help
SAPI comes with the speech engine of Office intergrated. This means that without the need of a powerfull engine you can run your tests.
I think SAPi was renamed to ATL.
|
|
|
|
|
Sarafian wrote: I think SAPi was renamed to ATL
This is definately wrong. ATL has nothing to do with speech.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My bad. I thought i remembered it correctly. I remember something that resembles it with 3 letters.
Anyway sorry for the misinformation
|
|
|
|
|
I found this.
SAPI[^]
For the needs of the original message there is this interesting part
Managed code Speech API
A managed code API is being developed by Microsoft which has similar functionality to SAPI 5 but will be more suitable to be used by managed code applications. The new API is part of .NET Framework 3.0 and will be available on Windows XP, Windows Server 2003 and Windows Vista.
The existing SAPI 5 API can also be used from managed code to a limited extent by creating COM Interop code (helper code designed to assist in accessing COM interfaces and classes). This works well in some scenarios however the new API should provide a more seamless experience equivalent to using any other managed code library.
|
|
|
|
|
Hi, I have an App with two windows forms. When I click a button on the main form it opens up the second form. How can I make it so only one instance of the second form can be opened at one time. As it is now a new instance of the second form opens every time i click the button. /thanks for an answer
|
|
|
|
|
Make the second form a member variable. As it's obvioulsy modeless, you should do that anyhow. Check if it's not null and visible before doing anything else in your click handler.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi, can you elaborate on your answer? A sample code perhaps?
|
|
|
|
|
I need to create a XML document from a schema dynamically without using any tool (XSD.exe). Kindly help.
|
|
|
|
|
Yogesh Choudhary wrote: without using any tool (XSD.exe).
In other words, you want to do it by hand ?
The thing to remember is, a schema defines more than one layout, how do you choose which of hte options a schema gives, you will follow ? Do you include all optional nodes? Nodes that can appear many times, how many of those do you put in ?
And, a schema gives you no idea of what is valid data to put inside the nodes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Well you can say that. My schema will remain the same but nodes can change so i need to that dynamically. What I have thought of is to convert schema to dataset and from that to XML document. Is this ok? Do you have any code snippet for this.
|
|
|
|
|
I don't have any snippets. Why do you need to do this ? A schema is for validating XML, not vice versa. It is of value only when the XML comes from somewhere else and you want to make sure it's valid.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I need to enter the values in that schema with the nodes and get an xml from that.
|
|
|
|