DataBaseModule and Missing Values in Field which is required one

DataBaseModule and Missing Values in Field which is required one

Post by F26 » Sun, 31 Dec 1899 09:00:00



With Delphi 2 you may use a new kind of form : a DataBaseModule (in French Language) which is a form not visible in execution and where you can put all your TTable components.

But i have a big problem with this kind of form :

1) In my table i have one field where i say it must have a value.
2) Normally i don't have to write code to test if the user tape a value the test is 'automatic'.
3) The problem is that when the value missed, a exception is raised and the system indicate it cannot focalise a form which cannot be visible (i believe it 's the data module form)

==> How can i resolve this problem ?

 
 
 

1. Field required, and Field default value

Hi.

I'm creating a database program, I know how to create the fields table, but
I don't know how to do that some fiels can't be null. I've been seeing the
help,  and It's something whith the "Required Property", How could I set
this proprety??, if I put 'set field.required=true' don't make the change
in the property.

Here is the code of my table, please if you know the to use the required
property, and the defaultvalue property, Say me.

' Begn of the table creation.
    'TABLA EQUIPOS
    Set Tabla = MyDatabase.CreateTableDef("Equipos")
    Set Columna = Tabla.CreateField("Divisin", dbByte)
    Tabla.Fields.Append Columna
    Set Columna = Tabla.CreateField("Equipo", dbText, 20)
    Tabla.Fields.Append Columna
    Set Columna = Tabla.CreateField("Ciudad", dbText, 50)
    Tabla.Fields.Append Columna
    Set Columna = Tabla.CreateField("Estadio", dbText, 50)
    Tabla.Fields.Append Columna
    Set Columna = Tabla.CreateField("Capacidad", dbLong)
    Tabla.Fields.Append Columna

    ' Ya estn creadas las columnas, ahora crear el ndice.
    Set ndice = Tabla.CreateIndex("PrimaryKey")
    ndice.Name = "PrimaryKey"
    ndice.Unique = True
    ndice.Primary = True
    Set Columna = ndice.CreateField("Divisin")
    ndice.Fields.Append Columna
    Set Columna = ndice.CreateField("Equipo")
    ndice.Fields.Append Columna

    ' A?ado el ndice a la Tabla
    Tabla.Indexes.Append ndice

    ' a?ado la nueva Tabla a la Base de datos
    MyDatabase.TableDefs.Append Tabla

' end of the table creation.

Answer by e-mail.

Thanks.

2. OR-PORTLAND-25239--ORACLE Forms-ORACLE Tools-SQL*Plus-PL/SQL-ORACLE Financials-F

3. error ORA-01855: AM/A.M. or PM/P.M. required

4. Migration from 6.5 to 7.0 Syntax Problems

5. Interbase--Append--Required Field missing

6. ADO Runtime Error: No value given for one or more required parameters

7. No value given for one or more required parameters

8. Error: No value given for one or more required parameters

9. ADOdc - No value given for one or more required parameters

10. No value given for one or more required parameters

11. merging two fields into one field with value lists