创建对象时,套接字服务器程序会生成stck溢出异常
问题描述:
hi
首先,我将给出整个代码的总体结构
hi
first I''ll give overall structure of my entire code
namespace FTServerCode
{
public partial class SERVER : Form
{
match(string string)
{
}
//here on this form my oledbadapter is place
}
class ftsev
{
method startserver()//which is recursivelly called server must continiously run
{
//here a socket which is listening to a port continiously
//and after receiving data i want to check that data in a Microsoft access table using
//the oledbadapter and dataset
//but the problem is how can i access olebadapter's object here to execute query like
this.oleDbDataAdapter1.SelectCommand.CommandText =
"SELECT Vm_ip FROM UserDB WHERE Usrnm=" + "'" + usrnm +"'";
dataSet11.Clear();
this.oleDbDataAdapter1.Fill(this.dataSet11.Tables["UserDB"]);
// here in ftsev class....is there any way to do so....
}
//......
}
请帮助我是c#
plz help I''m new to c#
答
的新手,代码的哪一部分会给您带来错误.解释更多
which part of the code gives your error. Explain more
method startserver()//which is recursivelly called server must continiously run
这是不明智的,startserver()
应该仅被调用一次.实际的服务器代码应包括一些无需工作的睡眠/等待方法.
That is not sensible, startserver()
should be called only once. The actual server code should include some method of sleeping/waiting when there is no work to do.