Hi
i m trying to call a function in insert statment
Insert Into (value, value1)
Value(@.value, dbo.function(@.value1)
dbo.function returns a value,
when i test the function in querry builder all goes fine.
In my program i become a error
"Parameterized Query '' ' expects parameter @.value1 , which was not supplied."
I m using visual studio , tableadapter.update function to insert datarecords in db
thx for help
Hi,seems that you only provided 1 paramters within your query statement / parameter collection. The statement expects 2 value / value1 which both have to be supplied, if this is the same paramter you can just use the same name for them
Insert Into (value, value1)
Value(@.value, dbo.function(@.value)) --> There was also a closing parant. missing
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||supply a default value for parameter @.value in the front end. Just in case the function would not return one.
No comments:
Post a Comment