关于odbc数据源(server 2000)执行存储过程出现问题?
private function ExecProcedure() as boolean
Dim cmd As New Odbc.OdbcCommand()
Try
With cmd
.Connection = odbcConn
.CommandType = CommandType.StoredProcedure
.Parameters.Add( "@suserid ", OdbcType.Char, 50)
.Parameters( "@suserid ").Value = TextBox1.Text.Trim
.Parameters.Add( "@sclaimmethod ", OdbcType.Char, 50)
.Parameters( "@sclaimmethod ").Value = TextBox2.Text.Trim
.CommandText = "insert_user "
.ExecuteNonQuery()
End With
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End function
存储过程:
CREATE PROCEDURE insert_user
@suserid varchar(50),
@sclaimmethod varchar(50)
AS
BEGIN
if @suserid <> ' ' OR @sclaimmethod <> ' '
begin
insert into sma(id,name) values (@suserid,@sclaimmethod)
end
END
GO
可是执行时总是报“没有insert_user ”
[解决办法]
确认数据库中有这个存储过程吗??查一下