Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select with memos
Message
De
19/03/2008 11:55:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select with memos
Divers
Thread ID:
01303419
Message ID:
01303419
Vues:
45
I have a table with records that need multiple memo fields to record various data. The memos will record various log information about business contacts to businesses. The user wants to be able to report on the contacts made between specific days (the last 30 days for example). This being the case, I elected to record the memo data in a separate child table with each entry becoming a discrete, dated record. A simple routine will be used to assemble the desired memos into a continuous string for reporting purposes. So far, this all works OK.

Now, we want to access this data via ASP from the web. A SELECT statement might look like this:
lcSQL = "select list_index.name as projectname,"
lcSQL = lcSQL + " list_members.*,"
lcSQL = lcSQL + " sites.name as businessname, "
lcSQL = lcSQL + " alltrim(sites.address) as businessaddress,"
lcSQL = lcSQL + " alltrim(sites.city) + ' ' + alltrim(sites.state) + ' ' + sites.zip as businesscity,"
lcSQL = lcSQL + " sites.*, "
lcSQL = lcSQL + " sites2people.*,"
lcSQL = lcSQL + " alltrim(people.address) as personaddress,"
lcSQL = lcSQL + " alltrim(people.city) + ' ' + alltrim(people.state) + ' ' + people.zip as personcity,"
lcSQL = lcSQL + " people.*, "
lcSQL = lcSQL + " BuildMemo(sites.site_id,'notes_consultant') as notes_consultant "
lcSQL = lcSQL + " from list_index"
lcSQL = lcSQL + " inner join list_members on list_index.list_id = list_members.list_id and list_members.member_type = 'site'"
lcSQL = lcSQL + " inner join sites on list_members.member_id = sites.site_id "
lcSQL = lcSQL + " inner join sites2people on sites.site_id=sites2people.site_id and sites2people.principle=.t."
lcSQL = lcSQL + " inner join people on sites2people.person_id = people.person_id"
lcSQL = lcSQL + " order by list_index.name, sites.name, people.lastname"
The BuildMemo() function creates the string made up of the various memo records that were in the MEMOS table. There are of course CRLFs embedded in the string.

My concern is that the field in the resultant cursor is a character field and I expect the memo string will become too long to fit. So my question is,

"Is there a way to force the result field to be a memo field rather than a character field?"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform