|
Posted by Bhavna on 08/14/07 19:47
I have recently updated the stored procedure and now I am getting
"Microsoft OLE DB Provider for ODBC Drivers error '80040e14' .
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name
'bbakshi'. " error message. Here is the stored procedure
CREATE PROCEDURE stp_ExportMeetings @selmeetings varchar(8000), @user
varchar(50)
AS
DECLARE @sql varchar(8000)
DECLARE @empty varchar(1)
SET @empty = ''
SELECT @sql = 'UPDATE tblWrkshops SET Exported = 1, ExportDate =
GETDATE(), ExportedBy = "' + @user + '"
WHERE (tblWrkshops.Exported is null) OR (tblWrkshops.Exported <> 1)
and tblWrkshops.SetupNumb in (' + @selmeetings + ')'
EXEC (@sql)
SELECT @sql = 'SELECT tblWrkshops.MeetingCode, SessionNumber=
ISNULL(tblWrkshopSubjects.SessionNumb, ''01''),
tblSessionCons.ConsultantCode,
tblWrkshopSubjects.SubjectTitle, GenSubject =
tbl_Subject_Code.parent_session_code,
tbl_lkp_ParentSessionCodes.ParentSessionTitle
FROM tblWrkshops LEFT JOIN tblWrkshopSubjects ON
tblWrkshops.SetupNumb = tblWrkshopSubjects.SetupNumb
LEFT JOIN tblSessionCons ON tblWrkshopSubjects.WkshopSubjctID =
tblSessionCons.WkshopSubjctID AND
tblSessionCons.ConsultantType="Primary"
LEFT JOIN tbl_Subject_Code ON tblWrkshopSubjects.GenSubject =
tbl_Subject_Code.Subject_Code_pk
LEFT JOIN tbl_lkp_ParentSessionCodes ON
tbl_Subject_Code.parent_session_code =
tbl_lkp_ParentSessionCodes.ParentSessionCode
WHERE tblWrkshops.SetupNumb in (' + @selmeetings + ') and
tbl_lkp_ParentSessionCodes.DeleteMe=0'
EXEC (@sql)
GO
>From the asp page I am passing the parameters
strSQL = "stp_ExportMeetings '" & selected_meetings & "', " &
strExportUser & ""
objRS.Open strSQL, objCN
Any help is appreciated!
Thanks,
Bhavna
[Back to original message]
|