Results 1 to 5 of 5

Thread: More FoxPro questions

  1. #1
    Guest
    About a month ago, I wrote asking for some help with
    FoxPro and ADO 2.5. I am having trouble with INSERTs
    over 255 characters and also with transactions.

    Some kind soul recommended linking my FoxPro tables into
    Access and using Jet engine to access them. I would
    appreciate any pointers into how to do this from that
    kind soul.

    Sincerely,
    Erik Shepard

  2. #2
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Sudbury, Ontario, Canada
    Posts
    274
    I know Visual FoxPro has a memo field if FoxPro has it use it in your database for fields over 255 chars. As for Transactions I'm not sure if FoxPro supports them.

  3. #3
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Sudbury, Ontario, Canada
    Posts
    274
    This is pretty odd. I posted a reply to your problem only to come across the same problem a few months later.

    I was wondering if you solved the memo problem of 255 chars or more. If so could you please help me out.

    My problem is that I can't add over 255 characters to a memo field.

    Thanks

  4. #4
    Guest
    The problem that I had was with using SQL to update a
    MEMO field with a text string over 255 characters; the
    text string would be truncated. The solution that I
    finally went with was to use a recordset (or persist
    the recordset that I retrieved the data with in the first
    place). It appeared to work fine to write the 255+
    character string to recordset field and then update back
    to the table rather than using SQL to directly update the
    table.

    Good luck,
    Erik

  5. #5
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Sudbury, Ontario, Canada
    Posts
    274
    What a piece of crap.

    I got it working, it's not exactly what I wanted but it does the job.

    Thanks.

    Code:
        Set rstTemp = New ADODB.Recordset
        rstTemp.Open "transtable", fCnn1, adOpenStatic, adLockOptimistic, adCmdTable
        
        With rstTemp
            .AddNew
            lngI = 0
            lngSize = Len(strQuery)
            Do While lngI < lngSize
                strChunk = Left(Right(strQuery, lngSize - lngI), 255)
                !querystring.AppendChunk strChunk
                lngI = lngI + 255
            Loop
            !querydate = Now
            !region = strRegion
            !id = lngID
            .Update
        End With

Posting Permissions

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



Click Here to Expand Forum to Full Width