|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
>> Calling an SP that inserts doesn't work??
HI,
I have written a stored proc that inserts into a mssql db, however when i try and call it I get an error. In query analyser i get Server: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near '997'. Does anyone know what im doing wrong? sp: ALTER Procedure dbo.Admin_InsertWebPage ( @AgentID int, @WPtitle nvarchar(150), @WPBody text, @WPMetaDesc varchar(255), @WPMetaKeywords varchar(255), @WPCreation smalldatetime, @WPLastedited smalldatetime, @WPsubject varchar(150), @WPmodule int ) As /* THIS INSERTS NEW WebPages into the db*/ INSERT INTO tblWebPages ( AgentId,Wptitle,WpBody,WPMetaDesc,WPMetaKeywords,WPCreation,WPLastedited,WPsubject,WPmodule ) VALUES ( @AgentID,@WPtitle,@WPBody,@WPMetaDesc,@WPMetaKeywords,@WPCreation,@WPLastedited,@WPsubject,@WPmodule ) Calling code: Admin_InsertWebPage (997,'test','test','test','test',getdate(),getdate(),'test',2) Best regards Technicweb |
|
#2
|
|||
|
|||
|
Code:
Admin_InsertWebPage 997,'test','test','test','test',getdate(),getdate(),'test',2 |
|
#3
|
|||
|
|||
|
thanks but,
Server: Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near ')'. I get this now, im guessing its somethign to do with the getdate() functions. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > >> Calling an SP that inserts doesn't work?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|