Page 1 of 1
ALIAS not working
Posted: Wed Sep 23, 2009 9:52 pm
by arturo_lopesoria
I think is a bug:
I was probed it with V.2.9.3 & V2.9.4
Code: Select all
cFileGVA := GetFile( , "Archivo de Articulos" , "c:\" , .f., .f. )
if empty(cFileGVA)
return .f.
endif
use (cFileGVA) alias ARTICS
if !used()
msginfo("no se abrio;"+cFileGVA)
return .f.
endif
select ARTICS // AQUI MARCA ERROR ALIAS DOES NOT EXIST ARTICS
I was probed this way too:
Code: Select all
dbUseArea( .T., "DBFCDX", cFileGVA, "ARTICS", lShared, lReadOnly )
EN ESTE ULTIMO CASO MARCA ERROR DE ARGUMENTO
Re: ALIAS not working
Posted: Thu Sep 24, 2009 12:35 am
by Roberto Lopez
arturo_lopesoria wrote:I think is a bug:
I was probed it with V.2.9.3 & V2.9.4
Code: Select all
cFileGVA := GetFile( , "Archivo de Articulos" , "c:\" , .f., .f. )
if empty(cFileGVA)
return .f.
endif
use (cFileGVA) alias ARTICS
if !used()
msginfo("no se abrio;"+cFileGVA)
return .f.
endif
select ARTICS // AQUI MARCA ERROR ALIAS DOES NOT EXIST ARTICS
I was probed this way too:
Code: Select all
dbUseArea( .T., "DBFCDX", cFileGVA, "ARTICS", lShared, lReadOnly )
EN ESTE ULTIMO CASO MARCA ERROR DE ARGUMENTO
In the case that the problem be verified, it will be (eventually) a Harbour compiler bug.
MiniGUI library is not related with dbf handling at all.
Regards,
Roberto.
Re: ALIAS not working
Posted: Thu Sep 24, 2009 12:55 am
by luisvasquezcl
Hola Arturo:
¿verificaste si getfile() devuelve el archivo con el path completo?
otra cosa ... creo que el último parametro de la funcion dbusearea 'lreadonly' no se necesita ya que si abres la tabla y en el control donde la muestras los registros no permites que se edite, no podran hacer nada
.
saludos cordiales,
Luis Vasquez.
Re: ALIAS not working
Posted: Thu Sep 24, 2009 6:46 pm
by mol
Try to insert
after instruction:
You will see if cFileVGA contains whole path to database or only database filename....
Re: ALIAS not working
Posted: Thu Sep 24, 2009 6:47 pm
by mol
I'm using aliases and they don't cause any error.
Always worked good
Re: ALIAS not working
Posted: Thu Sep 24, 2009 8:06 pm
by arturo_lopesoria
Excuse me
First I was thinking it was a harbour bug, but now Im sure there is an error on my code..
I put same code in a single program and ALIAS is working fine.. Sorry.
Thanks all of you for your ideas and support..
Saludos desde Mexico.
Arturo LS