code works on dev PC but not server [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
开发者_Go百科Closed 9 years ago.
Improve this questionHaving a problem with the following code running on server. It works on dev PC. Any help would be appreciated....
USE [stringsdb]
GO
/****** Object: StoredProcedure [dbo].[usp_insertPicks] Script Date: 09/07/2011 15:27:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[usp_insertPicks]
/* *********************************************
Name: usp_insertPicks
Called from
*/
@userName varchar(50),
@pick nvarchar(50),
@wk varchar(50),
@subDate datetime
AS
SET NOCOUNT ON;
DECLARE @sql varchar(max);
-- DECLARE @submitDate1 DATETIME;
-- SET @submitDate1 = GETDATE()
BEGIN
INSERT INTO [tblPicks] ([userName], [pick], [wk], [subDate])
VALUES (@userName,@pick,@wk,@subDate);
END
print (@sql)
EXECUTE(@sql);
SET @sql = ''
RETURN
GO
I can authenticate against the DB with ASP Membership and other queries work.
The problem was solved with an update to the connection string that was declared in the code behind.
Verify that you have a database named [stringsdb] on the server.
Verify that you have permission to execute this procedure on the server.
If you're running a select on [tblPicks] to verify that the procedure worked, then verify that you have select permission on that table.
精彩评论