This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C01F30.74D8B7A8
Content-Type: multipart/alternative;
        boundary="----_=_NextPart_001_01C01F30.74D8B7A8"


------_=_NextPart_001_01C01F30.74D8B7A8
Content-Type: text/plain;
        charset="iso-8859-1"

 
Hi All,
 
*takesdeepbreath*
 
I'm building a cf intranet based holiday reservations system. The bookings
are created in cf Array structures i.e. each booking is composed of
components (car, flights, accom). Each one of these is a structure eg for
car component (car typeid, cost, sale, startdate, enddate etc.). Some of
these component structures then contain arrays eg flight component, a given
flight can contain various nos. of passengers, each of which is in turn
another structure. 
 
My problem is, what is the best way to insert these structures into an SQL
database. The whole structure must be inserted into various related tables
in the database, making sure that the ids all correspond in related tables.
For example when adding flights I need to write flight component record to
database  then write the id of record just written to passengers table when
I write the passengers relating to that flight to the passengers table.
confused yet? 
 
My solution is to use application variables....
 
When I create a new component in cf memory, run 'getnextidfromtable' query
to get next id number from relevant db table. Then store this number in the
newly created component AND store this number plus 1 in an application
variable holding the next id for that table. For subsequent new cf
components created in memory check the existence of the
application.ids.flighttable, if it exists use this number and increment else
run 'getidfromtable' query again.
 
I'm sure there is more than one way to skin this cat, any suggestions
welcome before I walk the rocky road ....
 
Any warnings and advice on record locking issues would be appreciated too.
(30 users).
 
Regards 
 
Rich
 
 
 

------_=_NextPart_001_01C01F30.74D8B7A8
Content-Type: text/html;
        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana size=2>Hi 
All,</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2>*takesdeepbreath*</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana size=2>I'm building a 
cf&nbsp;intranet based holiday reservations system. The bookings are created in 
cf Array structures i.e. each booking is composed of components (car, flights, 
accom). Each one of these is a structure eg for car component (car typeid, cost, 
sale, startdate, enddate etc.). Some of these component structures then contain 
arrays eg flight component, a given flight can contain various nos. of 
passengers, each of which is in turn another structure. </FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana><FONT size=2>My problem 
is, what is the best way to insert these structures into an SQL database. The 
whole structure must be inserted into various related tables in the database, 
making sure that the ids all correspond in related tables. For example when 
adding flights I need to write flight component record to database&nbsp; then 
write the id of record just written to&nbsp;passengers table when I write the 
passengers relating to that flight to the passengers table. confused yet?<SPAN 
class=020250716-15092000> </SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana size=2>My solution is to 
use application variables....</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana size=2>When I create a 
new component in cf memory, run 'getnextidfromtable' query to get next id number 
from relevant db table. Then store this number in the newly created component 
AND store this number plus 1 in an application variable holding the next id for 
that table. For subsequent new cf components created in memory check the 
existence of the application.ids.flighttable, if it exists use this number and 
increment else run 'getidfromtable' query again.</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana size=2>I'm sure there is 
more than one way to skin this cat, any suggestions welcome before I walk the 
rocky road ....</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana size=2>Any warnings and 
advice on record locking issues would be appreciated too. (30 
users).</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana size=2>Regards 
</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2>Rich</FONT></SPAN></DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=860081115-15092000><FONT face=Verdana 
size=2></FONT></SPAN>&nbsp;</DIV></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C01F30.74D8B7A8--

------_=_NextPart_000_01C01F30.74D8B7A8
Content-Type: application/octet-stream;
        name="Richard Moger (E-mail).vcf"
Content-Disposition: attachment;
        filename="Richard Moger (E-mail).vcf"

BEGIN:VCARD
VERSION:2.1
N:Moger;Richard
FN:Richard Moger (E-mail)
ORG:James Villa Holidays Ltd
TITLE:IT Manager
TEL;WORK;VOICE:+44 (01732) 840846
TEL;CELL;VOICE:+44 (0777) 953 8192
TEL;WORK;FAX:+44 (01732) 872093
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Regents Court=0D=0ALondon 
Road;Addington;Kent;ME19 5PL;United Kingdom
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Regents Court=0D=0ALondon Road=0D=0AAddington, 
Kent ME19 5PL=0D=0AUnited Kin=
gdom
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20000707T003119Z
END:VCARD

------_=_NextPart_000_01C01F30.74D8B7A8--
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to