Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored procedures and the 26 parameters limit
Message
 
 
À
15/02/2005 11:28:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00976697
Message ID:
00987092
Vues:
51
This message has been marked as a message which has helped to the initial question of the thread.
Hi David,

In order to preserve binary data in the memo field it has to be MEMO/BINARY. Try
CREATE CURSOR test (id i, txt MEMO NOCPTRANS)
INSERT INTO Test VALUES (1, "abs" + CHR(13)+CHR(10)+ "ggj" + CHR(13)+CHR(10) + "asewiof")
lcXml = ""
? CURSORTOXML(ALIAS(),"lcXml",1,0,0,"1")
? XMLTOCURSOR(lcXml, "test1")
>I just wanted to come back at this one, and say that after a lot of surprises and of hard work, the XML solution WORKED ! Thank you again for your suggestion.
>For the moment I opted for the suboptimal solution of using CURSORTOXML() after creating a lot of cursors, depending of the type and size of the parameters. Then the call to a VFP stored procedure is replaced by a call to a special stored procedure, which takes as parameters the XML strings and the name of the stored procedure. Each stored procedure has dictionary entries stating its parameters names, hence the parameters passed through XML can be matched. This allows both to work around the 26 parameters limit and to pass parameters by name instead of by position.
>Still to do are :
>- Finishing the code parser which will analyze the stored procedure code found in the data dictionary to fill user dictionary tables with the procedure names and parameters.
>- Improving the performance.
>- Understanding how to have XMLTOCURSOR() correctly restore texts with carriage returns in them. Any idea ?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform