On the client system, you point your code to a url of webservice which you
will write the code for. When that call executes, the webservice springs
into action to presumably get data from the database. What it does with the
data after that is totally up to you. It really doesn't matter if the client
is running script or not because the webservice is callable from script or a
full blown application running on the client.
you build your webservice as a function call with an attribute [webmethod]
prepended to the function signature. Consider
[WebMethod] string getData(string)
{
//connect to database and get data
return stringdata;
}
your webservice runs on the server with access to the database. the
webservice is callable thru a url. Typically when you want data, from the
client you would make a call into the webservice and get the data back as a
string in this case. inside getData you can spawn word with the data you get
back by calling into the ProcessInfo class, or you can push the data back to
the client. Basically, your webservice is acting like a data delivery tier.
There are a myriad example on the web to building a webservice. Infact,
visual studio has a webservice already built in and commented out. If you
uncomment the code it will work.
I like the webservice example because it forms a tier and it can be called
by any application, which is good for scalability if you decide to expand
this program later on.
you can spawn an application from your webservice using this code:
ProcessStartInfo psi = new ProcessStartInfo("notepad.exe");
psi.WindowStyle = ProcessWindowStyle.Hidden;
Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(MyExited);
p.StartInfo = psi;
p.Start();
..... do stuff ...
I hope i've been on track with what you want to do. if not feel free to yell
at me.
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Alvin Bruney said:
A couple of choices present themselves. I'd stick with a webservice chiefly
because it's easier to implement. Remoting is also an option. Both cases
call into components hosted elsewhere. Each has it's advantages. Ballpark
for what you are doing, i'd go with the webservice.
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Rob Kellow said:
Hello,
I'm working on an application for use within my company on our intranet
that will be used to gather some information and store some of the info in a
SQL Server database and the rest of the information will be used to initiate
either a MS Word or MS Excel document. The applications (Word & Excel)
reside on the users local system but the database is on the server. Since
it is for internal company use I'm not too concerned about security of
accessing local applications but ASP.NET still has its restrictions. Is
there a good way to accomplish this? I'm using VB.NET with ASP.NET.