On Thu, 27 Dec 2007, Francesco Saverio Giudice wrote:
> Hi All,
> how may I use an autoincrement field ?
> I would like to have a numeric value, but at the moment if I create a dbf 
> with below command, I got a datetime field.
> dbcreate( "test", { {"USERID", "+", 12, 0 }, { "NAME", C, 20, 0 } }, 
> "DBFCDX" )
> I have tried with some combinations of len and dec values, but without 
> success.
> I have also seen that at the moment there is a commented out DBS_FLAG, but 
> it should be for future extension.
> Is autoinc already full implemented or is it at devel stage ?

AFAIK is working and it is fully functional. If you think that sth is
wrong then please create self contain example which illustrates the
problem. This example shows that AUTOINC fields works without any
problems:

    proc main()
    local i
    rddsetdefault( "DBFCDX" )
    dbcreate( "test", { {"USERID", "+", 4, 0 }, { "NAME", "C", 20, 0 } } )
    use test
    for i:=1 to 10
       dbappend()
       if i % 3 == 0
          field->name := "NAME:" + ltrim( str( i ) )
       endif
    next
    dbgotop()
    browse()
    close
    return

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to