• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stored procedure call removes spaces in text

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have written a stored procedure to store some data into a table. The stored procedure contains an insert statement that inserts a new record. There are a number of fields that are of type varchar. When I insert a new record using this stored procedure, all the spaces in the varchar fields are missing. so "how are you today" is stored as "howareyoutoday". Can anyone help me to solve this problem?
I am using SQL Server as my database, the Microsoft JDBC connector for SQL.
This is interesting too.
When I call the stored procedure using the SQL server query analyser, the result is fine. The spaces show properly. Its only when I run the stored procedure through a Java client that the error occurs.
Thanks
Nikhil
[ May 27, 2003: Message edited by: Nikhil Nikhil ]
 
Beauty is in the eye of the tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic