Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String is Too Long To Fit

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,
How do I trim the field value for "description"? The data is coming from a RV using VFPA with MSSQL as backend. The field length of description is 512 chars as nvarchar(512). The actual error is "String is too long to fit"

This code works.
Code:
Open Database "EFIR.DBC"
Select Pk, Type, Description ;
	FROM "RV_DOCTYPE" ;
	WHERE Systemid = 'abc';
	INTO Cursor webwizard_query

Select Pk, Type, Description, OK
Select Pk, Type, alltrim(Description), FAILS
Select Pk, Type, trim(Description), FAILS
Select Pk, Type, left(Description, 256) FAILS
Select Pk, Type, left(Description, 254) OK
Select Pk, Type, allt(strconv(Description, 6)) FAILS
Select Pk, Type, alltrim(Description) as Desc1, FAILS

Thanks,
Stanley

 
Thanks Tore,

I was aware and looks like they are doing the real thing this time, instead of virtual. I attended the one in Gilbert and several at Whil's location in Milawakee. They have been very helpful, but not to the tune of what Olaf and Chris knows. Light years ahead of me. I wish I was 40 years younger for many reasons, and this being one.

I have been trying for a while to get Chris's and Olaf's secrets of how they have acquired so much knowledge about VFP and many other related topics. Were they part of Microsoft's Fox team, which would explain a lot and Chris keeps dodging the question. I know he wants us to know as he spends a lot of time explaining how to deal with our silly issues. But then again, if he tells and empowers us, he may feel not needed. I know some people like that. Just kidding Chris about the not needed part. I've learned a lot from him. At times he is so far over my head, the time I have doesn't permit me to throw out all I know and relearn, therefore I keep trying to make what I know work, and I know this aggravates him. I do not do this intentionally, as many times I don't have the luxury to stop everything and relearn, even though I should.

Thanks Tore and Chriss
Stanley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top