TDATABASE

TDATABASE

Postby Patricio Avalos Aguirre » Thu Nov 17, 2005 7:18 pm

Estimados algo raro pasa con esta instrucción, resulta que a veces me da este error, no entiendo y existe el campo el la base de datos..??

Error BASE/1132 Error de rango: acceso al array
Argumentos :
[ 1] = A { ... }
[ 2] = N 23

Llamadas al Stack
_____________________________________________________________

Called from (b)GENDATAFIELD(2349)
Called from TARTICU:AR_M_DES(0)
Called from OARTICU(652)
Called from LISTARTCLI(505)
Called from (b)BUILDMENU(158)
Called from TMENU:COMMAND(404)
Called from TWINDOW:COMMAND(925)
Called from TMDIFRAME:COMMAND(224)
Called from TMDIFRAME:HANDLEEVENT(0)
Called from _FWH(3036)
Called from WINRUN(0)
Called from TMDIFRAME:ACTIVATE(874)
Called from MAIN(115)


y este es la instrucción que tengo,

function oArticulo()
local oMa

DEFINE DATABASE oMa FILE (PATHDBF + "ARTICU.DBF")

FIELD NAME "AR_CODIG" TYPE "C" LEN 015 DEC 00 OF oMa
FIELD NAME "AR_DESCR" TYPE "C" LEN 050 DEC 00 OF oMa
FIELD NAME "AR_UNIDA" TYPE "C" LEN 003 DEC 00 OF oMa
FIELD NAME "AR_FAMILIA" TYPE "C" LEN 005 DEC 00 OF oMa
FIELD NAME "AR_CLASE" TYPE "C" LEN 005 DEC 00 OF oMa
FIELD NAME "AR_PROVE" TYPE "C" LEN 010 DEC 00 OF oMa
FIELD NAME "AR_UBICA" TYPE "C" LEN 010 DEC 00 OF oMa
FIELD NAME "AR_S_INI" TYPE "N" LEN 008 DEC 00 OF oMa
FIELD NAME "AR_C_INI" TYPE "N" LEN 013 DEC 02 OF oMa
FIELD NAME "AR_F_INI" TYPE "D" LEN 008 DEC 00 OF oMa
FIELD NAME "AR_F_UCO" TYPE "D" LEN 008 DEC 00 OF oMa
FIELD NAME "AR_C_UCO" TYPE "N" LEN 008 DEC 00 OF oMa
FIELD NAME "AR_S_ACT" TYPE "N" LEN 013 DEC 02 OF oMa
FIELD NAME "AR_P_MED" TYPE "N" LEN 010 DEC 00 OF oMa
FIELD NAME "AR_FACTOR" TYPE "N" LEN 006 DEC 02 OF oMa
FIELD NAME "AR_P_NET" TYPE "N" LEN 010 DEC 00 OF oMa
FIELD NAME "AR_S_CRI" TYPE "N" LEN 008 DEC 00 OF oMa
FIELD NAME "AR_VALORIZ" TYPE "N" LEN 010 DEC 00 OF oMa
FIELD NAME "AR_PASO" TYPE "L" LEN 001 DEC 00 OF oMa
FIELD NAME "AR_N_INV" TYPE "L" LEN 001 DEC 00 OF oMa
FIELD NAME "USUARIO" TYPE "C" LEN 013 DEC 00 OF oMa
FIELD NAME "AR_M_DES" TYPE "N" LEN 004 DEC 01 OF oMa

ACTIVATE DATABASE oMa NORECYCLE SHARED

if oMa:nArea > 0
if oMa:Ar_M_Des > 0
/*
el error lo da aqui, pero aveces que onda... si alguien le a ocurrido favor echarme una ayudita..
*/
endif
endif

Return( oMa )
//----------------------------------------------------------------------


Saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Mon Nov 28, 2005 6:46 am

Patricio,

Utiliza el commando DATABASE <oDbf> como puedes ver en los ejemplos samples\Dbf01.prg y Dbf03.prg

No uses el commando DEFINE DATABASE ... ni el FIELD ...

Esas clases se quedaron desfasadas, aunque aún no se han eliminado de FWH.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42126
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests