Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01519939
Message ID:
01519952
Vues:
26
>>All variables are character and have valid info, e.g.
>>
>>cDep = 'RETAIL ..'
>>cCat = 'BKCHILD'
>>
>>cItem = 'ALICE '
>>
>>>What types are Variables?
>>>What values are Variables?
>>>
>>>MartinaJ
>>>
>>>>>Hi Naomi,
>>>>>
>>>>>#csrI_Item is name of temporary table (with closing connection, the temporary table close too). Is exists the temporary table?
>>>>>
>>>>>MartinaJ
>>>>>
>>>>That's the point! I'm not closing the connection, the code worked absolutely fine with embedded params. What may be the error now?
>>>>
>>>>Here is the latest code (I moved the second select closer to the first just in case):
>>>>
>>>>TEXT to lcS NOSHOW 
>>>>if object_id('tempdb..#csrI_Item') is not null drop table #csrI_Item
>>>>select * 
>>>>  into #csrI_Item
>>>>  from i_items  
>>>>  where department = ?m.cDep
>>>>  and category = ?m.cCat
>>>>  and item = ?m.cItem
>>>>SELECT * from #csrI_Item
>>>>ENDTEXT  
>>>>
>>>>mysqlexec(m.lcS, 'i_items', PROGRAM())
>>>>
>>>>TEXT to lcS NOSHOW 
>>>>
>>>>select * from i_attlnk WHERE invent_id in (select invent_id FROM #csrI_Item)
>>>>DROP TABLE #csrI_Item
>>>>ENDTEXT  
>>>>mysqlexec(m.lcS, 'i_attlnk', PROGRAM())
>>>>
>>>>So, what may be the problem and why the original code using textmerge and the
<<m.lcDep>>
etc. worked?
>
>Are variables in scope?

Yes, the first query works fine and returns 7 records. The second query that is supposed to access the temp table is failing.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform