Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Table using Stored Procedure 2

Status
Not open for further replies.

tanyakumar

Technical User
Feb 25, 2001
4
0
0
IN
I am trying to update a table using ASP and SQL stored procedure, but i keep giving me a msg that i havent passed my parameters even though I have, does anyone have any idea what parameter type is to be passed to update a table and maybe an example of an update SP??
 
I had a similar problem when I was passing a date value to a stored procedure from VB. Try cconverting your parameter value/s to a string and then passing it. This worked fine for me.

Note : SQL must be able to convert the string value back to the data type required for this to work.

 
Yuben...thanks for the reponse. I am really new to this could u pls help a lil more. Its giving me an error in a field which is auto incremented...where to I convert the datatype and how? I know I sound dumb but this is the first I'm actually doing it all by myself
Thanks :)
 
You do not need to povide a value for an autoincrement field.

A possible stored procedure statement would be:

Code:
create procedure InsertTest

@val1 integer,
@val2 varchar(6),
@val3 integer

as 

insert SomeTable (Field2,field3,field4) values (@val2,@val3,@val4)

The design of SomeTable:
Field1 - identity
Field2 - int
field3 - varchar(6)
field4 - int
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top