|
Thank you so much for helping me.
You mean like these codes:
_serialPort.Open();
_serialPort.ReadTimeout = 5000;
_serialPort.WriteLine("*cls");
But what about wiring? Is that enough to estanbish a "Null Modem" connection?
Sourie
|
|
|
|
|
Hi again,
I found this link. I think it could be helpful for me:
http://www.codeproect.com/KB/cs/serialcommunication.asp
Sourie
|
|
|
|
|
Hi again.
When you connect a peripheral to a PC, you typically need a straight cable with one
male and one female connector.
When you connect two PCs, you would need a null modem cable, which has two female
connectors.
There is nothing you can do about that in software, your cable must match the situation.
|
|
|
|
|
Thanks for your reply.
Actually I want to connect an AVR MCU to PC.
As I studied these days, I think I should make a NULL MODEM connection between AVR and Serial Port of PC (but by inserting a MAX232 chip). It means that RXD and TXD from PC should be connected to TXD and RXD of MCU and DTR of PC should be connected to its DSR and CD, also its RTS should be connected to CTS.
I think this wiring is enough and after that I should write a C# code for Pc and an assembly code for MCU to communicate to eachother.
Sourie
|
|
|
|
|
Hi,
yes, you need at least three wires:
GND to GND
RXD to TXD
TXD to RXD
you may want or need some of the control lines, depending on your application
and port settings. If so, they need to be cross-wired too.
|
|
|
|
|
Thanks alot
Sourie
|
|
|
|
|
Hi.. all i am writing a function that will return a dataset
i am writing the code as follows...
using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
namespace dat
{
class dataset
{
public DataSet getdatset(string a, string b, long c, long d)// with all these 4 input //parameter it ll return a output parameter so where shoud i defined it..ll it be after d..
{
}
};
}
T@SU
|
|
|
|
|
Hi,
I think it should be before the Form1Load_Click.
Mansureh Shahraki Moghaddam
|
|
|
|
|
This is kinda console application so need to load anyform... i guess...
vikas da
|
|
|
|
|
not sure if this is what you ment but
using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
namespace dat
{
class dataset
{
public DataSet getdatset(string a, string b, long c, long d)
{
DataSet d;
//Assign d and do whatever with it
return d;
}
}
}
|
|
|
|
|
i have created 400 threads that will act like a virtual comp request.... it just generates and request the web service... but i have found there are only 4-6 request per second... and now i want to increase the request more than 400 and see the scability of web service.. now i want to test the load of the web service.... and see the load of the web service per second... i want to do it without using load runner or any vs.net load test...
am i doing it in the right way...
|
|
|
|
|
|
In visual studio 2005, i have used a masked textbox control and set its mask property to phone number.
Also I am using a button to insert the phone number into the masked textbox(as shown in the code), but when i do so,
it inserts the number in the masked textbox from the end part not the beginning.
Code...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MaskedTextBox1.Text+="1"
End sub
How to insert the value in the masked textbox from the beginning like in a normal textbox?
Any ideas??
|
|
|
|
|
|
How to set every form's icon? Do we have to set it manually one by one? Thanks
|
|
|
|
|
Yes, I believe you need to set the icon of every individual form.
|
|
|
|
|
Yes.
|
|
|
|
|
hi.. may i know how to export sql data into excel sheet organized nicely ?
|
|
|
|
|
Hi,
You can use an example such as this then just use the data you export form the SQL server via SQLClient class.
Mark.
|
|
|
|
|
hi..
if i have the query like this.. select * from contact..
how do i link to these code ( * the belows code are hardcoded.. ***)which i want to change
string[,] saNames = new string[5, 2];<br />
<br />
saNames[0, 0] = "John";<br />
saNames[0, 1] = "Smith";<br />
saNames[1, 0] = "Tom";<br />
saNames[1, 1] = "Brown";<br />
saNames[2, 0] = "Sue";<br />
saNames[2, 1] = "Thomas";<br />
saNames[3, 0] = "Jane";<br />
saNames[3, 1] = "Jones";<br />
saNames[4, 0] = "Adam";<br />
saNames[4, 1] = "Johnson";
|
|
|
|
|
Have a read of this article. It explains simply, and step by step, how to insert and read data from a SQL server. Its the one I used when I was figuring it out.
Cheers,
Mark.
|
|
|
|
|
cmd.Connection = con;
cmd.CommandText = "select * from contact";
da.SelectCommand = cmd;
DataTable dtable = new DataTable();
DataSet ds2 = new DataSet();
da.Fill(ds2);
dtable = ds2.Tables[0];
// Create an array to multiple values at once.
string[,] saNames = new string[5, 2];
saNames[0, 0] = dtable.Rows[0].ItemArray[1].ToString();
saNames[0, 1] = dtable.Rows[0].ItemArray[2].ToString();
saNames[1, 0] = dtable.Rows[0].ItemArray[3].ToString();
saNames[1, 1] = dtable.Rows[0].ItemArray[4].ToString();
saNames[2, 0] = dtable.Rows[0].ItemArray[5].ToString();
saNames[2, 1] = dtable.Rows[0].ItemArray[6].ToString();
saNames[3, 0] = dtable.Rows[0].ItemArray[7].ToString();
saNames[3, 1] = dtable.Rows[0].ItemArray[8].ToString();
saNames[4, 0] = dtable.Rows[0].ItemArray[9].ToString();
saNames[4, 1] = dtable.Rows[0].ItemArray[10].ToString();
the above is based on one row data..
how if my database has many rows of data ??
i want to put a while loop there.
also the saNames[0, 0] ..saNames[4, 1].. data which exported arrange weird.. not fooolow the sequence..
modified on Monday, January 07, 2008 11:34:08 PM
|
|
|
|
|
How is it possible to clear the cookies a webbrowser component set?
|
|
|
|
|
Hi,
on WinXP cookies are regular files located in a folder such as
C:\Documents and Settings\MyName\Cookies\
To get the path of that folder, use
Environment.GetFolderPath(Environment.SpecialFolder.Cookies)
|
|
|
|
|
So I have to do it via the file system. I had hoped there would be an easier way because every Windows version stores them in a different directory.
|
|
|
|