Adding Blank Fields to DB

[b][red]This message was edited by CoolWriter at 2002-7-31 0:35:19[/red][/b][hr]
Hi,
Is there any way to add balnk fields to a database. When I try to leave a field blank, an exception occours. How can I eliminate this exception and leave the field blank?
Thanls lot...


Comments

  • : [b][red]This message was edited by CoolWriter at 2002-7-31 0:35:19[/red][/b][hr]
    : Hi,
    : Is there any way to add balnk fields to a database. When I try to leave a field blank, an exception occours. How can I eliminate this exception and leave the field blank?
    : Thanls lot...
    :
    :
    :

    I'm sure this has something to do with the field being a 'NOT NULL' field in the database. If this is the case, it just won't work, since the db will not allow you to post empty value's in it...


    [blue][b][italic],-~[ D-FADER ]~-'[/italic][/b][/blue]

  • : : Hi,
    : : Is there any way to add balnk fields to a database. When I try to leave a field blank, an exception occours. How can I eliminate this exception and leave the field blank?
    : : Thanls lot...
    : :
    :
    : I'm sure this has something to do with the field being a 'NOT NULL' field in the database. If this is the case, it just won't work, since the db will not allow you to post empty value's in it...

    But there should be a way to post empty values in to db. Need help...
  • [b][red]This message was edited by DonAlexandro at 2002-7-31 8:18:52[/red][/b][hr]
    : : : Hi,
    : : : Is there any way to add balnk fields to a database. When I try to leave a field blank, an exception occours. How can I eliminate this exception and leave the field blank?
    : : : Thanls lot...
    : : :
    : :
    : : I'm sure this has something to do with the field being a 'NOT NULL' field in the database. If this is the case, it just won't work, since the db will not allow you to post empty value's in it...
    :
    : But there should be a way to post empty values in to db. Need help...
    :
    :
    :> Have a look at the property Table.Fields[I].Required!! It arranges whether or not a field is required to be filled.
    :> I think it is the solution to your problem (or maybe not) :-)


  • : [b][red]This message was edited by DonAlexandro at 2002-7-31 8:18:52[/red][/b][hr]
    : : : : Hi,
    : : : : Is there any way to add balnk fields to a database. When I try to leave a field blank, an exception occours. How can I eliminate this exception and leave the field blank?
    : : : : Thanls lot...
    : : : :
    : : :
    : : : I'm sure this has something to do with the field being a 'NOT NULL' field in the database. If this is the case, it just won't work, since the db will not allow you to post empty value's in it...
    : :
    : : But there should be a way to post empty values in to db. Need help...
    : :
    : :
    : :> Have a look at the property Table.Fields[I].Required!! It arranges whether or not a field is required to be filled.
    : :> I think it is the solution to your problem (or maybe not) :-)
    :
    :
    :

    No it is not about being a requierd field. My problem is just leaving the field blank. How can I leave a field blank with no value?


  • : No it is not about being a requierd field.
    oh yes it is!

    : My problem is just leaving the field blank.
    : How can I leave a field blank with no value?

    the thing is: a required field cannot be left blank. the database engine will throw the exception if you try to leave a required field blank. same thing applies to fields with a minimum value etc




  • My field is not a required field. But I still cannot leave the field blank... What should I do?
  • : My field is not a required field. But I still cannot leave the field blank... What should I do?
    :

    IMHO there is probably another field property spoiling things.
    Does the field have a minimum value? is it tied to a lookup table? part of an index key?

    in any case: the problem must lie within the db or field definition. this is not a Delphi issue, the exception gets thrown by the db engine.
    If it is not too big, you can send the db to me at [email protected] and i'll take a look if i can see what the problem is




  • : : My field is not a required field. But I still cannot leave the field blank... What should I do?
    : :
    :
    : IMHO there is probably another field property spoiling things.
    : Does the field have a minimum value? is it tied to a lookup table? part of an index key?
    :
    :No! It is not one of these features(no minimum value,no index key,no lookup table).The strange think is that when i open a delphi table from
    DBDEMOS the fields that are not claim to be required (at Table.Fields.Required) ARE NOT REQUIRED.If a change this property into 'Required' on run-time (this change is not permanently:is not stored to the table properties) then these fields are become required (but not the opposite).I suppose that the behaviour of the fields depends on 'Table.FieldDefs.Items' property and not from the 'Table.Fields'.But the 'Table.FieldDefs.Items' are Read-only properties! But there would be someway to change not only the properties but also the structure of the table (i.e size of ftString fields,FieldName..) because all the databases that i have used (dbase,access..) can do that! Whatever,if i find something new i'll let you know. :-|
  • : there would be someway to change not only the properties but also
    : the structure of the table (i.e size of ftString fields,
    : FieldName..) because all the databases that i have used
    : (dbase,access..) can do that!

    mmm... first of all: i would not presume anything on the basis of what other db products offer. And im not convinced that changing field properties at runtime is such a good idea anyway so it would not surprise me if this is somehow blocked by some engines.
    IMHO best practice would be to duplicate the data into another table
    with the new definitions you need and switch tables when needed


Sign In or Register to comment.

Howdy, Stranger!

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

Categories