Data base fields with spaces

Results 1 to 2 of 2

Thread: Data base fields with spaces

  1. #1
    Join Date
    Dec 1969

    Default Data base fields with spaces

    I am using ASP with an Access data base. I have a file maintenance program to add, change, and delete records into the data base. If I enter a field that has spaces in the middle of the field (such as an item description of: "Big Blue Ball"), when I recall the record in the change mode, the field is missing all characters after the first space. In my example, the field that contained "Big Blue Ball" then contains only "Big". I am reading and writing to the data base with a connection object and a record set object. After finding the record I use the code: <BR><BR>FullDescription = rs("ItemDescription").value . <BR><BR><BR><BR>The full code looks like this:<BR><BR>IndexField = CompID + ItemNumber <BR>sql = "Select * From IN000 WHERE IN000Index = &#039;" & IndexField & "&#039;" <BR>set rs = Server.CreateObject ("ADODB.RecordSet") &#039; Create Rec Set Object<BR> rs.Open sql, conn, StaticForwardOnly, ReadOnlyLock, SQLisTEXT<BR> &#039; 0 = Static, Forward Only<BR> &#039; 1 = ReadOnlyLock<BR> &#039; 1 = sql statment is a text statement<BR> If rs.EOF then RecordFound = "no"<BR><BR>If RecordFound = "yes" then<BR> &#039;Get Data from record set<BR> <BR> FullDescription = rs.fields("FullDescription").value <BR> ShortDescription = rs.fields("ShortDescription").value <BR> StockingUnits = rs.fields("StockingUnits").value <BR> PurchaseUnits = rs.fields("PurchaseUnits").value <BR><BR>etc, etc<BR><BR><BR><BR>Thanks, Jack Michael

  2. #2
    Join Date
    Dec 1969

    Default RE: Data base fields with spaces

    When you are pulling this out of your DB in the first recordset, is it THERE that it&#039;s missing the rest of the "words"? <BR>FullDescription = rs("ItemDescription").value <BR><BR>So when you Response.Write you only get the first word? <BR><BR>Or is this later in the second sql query? what is your sql string like after Response.Writing it?<BR><BR>Vadim C.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts