에러내용
xxx.xxxxxx.com/list.asp?prod_group=a 로 접속하면
===================================================
Microsoft OLE DB Provider for SQL Server error '80040e14'
열 이름 'a'이(가) 잘못되었습니다.
==================================================
해당 프로시져는 아래와 같습니다.
@PAGE INT,
@ROW_COUNT INT,
@GROUP varchar(60),
@TOTAL_PAGE INT OUTPUT,
@TOTAL_RECORDS INT OUTPUT
AS
Begin
Begin Tran
SET NOCOUNT ON
DECLARE @SQL VARCHAR(1000)
Declare @strError int
Set @strError = 0
SELECT @TOTAL_RECORDS = COUNT(*) FROM prod_mast where prod_group=@GROUP
SET @TOTAL_PAGE = CEILING((@TOTAL_RECORDS-1)/@ROW_COUNT)+1
SET @SQL = 'SELECT TOP ' + CONVERT(VARCHAR(10), @ROW_COUNT)
SET @SQL = @SQL + ' prod_id,prod_name,prod_price1,prod_price2,prod_group,prod_regdate,prod_imgfname FROM prod_mast where prod_group="'+CONVERT(VARCHAR(60),@GROUP)+'" and prod_id not in(SELECT TOP '
SET @SQL = @SQL + CONVERT(VARCHAR(10), ((@PAGE - 1) * @ROW_COUNT))
SET @SQL = @SQL + ' prod_id FROM prod_mast where prod_group="'+CONVERT(VARCHAR(60),@GROUP)+'") '
EXEC (@SQL)
Set @strError = @@Error
If (@strError<> 0)
Begin
RollBack Tran
End
Else
Begin
Commit Tran
End
SET NOCOUNT OFF
End
|