Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Error exists after modification done in a database table.
Rajat Majumder
Aug 27 2016 4:53 AM
238
Reply
Hello Experts,
Currently I'm working on 'Entity Framework Models' on my own ASP.NET project. I have completed my database design. During the 'Entity Framework Models' design phase I found that I made a mistake in my database design .
In the 'ProductTypes' table I declare the 'Name' column as VARBINARY(50) datatype instead of VARCHAR(50). During the design of the 'ManageProductTypes.aspx' page I'm getting the following errer i.e.
private ProductType createProductType()
{
ProductType p = new ProductType();
p.Name = txtName.Text;
// Error: Can't implicitly convert type 'string' to 'Byte'
return p;
}
After that, to resolve the error I wrote the following SQL commands in SQL Server 2008:
ALTER TABLE [dbo].[ProductTypes]
ALTER COLUMN Name varchar(50) NOT NULL;
Commands were executed successfully. But still I'm getting the same error on my 'ManageProductTypes.aspx' page.
Please help me regarding this matter.
Thank You in advance,
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
To create a enquiry form and send email with Java script
Report in report Builder