Creating Web Services
Prerequisites
Summary
This video shows how to create a simple web service to do a database lookup and respond with data. The Web Service accepts the name of a Job and returns all persons qualified to meet that job. The service performs a LIKE query based on the first name of all people in the system and is meant to be used with a AutoComplete Extender.
Video
Reference Materials
Database Table used in this example
Use TraumaFlow
GO
CREATE TABLE StaffNames(
id INT PRIMARY KEY IDENTITY(1,1),
StaffName VARCHAR(250) )
CREATE TABLE JobNames (
id INT PRIMARY KEY IDENTITY(1,1),
JobName VARCHAR(250) )
CREATE TABLE StaffToJobs (
StaffNameID INT FOREIGN KEY REFERENCES StaffNames(id),
JobNameID INT FOREIGN KEY REFERENCES JobNames(id))
CREATE VIEW StaffJobs
AS
SELECT StaffName AS 'Name',
JobName AS 'Job'
FROM StaffNames, JobNames, StaffToJobs
WHERE StaffToJobs.StaffNameID = StaffNames.id
AND StaffToJobs.JobNameID = JobNames.id