Date:  03/27/2011 06:19:51 PM Msg ID:  004264
From:  Carlos Fuertes Thread:  004259
Subject:  Re: Error 12. No se encuentra la variable \".
OK, I will change the macro substitution in every script and see what happens.
 
The code is is a FWX file
 
Thanks once more 
Sent by FoxWeb Support on 03/27/2011 03:19:15 PM:
I really don't know what the problem could be, but I recommend that you get rid of the macro substitution for the table path. It's better to use a string within parantheses, as follows:
 
INSERT INTO (wcEspPath + "\Partes.dbf") (Parte_num, ...
 
In addition to the performance improvement, this change may make it easier to troubleshoot the problem.
 
By the way, is this code in a PRG, or FWX file?
 
FoxWeb Support Team
support@foxweb.com email
Sent by Carlos Fuertes on 03/27/2011 07:17:17 AM:
Sorry, I didn't include it in the list, but it exist and it is active:
 
WCESPPATH            Priv      C     "C:\MANTASIS\DATA0006"  cont_edit
 
It keeps the path to the table.
 
The number of the error line is the last of the SQL Sentence:
 
 pcContrato_num,pcLote,pnFacturar,pcRefFactu,pcClave,pnNumero,pnOrden,pcPreventivo,pcCBShort,pnK_des,pnK_die,pnK_mat,pnK_mo,pnKglobal)  
 
Tankyou very much for your help!
 
Carlos 
Sent by FoxWeb Support on 03/26/2011 10:19:56 PM:
What about wcEspPath? I don't see this variable defined in the list. 
FoxWeb Support Team
support@foxweb.com email
Sent by Carlos Fuertes on 03/26/2011 09:26:29 AM:
I have a script that usually works fine, but in a random basis returns an Error 12 No se encuentra la variable ". (The translation into english should be: The variable ". is not found)
 
The line of the script shown is part of a SQL INSERT sentence:
 
INSERT INTO &wcEspPath.\Partes.dbf (Parte_num,Numusuario,Centro_id,Cliente_id,Referencia,Edificio,Departam,Fecha_part,Hora_part,Avería,Persona,;
                   Tipo_parte,Tomado,Encurso,Prioridad,Telefono,Divisa,Mantenedor,Especialid,Urgencia,Tipocentro,Contrato_num,Lote,Facturar,Ref_factu,Equipo,;
                   Número,órden,preventivo,cbshort,K_des,K_die,K_mat,K_mo,Kglobal);
VALUES (VAL(M.ParteNum),VAL(M.Numusuario),M.Centro_id,M.Cliente_id,M.Referencia,M.Edificio,M.Departam,CTOD(M.Fecha),M.Hora,M.Averia,;
             M.Persona,M.Tipo,M.Tomado,IIF(M.Encurso="Si",.T.,.F.),VAL(M.prioridad),M.Telefono,M.Divisa,M.Mantenedor,M.Oficio,M.Urgencia,M.Tipocentro,;
             pcContrato_num,pcLote,pnFacturar,pcRefFactu,pcClave,pnNumero,pnOrden,pcPreventivo,pcCBShort,pnK_des,pnK_die,pnK_mat,pnK_mo,pnKglobal) 
 
I have checked the memory variables at the moment of the error in Fxadmin.fwx and I can see all the variables included in VALUES are active and OK. Following is the list of variables ordered.  
 
PARTENUM  Local     C     "       350"  cont_edit
NUMUSUARIO           Local     C     ""  cont_edit
CENTRO_ID            Local     C     "HAB126"  cont_edit
CENTRO                Local     C     "HABITACION 126                                                                  "  cont_edit
CLIENTE_ID            Local     C     "BIRDIESH  "  cont_edit
REFERENCIA            Local     C     ""  cont_edit
EDIFICIO              Local     C     ""  cont_edit
DEPARTAM              Local     C     ""  cont_edit
FECHA                  Local     C     "23/03/2011"  cont_edit
HORA                  Local     C     "10:55:04"  cont_edit
AVERIA                Local     C     "pierde aguaEquipo: ALCACHOFA DE DUCHA"  cont_edit
PERSONA                Local     C     "ROSARIO GUTIERREZ                                                               "  cont_edit
TIPO                  Priv       C     "C"  cont_edit 
TOMADO               Local     C     "Enviado por Internet"  cont_edit
ENCURSO                Local     C     "Si"  cont_edit
PRIORIDAD            Local     C     "1"  cont_edit
TELEFONO              Priv       C     ""  cont_edit
DIVISA                Local     C     "EURO"  cont_edit 
MANTENEDOR           Priv        C     "0001"  cont_edit
OFICIO               Priv         C     "001"  cont_edit 
URGENCIA             Local      C     "f"  cont_edit
TIPOCENTRO           Local      C     "C"  cont_edit 
PCCONTRATO_NUM  Priv       C     "               "  cont_edit
PCLOTE               Priv       C     "        "  cont_edit
PNFACTURAR            Priv       N     0                                                 (              0,00000000)  cont_edit
PCREFFACTU            Priv       C     "HAB12632011"  cont_edit
PCCLAVE               Priv       C     "DUCHA"  cont_edit
PNNUMERO             Priv       N     1                                                 (              1,00000000)  cont_edit
PNORDEN               Priv       N     1                                                 (              1,00000000)  cont_edit
PCPREVENTIVO        Priv       C     "HAB126  DUCHA001001"  cont_edit
PCCBSHORT             Priv       C     "0000002049"  cont_edit
PNK_DES               Priv       N     0,00                                              (              0,00000000)  cont_edit
PNK_DIE               Priv       N     0,00                                              (              0,00000000)  cont_edit
PNK_MAT               Priv       N     0,00                                              (              0,00000000)  cont_edit
PNK_MO               Priv       N     0,00                                              (              0,00000000)  cont_edit
PNKGLOBAL             Priv       N     0,00                                              (              0,00000000)  cont_edit
 
Any idea about why I get that error message?
 
Thankyou very much in advance
 
Carlos