Lucas,
Error lines dont match that version.
Can you post lines here?
Tlocks file does not exist? Was not created?
#include "fivewin.ch"
#include "adordd\adordd.ch"
#include "adordd\adordd.prg"
REQUEST ADORDD, DBFCDX
function Main()
RddRegister("ADORDD",1)
RddSetDefault("ADORDD")
SET ADODBF TABLES INDEX LIST TO { { "TABLE1", {"TEST1", "FIRST"} ,;
{"TEST2", "LAST"} ,;
{"TEST3", "AGE"} },;
{"LUCAS", {"LUCAS1", "NOMBRE"}} }
SET ADO TABLES INDEX LIST TO {{ "TABLE1", {"TEST1", "FIRST"} ,;
{"TEST2", "LAST"} ,;
{"TEST3", "AGE"} },;
{"LUCAS", {"LUCAS1", "NOMBRE"}} }
SET ADO DEFAULT RECNO FIELD TO "ID"
// SET AUTOPEN ON //might be OFF if you wish
// SET AUTORDER TO 1 // first index opened can be other
SET ADO DEFAULT DATABASE TO "LUCASTABLE.MDB" ENGINE TO "ACCESS" USER TO "" PASSWORD TO ""
// SET ADO LOCK CONTROL SHAREPATH TO "C:" RDD TO "DBFCDX"
IF !FILE( "LUCASTABLE.MDB" )
msginfo("creating LUCASTABLE.MDB")
DbCreate( "TABLE1", { { "FIRST", "C", 30, 0 },;
{ "LAST", "C", 30, 0 },;
{ "AGE", "N", 8, 0 },;
{ "ID" ,"+",10, 0} }, "ADORDD" )
DbCreate( "LUCAS", { { "NOMBRE", "C", 30, 0 },;
{ "ID" ,"+",10, 0} }, "ADORDD" )
ENDIF
//
// Open DBFS
USE LUCAS NEW ALIAS "LUCAS"
LUCAS->(ORDSETFOCUS("LUCAS1"))
?ordsetfocus()
BROWSE()
//
USE TABLE1 ALIAS "TEST2" NEW
OrdSetFocus("TEST1")
?ordsetfocus()
TEST2->( OrdSetFocus("TEST2") )
msginfo(ordsetfocus() + SPACE(20), "Changed to TEST2" )
XBROWSER FASTEDIT
APPEND BLANK
test2->First := "HOMER si no Homer"
test2->Last := "Simpson"
test2->Age := 45
APPEND BLANK
test2->First := cValToChar( nRandom() ) + " aaa Lara"
test2->Last := "Croft si no"
test2->Age := 32
GO TOP
Browse()
DbCloseAll()
return nil
SET ADODBF TABLES INDEX LIST TO { { "TABLE1", {"TEST1", "FIRST"} ,;
{"TEST2", "LAST"} ,;
{"TEST3", "AGE"} },;
{"LUCAS", {"LUCAS1", "NOMBRE","NOMBRE = 'AGAMENON'"}} }
SET ADO TABLES INDEX LIST TO {{ "TABLE1", {"TEST1", "FIRST"} ,;
{"TEST2", "LAST"} ,;
{"TEST3", "AGE"} },;
{"LUCAS", {"LUCAS1", "NOMBRE","WHERE NOMBRE = 'AGAMENON'"}}
SET ADO TABLES INDEX LIST TO {{ "TABLE1", {"TEST1", "FIRST"} ,;
{"TEST2", "LAST"} ,;
{"TEST3", "AGE"} },;
{"LUCAS", {"LUCAS1", "NOMBRE"} ,;
{"LUCAS2", "NOMBRE" } } }
SET ADODBF TABLES INDEX LIST TO { { "TABLE1", {"TEST1", "FIRST"} ,;
{"TEST2", "LAST"} ,;
{"TEST3", "AGE"} },;
{"LUCAS", {"LUCAS1", "NOMBRE"} ,;
{"LUCAS2", "NOMBRE", "WHERE NOMBRE = 'AGAMENON'"} } }
//
// Open DBFS
USE LUCAS NEW ALIAS "LUCAS"
LUCAS->(ORDSETFOCUS("LUCAS1"))
?ordsetfocus()
BROWSE()
LUCAS->(ORDSETFOCUS("LUCAS2"))
dbgotop()
?ordsetfocus()
xbrowser fastedit
FUNCTION rddreport()
LOCAL cerrorlog := "",n,j,ntarget,x
for n = 1 to 255
if ! Empty( Alias( n ) )
cErrorLog += CRLF + Str( n, 3 ) + ": " + If( Select() == n,"=> ", " " ) + ;
PadR( Alias( n ), 15 ) + Space( 20 ) + "NomeRDD: " + ;
( Alias( n ) )->( RddName() ) + CRLF
cErrorLog += " ==============================" + CRLF
cErrorLog += " RecNo RecCount BOF EOF" + CRLF
cErrorLog += " " + Transform( ( Alias( n ) )->( RecNo() ), "99999" ) + ;
" " + Transform( ( Alias( n ) )->( RecCount() ), "99999" ) + ;
" " + cValToChar( ( Alias( n ) )->( BoF() ) ) + ;
" " + cValToChar( ( Alias( n ) )->( EoF() ) ) + CRLF + CRLF
cErrorLog += " Índices em uso " + Space( 23 ) + "TagName" + CRLF
for j = 1 to 15
if ! Empty( ( Alias( n ) )->( IndexKey( j ) ) )
cErrorLog += Space( 8 ) + ;
If( ( Alias( n ) )->( IndexOrd() ) == j, "=> ", " " ) + ;
PadR( ( Alias( n ) )->( IndexKey( j ) ), 35 ) + ;
( Alias( n ) )->( OrdName( j ) ) + ;
CRLF
endif
next
cErrorLog += CRLF + " Relações em uso " + CRLF
for j = 1 to 8
if ! Empty( ( nTarget := ( Alias( n ) )->( DbRSelect( j ) ) ) )
cErrorLog += Space( 8 ) + Str( j ) + ": " + ;
"TO " + ( Alias( n ) )->( DbRelation( j ) ) + ;
" INTO " + Alias( nTarget ) + CRLF
// uValue = ( Alias( n ) )->( DbRelation( j ) )
// cErrorLog += cValToChar( &( uValue ) ) + CRLF
endif
next
x := (alias(n))->(dbrlocklist())
cErrorLog += Space( 8 ) +"Registos fechados "+CRLF
for j = 1 to len(x)
cErrorLog += Space( 8 ) + "Registo nr "+str(x[j])+CRLF
next
endif
next
SHOWMEMO(cerrorlog)
RETURN .t.
May be you can help me.
Im still with a problems with dates in MYSQL.
1) Edit a date field and place any date ok.
2) Delete that date and leave it blank date ok
3) Edit again and place a new date ok bu if edit iit again and keep the date blank error!
I try with adoshowerror but nothing only unknown error.
Do you have any clue?
How can we set a date field with empty date?
Where are you putting this?
{"TEST3", "AGE","WHERE AGE = 32"} }
In SET ADO TABLES or in SET ADODBF TABLES?.
As long as I can´t use adordd in a full working application, I can´t test dates behaviour.
1: => LUCAS NomeRDD: ADORDD
==============================
RecNo RecCount BOF EOF
2 3 .F. .F.
Índices em uso TagName
NOMBRE LUCAS1
NOMBRE LUCAS2
=> NOMBRE LUCAS3
Relações em uso
Registos fechados
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 65 guests