PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Trim Field
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Trim Field

Réponse
 
LinkBack Outils de la discussion
Vieux 02/09/2008, 16h45   #1
Sash
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Trim Field

I have a SQL Server database as a back-end to an application built in Access.
My description field is set to 50 and if the users key's in a 10 character
description, the remaining become spaces. What would be the best way around
this? I tried putting =RTrim([Description]) on my form, but it didn't work,
so I'm thinking i need to do something on the SQL Server side.

Any suggestions would be greately appreciated!
  Réponse avec citation
Vieux 02/09/2008, 16h54   #2
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Trim Field

It is difficult to say for sure since we don't know whether the spaces comes from SQL server or from
the client app (your Access app). However, a start is to verify that you have varchar or nvarchar,
not char or nchar.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Sash" <Sash@discussions.microsoft.com> wrote in message
news:4DF23C0B-E0A4-42E2-8205-6A4ED6AD5200@microsoft.com...
>I have a SQL Server database as a back-end to an application built in Access.
> My description field is set to 50 and if the users key's in a 10 character
> description, the remaining become spaces. What would be the best way around
> this? I tried putting =RTrim([Description]) on my form, but it didn't work,
> so I'm thinking i need to do something on the SQL Server side.
>
> Any suggestions would be greately appreciated!



  Réponse avec citation
Vieux 02/09/2008, 17h10   #3
Sash
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Trim Field

My ignorance. It the field was a char. Changed to varchar and it's perfect!

"Tibor Karaszi" wrote:

> It is difficult to say for sure since we don't know whether the spaces comes from SQL server or from
> the client app (your Access app). However, a start is to verify that you have varchar or nvarchar,
> not char or nchar.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
>
> "Sash" <Sash@discussions.microsoft.com> wrote in message
> news:4DF23C0B-E0A4-42E2-8205-6A4ED6AD5200@microsoft.com...
> >I have a SQL Server database as a back-end to an application built in Access.
> > My description field is set to 50 and if the users key's in a 10 character
> > description, the remaining become spaces. What would be the best way around
> > this? I tried putting =RTrim([Description]) on my form, but it didn't work,
> > so I'm thinking i need to do something on the SQL Server side.
> >
> > Any suggestions would be greately appreciated!

>
>
>

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 08h07.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09939 seconds with 11 queries