Hi! I wrote a simple stored procedure to add a few fields into a MsSQL table:
Code:
INSERT INTO dbo.xyz769_Blog_01_Comments
(Blog_01ID, Blog_01_Title, Username, Comment_Content, Email)
VALUES (@Blog_01ID, @Blog_01_Title, @Username, @Comment_Content, @Email)
But whenever i try to insert data thru an ASP page i get the following error:
Code:
Microsoft OLE DB Provider for SQL Server error '80040e07'
Error converting data type varchar to int.
/anti_sql/pages/blog_01/blog_item.asp, line 73
Line 73 on blog_item.asp is just my execution statement which is the following:
Code:
rsEnterRecord_cmd.Execute
I tested to see which parameter was causing the problem, and after I went thru each one, I found out that when I enabled the @Email parameter it gives me this error.
My Parameters are created on the ASP page through following statements:
Code:
rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Blog_01ID", 3, 1)
rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Blog_01_Title", 200, 1, 200)
rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Username", 200, 1, 50)
rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Comment_Content", 200, 1, 255)
rsEnterRecord_cmd.Parameters.Append rsEnterRecord_cmd.CreateParameter("@Email", 200, 1, 200)
In the database table:
Blog_01ID is Integer
Blog_01_Title is nvarchar
Email is nvarchar
Comment_Content is nvarchar
Username is nvarchar
I really don't see where the problem is, and I've run out of ideas, please help ....