TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajat Majumder
NA
1
538
Error exists after modification done in a database table.
Aug 27 2016 4:53 AM
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,
Reply
Answers (
1
)
To create a enquiry form and send email with Java script
Report in report Builder