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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trimming fields in remote views with SQL Server backend

Status
Not open for further replies.

ganj

IS-IT--Management
Nov 3, 2001
19
AT
I have a remote view. The user performs some edits, changes are sent to the backend which is SQL Server 2000.
The remote view is bound to a VFP grid.

Now the surprise: the data on the SQL server shows all character columns padded with space char (asc 32) to the column size. How can I prevent this from happening? I tried set ANSI_PADDING on / off, but no change.

VFP6-sp5, SQL 2000, W2K Prof sp3

tia, joga


 
You are kind of stuck with it. Since VFP does not have a varchar type the remote view converts all varchar fields less than 256 characters long to a character field of the maximum width of the varchar field.

On long varchars > 255 the field is converted to a memo field which does not pad the characters (as far as I know).

I tend to just live with it.

One thing you could do is put an update/insert trigger on the server side that replaces the fields with the rtrim() of the field, but I would suspect it would not be worth the trouble.

You could also code your inserts and updates using sql execs and/or stored procs on the server side reather than using remote view. Again IMHO not worth the trouble.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top