创建对象时,套接字服务器程序会生成stck溢出异常 [英] a socket server program genrates stck overflow exception while creating an object
本文介绍了创建对象时,套接字服务器程序会生成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.
这篇关于创建对象时,套接字服务器程序会生成stck溢出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文