Sr. Antonio Linares

Sr. Antonio Linares

Postby Ruben » Fri Mar 07, 2008 6:46 pm

BUEN DIA SABE ESTOY ATORADO CON ESTO PORFA ORIENTENME


CUANDO TENGO ESTE TIPO DE ERROR QUE ES LO QUE TENGO QUE HACER

Path and name: C:\APLICACIONES\CXC\cxc.Exe (32 bits)
Size: 1,499,648 bytes
Time from start: 0 hours 0 mins 14 secs
Error occurred at: 07/03/08, 10:30:32
Error description: Error DBCMD/2001 Workarea not in use: DBSEEK

Stack Calls
===========
Called from: => DBSEEK(0)
Called from: cap_doc.prg => TRAE_CLIENTE(135)
Called from: cap_doc.prg => (b)DOC_CAP(99)
Called from: TGET.PRG => TGET:LVALID(0)
Called from: CONTROL.PRG => TGET:FWLOSTFOCUS(0)
Called from: CONTROL.PRG => TGET:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => SYSREFRESH(0)
Called from: CONTROL.PRG => TCONTROL:KEYCHAR(0)
Called from: TGET.PRG => TGET:KEYCHAR(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TGET:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: cap_doc.prg => DOC_CAP(117)
Called from: cap_doc.prg => (b)CAP_DOC(61)
Called from: BUTTON.PRG => TBUTTON:CLICK(0)
Called from: CONTROL.PRG => TBUTTON:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: DIALOG.PRG => TDIALOG:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: cap_doc.prg => CAP_DOC(71)
Called from: cxc.prg => (b)CREAMENU(65)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: cxc.prg => MAIN(49)

TENGO UNA CAPTURA DE DOCUMENTOS DESDE UN DLG EN EL CUAL TENGO UN CAMPO QUE SE LLAMA CLAVE Y ES DE CLIENTES, CUANDO EL USUARIO INTRODUCE LA CLAVE EN EL OTRO EDITBOX ME TIENE QUE APARECER EL NOMBRE. PERO ME MANDA ESTE ERROR.

ESTE ES EL GET Y EL SAY

REDEFINE get aYDts[4] ID 104 OF oDlg1 PICTURE "9999" WHEN NwMod valid TRAE_CLIENTE(cVar,oGet)
EDEFINE SAY cVar PROMPT oGet id 105 OF oDlg1


Y ESTA ES MI FUNCION

FUNCTION Trae_Cliente(cNombre,oGet)
local cClientes
IF (cClientes)->(DBSEEK(aYDts))
cNomCli := (cClientes)->NOMBRE
oGet:Refresh()
RETURN(.T.)
ELSE
MsgInfo("Cliente no registrado")

RETURN(.F.)

ENDIF

return nil
User avatar
Ruben
 
Posts: 40
Joined: Wed Feb 20, 2008 5:40 pm
Location: Tampico,Tamps. México

Postby MGA » Fri Mar 07, 2008 7:15 pm

Amigo, não esta faltando setar o indice?

EX:
DBSETORDER(1)


Espero ter ajudado
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1254
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby Antonio Linares » Fri Mar 07, 2008 7:16 pm

Ruben,

Estas declarando una variable local, que no está inicializada:

local cClientes

y a continuación la intentas usar como alias. De ahí viene el error:

IF (cClientes)->(DBSEEK(aYDts))

cClientes debes hacerlo igual al alias que desees usar, por ejemplo:

local cClientes := "Clientes"

IF (cClientes)->(DBSEEK(aYDts))
regards, saludos

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

TKS Antonio

Postby Ruben » Fri Mar 07, 2008 7:50 pm

Gracias Antonio ya cambie eso y ya me deja ejecutar mi programa

Solo que ahora tecleo un num de cliente y se brinca al else
User avatar
Ruben
 
Posts: 40
Joined: Wed Feb 20, 2008 5:40 pm
Location: Tampico,Tamps. México

GRACIAS ANTONIO

Postby Ruben » Fri Mar 07, 2008 9:57 pm

Gracias Antonio ya funciona a la perfeccion

Gracias por la ayuda a todos los del foro
User avatar
Ruben
 
Posts: 40
Joined: Wed Feb 20, 2008 5:40 pm
Location: Tampico,Tamps. México


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 44 guests