Click here to Skip to main content
Sign Up to vote bad
good
See more: SQL
CREATE DATABASE Data
CREATE TABLE Tables(Name varchar(25),Mobile int)
 
CREATE PROCEDURE spInsert
(
	@name varchar(25),
	@mobile int
)
AS
BEGIN
INSERT INTO Tables VALUES(@name,@mobile)
END
 
exec spInsert
it give error as:
Procedure or function 'spInsert' expects parameter '@name', which was not supplied.
 
how to run stored procedure?
Posted 27 Nov '12 - 6:41
Ashu6257
Edited 27 Nov '12 - 8:05

Comments
Maksud Saifullah Pulak - 30 Nov '12 - 3:30
You may add exec spInsert 'myname', 1

2 solutions

Where you have the
 
exec spInsert
 
You need to add your variables
 
exec spInsert 'myname', 1 
  Permalink  
You have to pass some value to @name
Second thing: in create table query you have Tables and in INSERT you have table1
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 353
1 OriginalGriff 345
2 Arun Vasu 315
3 Maciej Los 208
4 Aarti Meswania 180
0 Sergey Alexandrovich Kryukov 9,680
1 OriginalGriff 7,539
2 CPallini 4,018
3 Rohan Leuva 3,362
4 Maciej Los 2,951


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid