Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql Statement to long with , what to do ?
Message
De
14/09/2001 13:23:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00556564
Message ID:
00556629
Vues:
17
Might be. I just tried q163800 and it doesn't produce error. I even added more providing the sixth field. I also tested it under VFP6 and VFP5. Both succeeded (SQLserver 2000 but I don't think as the source of problem).
Te only thing I changed in sample was breaking the continuation lines. ie: In sample it was :
b=SQLEXEC(handle, "INSERT INTO t255 (one,two,three,four,five) ;
     VALUES('abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
     'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
     'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
     'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', + ;
     'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw')")
* And I made
   b=SQLEXEC(lnhandle, "INSERT INTO t2551 (one,two,three,four,five,six) " +;
     "VALUES('abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+;
     "'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
     "'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
     "'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
     "'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw', "+ ;
     "'abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw')")
Didn't try the other way.
Cetin

>I think Luis is trying to update/insert a long text into memofield and there's limit of 255 characters for string literal.
>
>>I don't know too. I send very long ones, they select, execute, create proc etc and all works (VFP6 SP5). Might there be a fix because I learned it can happen reading Q163800. I never experienced it on either VFP or SQL server sources.
>>Cetin
>>
>>>I wonder how this 255 char max really works. I have sent twice as much more than than and never had any problems
>>>
>>>I use :
>>>
>>>lOra="SELECT..............."
>>>lOra=lOra +"FROM ........................"
>>>lnResult=SQLEXEC(lnHandle,lOra,'TABLE1')
>>>
>>>
>>>>>Hello Everybody!
>>>>>I am using SQL pass through to update and insert records in a SQL Server 7.0 database. I build a SQL string and then I do something like :
>>>>>
>>>>>lnResult=SQLEXEC(lnHandler,lcMySQLString,"CursorName")
>>>>>
>>>>>but is not executing because my lcMySQLString is more than 255 characters, what to do ?
>>>>>
>>>>>=THIS.Thanks("in advance")
>>>>
>>>>Luis,
>>>>Maybe it's something else. I send very long strings to SQL server and works.
>>>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform