Converting VFP memo fields to SQL Server text fields 
Author Message
 Converting VFP memo fields to SQL Server text fields

Our VFP application makes rather liberal use of memo fields. For example,
we have an objects table with 25 memo fields in it. We're now attempting
to upsize this application to SQL Server. I see that there are two
datatypes for handling character strings in SQL Server that might be
useful:

1. varchar -- for text strings up to 255 characters

2. text -- for handling variable length text strings; a mimimum of 2K is
allocated for each string

It would appear that the text datatype is the best for our application
because the length of the text strings entered is highly variable. But the
prospect of having records that are a minimum of 50K (25 fields * 2K)
looks like real bad news.

I've been thinking about creating a single text field and placing all the
character string contents in it. In other words, I'd concatenate all the
memo fields' contents together and place them after an index/jump table of
some sort. Before I go to this extreme, though, I was wondering if anyone
here had any other better ideas. Is there some sort of technique that I'm
overlooking?

Geoff LeBlond
Re:discovery Software



Mon, 13 Sep 1999 03:00:00 GMT
 Converting VFP memo fields to SQL Server text fields



Quote:
> Our VFP application makes rather liberal use of memo fields. For example,
> we have an objects table with 25 memo fields in it. We're now attempting
> to upsize this application to SQL Server. I see that there are two
> datatypes for handling character strings in SQL Server that might be
> useful:

> 1. varchar -- for text strings up to 255 characters

> 2. text -- for handling variable length text strings; a mimimum of 2K is
> allocated for each string

> It would appear that the text datatype is the best for our application
> because the length of the text strings entered is highly variable. But
the
> prospect of having records that are a minimum of 50K (25 fields * 2K)
> looks like real bad news.

> I've been thinking about creating a single text field and placing all the
> character string contents in it. In other words, I'd concatenate all the
> memo fields' contents together and place them after an index/jump table
of
> some sort. Before I go to this extreme, though, I was wondering if anyone
> here had any other better ideas. Is there some sort of technique that I'm
> overlooking?

Hi Geoff,

I've been going through this problem with just 1 text field.  I can't
imagine having 25!  What I've decided to do was use multiple varchar(255)
fields to emulate a memo field on the vfp side.  There is some extra work
required in order to split the text coming from vfp into multiple character
strings of max length of 255.  You also have to combine the multiple
varchars
once you get them into vfp.  Another limitation of course is a fixed
length.
We just decided that 3 varchar (255) would be more than enough. The space
saved is incredible.

HTH

--
                        _
-------------------ooO-( )-Ooo---------------------------------

                       ~~~



Fri, 17 Sep 1999 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Converting Memo fields back to Text fields

2. Converting FOX Memo Field to Oracle CLOB field using SQL

3. How to convert/copy memo field to text ?

4. converting alpha field to memo fields

5. I'm having trouble inserting text in a memo field in SQL Server 6.5

6. Putting Text with Apostrophe into SQL Server Memo Field

7. PROBLEMS INSERTING MEMO FIELDS FROM TABLE FIELD TO TEXT FILE

8. Converting Memos/Memo fields

9. Please help!!Convert text field to date field(newbie)

10. Converting TEXT field to CHAR(5000) field

11. Converting calc field to text field w/o losing data

12. SQL Query problem concat text field from mulitple rows into one text field


 
Powered by phpBB® Forum Software