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,