ALIAS not working

Moderator: Rathinagiri

Post Reply
User avatar
arturo_lopesoria
Posts: 29
Joined: Tue Sep 09, 2008 3:05 am
Location: Mexico

ALIAS not working

Post 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
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: ALIAS not working

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: ALIAS not working

Post 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.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: ALIAS not working

Post by mol »

Try to insert

Code: Select all

MsgBox(cFileVGA) 
after instruction:

Code: Select all

GetFile...
You will see if cFileVGA contains whole path to database or only database filename....
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: ALIAS not working

Post by mol »

I'm using aliases and they don't cause any error.
Always worked good
User avatar
arturo_lopesoria
Posts: 29
Joined: Tue Sep 09, 2008 3:05 am
Location: Mexico

Re: ALIAS not working

Post 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
Post Reply