// The example shows how to create a new database from a
// structure definition array using the DBFCDX driver.
#include "Fivewin.ch"
REQUEST DBFCDX
PROCEDURE Main()
LOCAL aStruct := { ;
{ "CHARACTER", "C", 25, 0 }, ;
{ "NUMERIC" , "N", 8, 0 }, ;
{ "DOUBLE" , "N", 8, 2 }, ;
{ "DATE" , "D", 8, 0 }, ;
{ "LOGICAL" , "L", 1, 0 }, ;
{ "MEMO" , "M", 10, 0 }, ;
{ "MEMO" , "M", 10, 0 } ;
}
? "Creating Database...."
DbCreate( "testdbf", aStruct, "DBFCDX", .T., "MYALIAS" )
MyAlias->(dbAppend())
MyAlias->Memo := "Memofield 1" // Insert text to Menmfield 1
FieldPut (7, "Memofield 2") // Insert text to Memofield 2
Browse()
RETURN
MarcoBoschi wrote:Please try this:
FUNCTION MAIN()
DBCREATE( "MYTEST", { { "TEST", "C", 35, 0 },;
{ "TEST", "C", 35, 0 } } )
USE MYTEST
APPEND BLANK
FIELDPUT( 1, "Test 1" )
FIELDPUT( 2, "Test 2" )
? FIELDGET( 1 )
? FIELDGET( 2 )
CLOSE
INKEY( 0 )
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 83 guests