Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dealing with SQL Server Text Field
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00461932
Message ID:
00461959
Vues:
15
How you pass it to the INSERT/Update statement? When I work with SPT cursor or view with memo field, it works ok. You can try following:

select 0
CREATE CURSOR MyTemporeryCursor (MyMemo M)
append blank
replace MyMemo with thisform.MyMemoTextProperty

SQLEXEC(thisform.nHandle, 'UPDATE MyTable SET MyMemoField = ?MyMemo'

In last command data will be taken from MyMemo field of cursor. Above guarantee 'Memo' data type that is required for updating data for text field type on the SQL Server. When you pass parameter as Character, it just truncates it to 255 characters as for usual VFP character field.





>I have a text field in the sql table.
>In vfp6, I've got a form with an edit box for the user to input a long string of data. Then I use SPT to Insert or Update the SQL Table. As long as the text in the edit box is only about 20 characters long or less, it works great. But other than that the sqlexec() statement returns -1 with the following error message:
>"Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated."
>
>Any help greatly appreciated.
>
>P.S. I don't know if it matters, but on the form I store the text in a form variable and the form variable is the control source for the edit box. I then pass that form variable in the Insert/Update statement.
>
>Thanks
>Kirk
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform