ERROR: Cannot set column 'cName'. The value... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

ERROR: Cannot set column 'cName'. The value...

NasfmaNasfma Posts: 9Member
[b][red]This message was edited by Nasfma at 2006-12-17 8:16:36[/red][/b][hr]
[b][red]This message was edited by Nasfma at 2006-12-17 8:15:32[/red][/b][hr]
Hi,
In order to explore DBMS using C#, I started with a very small DVD Collection databse. There is three relational tables: The [italic]Listings[/italic] table cointains Ratings, the [italic]DVDCollection[/italic] table has Title, Year etc, and the [italic]Sequel[/italic] table if any.

Design my Form, Lookup Tables and all that is required to run a successful program. But on running my DVDs program return an error message: [b]Cannot set column 'Title'. The value violates the MaxLength limit of this column.[/b] which is an ArgumentException (was unhandled) argument/error as diplayed.

That is one the Lookup Tables doesn't work well, followed the local and online help word to word several days still nothing. A Lookup Table suppose to allow you/clients to choose a more meaning data from the form, instead of numbers or symbols that doesn't make sense, thus the beauty of Relational Table.

I hope the questions are clear?

Regards,






Comments

  • iwilld0itiwilld0it Posts: 1,134Member
    [b][red]This message was edited by iwilld0it at 2006-12-20 11:57:51[/red][/b][hr]
    I am not sure what database u are using ... if you are using sql server go the table w/ the column in question and just change the size if it is a character field.

    By default, when u add a varchar or char column it defaults the max length or size to 50 characters, You can set that to a higher number.

    The same idea holds true in Access database, accept i think the column data type is called text. In access the default max text size is also 50, which also can be increased.

    Basically this stems from the fact that u are trying to assign a string to a column that is larger than the defined capacity for the column. It throws an exception rather than blindly truncating your text.


    : [b][red]This message was edited by Nasfma at 2006-12-17 8:16:36[/red][/b][hr]
    : [b][red]This message was edited by Nasfma at 2006-12-17 8:15:32[/red][/b][hr]
    : Hi,
    : In order to explore DBMS using C#, I started with a very small DVD Collection databse. There is three relational tables: The [italic]Listings[/italic] table cointains Ratings, the [italic]DVDCollection[/italic] table has Title, Year etc, and the [italic]Sequel[/italic] table if any.
    :
    : Design my Form, Lookup Tables and all that is required to run a successful program. But on running my DVDs program return an error message: [b]Cannot set column 'Title'. The value violates the MaxLength limit of this column.[/b] which is an ArgumentException (was unhandled) argument/error as diplayed.
    :
    : That is one the Lookup Tables doesn't work well, followed the local and online help word to word several days still nothing. A Lookup Table suppose to allow you/clients to choose a more meaning data from the form, instead of numbers or symbols that doesn't make sense, thus the beauty of Relational Table.
    :
    : I hope the questions are clear?
    :
    : Regards,
    :
    :
    :
    :
    :
    :
    :



  • NasfmaNasfma Posts: 9Member
    Thanks a lot, I'll try ur idea. But why don't the Windows Form work in an ordinary situation? Ok I'm trying to use the Windows Form for data enteries in a basic Table structure of Account and Account Type fields but fails to add data. What is happenning?


Sign In or Register to comment.