Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing very long SQL-Commands to MySQL-Server
Message
 
 
À
26/03/2003 12:53:19
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00770320
Message ID:
00770356
Vues:
14
You can use TextMerge:
SET TEXTMERGE ON
SET TEXTMERGE TO MEMVAR lcQuery NOSHOW

    \INSERT INTO <MiTable>(field1, campo2, campo3 
    \\        campo3, Campo3.... Campo....
    \\       otrocampo, otroCampo
    \\       VALUES (?MyVar,?MyVar2....

SET TEXTMERGE TO
SET TEXTMERGE OFF
lcQuery = STRTRAN(lcQuery, SPACE(2), SPACE(1)) 
Note I should use standar INSERT INTO Table(Fields) VALUES(?MiVar) instead INSERT ... SET.

Hello everybody!

What is the best way to pass very long SQL_Commands to an MY_SQL Server ??
Until now i do like this:

l_command = 'insert into t_table set data1 = "abc",data2= "yxz"..........'
l_ok= SQLEXEC(l_connection,l_command')

If the length of l_commands grows to more then 254 characters,
i split the task in two parts

first insert with keyfields and half of fields, then updating the inserted record with the rest of the fields ??????????

I believe that there must be a better way to handle this!
What about very long and complex select commands, that can't be split??
Any idea welcomedm


Best regards
Albert
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform