Files
harbour-core/contrib/sddoci/tests/test1.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

50 lines
934 B
Plaintext

#require "rddsql"
#require "sddoci"
#include "simpleio.ch"
REQUEST SDDOCI, SQLMIX
PROCEDURE Main()
LOCAL tmp
#if defined( __HBSCRIPT__HBSHELL )
rddRegister( "SQLBASE" )
rddRegister( "SQLMIX" )
hb_SDDOCI_Register()
#endif
rddSetDefault( "SQLMIX" )
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
AEval( rddList(), {| X | QOut( X ) } )
? "-1-"
? "Connect:", tmp := rddInfo( RDDI_CONNECT, { "OCILIB", "ORCL", "scott", "tiger" } )
IF tmp == 0
? "Unable connect to the server"
ENDIF
? "-2-"
? "Use:", dbUseArea( .T., , "select * from emp", "emp" )
? "-3-"
? "Alias:", Alias()
? "-4-"
? "DB struct:", hb_ValToExp( dbStruct() )
? "-5-"
FOR tmp := 1 TO FCount()
? FieldName( tmp ), hb_FieldType( tmp ), hb_FieldLen( tmp ), hb_FieldDec( tmp )
NEXT
? "-6-"
Inkey( 0 )
Browse()
INDEX ON FIELD->SAL TO salary
dbGoTop()
Browse()
dbCloseArea()
RETURN