Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor is empty
Message
 
 
À
24/04/2014 06:39:47
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01598937
Message ID:
01598969
Vues:
51
You're not returning a cursor, you're returning a string. You need to get that string.

>Hello comunity
>
>I have the following code, but the result is empty when i select the cursor and do Brow.
>This is my code:
>
>
>Local Msel as String
>Store '' to msel
>
>Text to msel textmerge noshow
>SELECT(
>SELECT top 1
>    1 AS Versao,
>    220 AS coddoc,
>    5 AS tipodoc,
>    'EUR' as codmoeda,
>    c.obrano AS numdoc,
>    c.dataobra AS datadoc,
>    Rtrim(c.nome) AS localentrega,
>    Rtrim(c.morada) AS moradaentrega,
>    Rtrim(c.local) AS loclocalalentrega, 
>    Rtrim(c.codpost) AS codpostentrega,
>    c.datafinal AS dataentrega,
>    c.datafinal AS datalimite,
>    5600000561737 AS glnfornecedor,
>    'Planitoi - Importação e Exportação, S.A.' AS nomefornecedor, 
>    'Zona Ind. do Roligo' AS moradafornecedor,
>    501167323 as ncontfornecedor,
>    cl.glncl as glncliente,
>    cl.ncont AS ncontcliente,
>    Rtrim(c.nome) AS nomecliente,
>    Rtrim(c.morada) AS moradacliente,
>    Rtrim(c.codpost) AS codpostcliente,
>    Rtrim(c.local) AS localcliente,
>    '4524-909' AS codpostfornecedor,
>    (SELECT COUNT(*) FROM bi (nolock) WHERE bi.bostamp = 'SEG13072566466,200000002') AS numlinhas,    
>    (select cl.eancl from cl (nolock) where cl.no = c.no and cl.estab = 0) AS eancliente,
>    5600000561737 AS eanfornecedor,
>    Rtrim(c.obs) AS observacoes,
>    cl.glncl as glnentrega,
>       (
>       SELECT 1 AS Versao,
>	   ROW_NUMBER() OVER (ORDER BY Linh.lordem asc) AS numlinha,
>		  Rtrim(Linh.codigo) AS codean,
>		  Rtrim(Linh.ref) AS refcliente, --rever tem de ser a referencia da TOYS R US	 
>		  Rtrim(Linh.ref) AS referencia,
>		  Rtrim(Linh.design) AS descricao,
>		  Linh.unidad2 AS unidalternativa,
>		  Linh.ettdeb AS precoliquido,
>		  Linh.qtt AS quantidade,
>		  Linh.uni2qtt AS quantalternativa 
>       FROM BI Linh (NOLOCK)
>       WHERE Linh.bostamp = 'SEG13072566466,200000002'
>	  FOR XML PATH('Linhas'),TYPE 
>       ) 
>        
>        FROM bo c (NOLOCK)
>        LEFT JOIN cl (nolock) ON c.no = cl.no AND cl.estab = 0
>       where c.bostamp = 'SEG13072566466,200000002'
>FOR XML PATH('Documento'),ROOT('VFPDATASET'),TYPE) myxml
>Endtext
>
>IF u_sqlexec(msel,[_myCur])
>
>select _myCur
>brow
>
>Else
>msg(msel)
>Endif
>
>
>Could anyone have na idea to solve my problema.
>
>Many thanks
>Luis Santos
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