Click here to Skip to main content
15,910,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

first I'll give overall structure of my entire code

C#
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....
}

//......
}



plz help I'm new to c#
Posted
Updated 13-May-11 11:48am
v3
Comments
Kim Togo 14-May-11 1:43am    
If you call method startserver() in side startserver() recursivelly. Then you will get stackoverflow exception.

We have to see what inside method startserver()

which part of the code gives your error. Explain more
 
Share this answer
 
method startserver()//which is recursivelly called server must continiously run

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900