Hi,
I am accessing SQL Server 2000 through Dreamweaver. No problems accessing the tables except one big headache. I cannot get a stored procedure to work. I am trying a simple one to see if it worked first. I have created a view and a stored procedure in SQL Server which Dreamweaver will use. In dreamweaver I have placed a form with a recordset that populates a listbox with a submit button below it. In a table further down I have created a repeat region and set the necessary 'show region if not empty' property. The idea is when you select from the list box the associated records should show.
I have followed an exact example in 'Advanced ASP development' by Glasshaus and it worked. I created a separate database for their example and even imported their examples table into my database and it worked ok. It is the repeating records that don't display at all, but there is no error message, its just that they don't appear.
Does anyone have any suggestions.
My procedure in SQL is:
CREATE PROCEDURE spSalesperson(
@spID int)
AS
IF @spID IS NOT NULL
BEGIN
SELECT * FROM viewSalesperson WHERE spID = @spID
END
GO
My view in SQL is:
CREATE VIEW dbo.viewSalesperson
AS
SELECT dbo.tblSalesperson.spID, dbo.tblSalesperson.spTitle, dbo.tblSalesperson.spFirstName, dbo.tblSalesperson.spSurname, dbo.tblSalesperson.spEmail,
dbo.tblCustomer.custID, dbo.tblCustomer.custName
FROM dbo.tblCustomer INNER JOIN
dbo.tblSalesperson ON dbo.tblCustomer.spID = dbo.tblSalesperson.spID
Judging from the example in the book I don't think I am going wrong on the Dreamweaver side of things. If there is something obvious I would appreciate any help as I am new to SQL Server
Many thanks,
Mfild
I am accessing SQL Server 2000 through Dreamweaver. No problems accessing the tables except one big headache. I cannot get a stored procedure to work. I am trying a simple one to see if it worked first. I have created a view and a stored procedure in SQL Server which Dreamweaver will use. In dreamweaver I have placed a form with a recordset that populates a listbox with a submit button below it. In a table further down I have created a repeat region and set the necessary 'show region if not empty' property. The idea is when you select from the list box the associated records should show.
I have followed an exact example in 'Advanced ASP development' by Glasshaus and it worked. I created a separate database for their example and even imported their examples table into my database and it worked ok. It is the repeating records that don't display at all, but there is no error message, its just that they don't appear.
Does anyone have any suggestions.
My procedure in SQL is:
CREATE PROCEDURE spSalesperson(
@spID int)
AS
IF @spID IS NOT NULL
BEGIN
SELECT * FROM viewSalesperson WHERE spID = @spID
END
GO
My view in SQL is:
CREATE VIEW dbo.viewSalesperson
AS
SELECT dbo.tblSalesperson.spID, dbo.tblSalesperson.spTitle, dbo.tblSalesperson.spFirstName, dbo.tblSalesperson.spSurname, dbo.tblSalesperson.spEmail,
dbo.tblCustomer.custID, dbo.tblCustomer.custName
FROM dbo.tblCustomer INNER JOIN
dbo.tblSalesperson ON dbo.tblCustomer.spID = dbo.tblSalesperson.spID
Judging from the example in the book I don't think I am going wrong on the Dreamweaver side of things. If there is something obvious I would appreciate any help as I am new to SQL Server
Many thanks,
Mfild