Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLStringConnect 'String is too long to fit'
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01057057
Message ID:
01057061
Vues:
26
>I'm trying to connect to an ODBC datasource using the SqlStringConnect function, but i'm getting a 1903 error, 'String is too long to fit'.
>
>The connection string is greater than 255 characters, and i have no way of reducing its length. It contains a series of file names including paths and an unlock key which is 128 characters long.
>
>Any ideas how i can still use this function, so i can save myself from having to use oledb, which doesn't appear to have the 255 character restriction on a connection string.
Try this:
TEXT TO mySqlString NOSHOW PRETEXT 1+2+4
     DRIVER=SQL Server;UID=USERNAME;PWD=PASSWORD;
     DATABASE=microcomplex;
     SERVER=SQLSEREVER;
....
ENDTEXT
mySqlString = CHRTRAN(mySqlString,CHR(13)+CHR(10),"")

SQLSTRINGCONNECT(mySqlString)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform