|what am trying to do is
i want to insert records into a sqlTable for that i created a method with 4 arguments in windows services class.
inside that method i wrote code to insert those 4 arguments.
i installed this windows service.
from another project i want to call this method
To insert records from a form i called that service like this
WindowsService1.Service1 winService = new WindowsService1.Service1();<br />
winService.insertValues(txtcustId.Text, txtcustName.Text, txtcustPhone.Text, txtcustAddress.Text);
here insertValues is my method inside windows service, where i wrote insert statement.
is this correct way?
when i tried to build it is giving below error
Error 2 The type 'System.ServiceProcess.ServiceBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceProcess, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. C:\Inetpub\wwwroot\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs 451 13 WindowsFormsApplication1<br />
modified on Monday, June 29, 2009 8:37 AM