1. put fields into EDB

This is a multi-part message in MIME format.

------=_NextPart_000_00CD_01C1CE03.26471160
	charset="iso-8859-1"

Hello,
If you have 15 fields in your windows EditText fields how do you put them in the
db_insert command?What command?

Jvandal
 

------=_NextPart_000_00CD_01C1CE03.26471160
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2722.2800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2>If you have 15 fields in your windows EditText 
fields how do you put them in the db_insert command?What command?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Jvandal</FONT></DIV>

------=_NextPart_000_00CD_01C1CE03.26471160--

new topic     » topic index » view message » categorize

2. Re: put fields into EDB

This is a multi-part message in MIME format.

------=_NextPart_000_0094_01C1CECC.72A43960
	charset="iso-8859-1"

First, you need to decide what is the Key field. This is one which contains a
unique value for the record you wish to add to the database. No other record in
the table can have the same value.

You might try something like:

   sequence fKey, fData

   fKey = getText(keyid)
   fData = getText(fld1)
   fData = append(fData, getText(fld2))
   fData = append(fData, getText(fld3))
   fData = append(fData, getText(fld4))
   . . . 
   fData = append(fData, getText(fld14))
   fData = append(fData, getText(fld15))

   -- See if record already exists.
   tn = db_find_key(fKey)
   if tn < 0 then
     -- No, so insert it.
     if db_insert(fKey, fData) != DB_OK then
        -- insert failed.
     end if
   else
     -- Yes, so update it.
     db_replace(tn, fData)
   end if


  ----- Original Message ----- 
  From: sixs at ida.net 
  To: EUforum 
  Sent: Monday, March 18, 2002 4:29 PM
  Subject: put fields into EDB



  Hello,
If you have 15 fields in your windows EditText fields how do you put them in
  the db_insert command?What command?

  Jvandal




------=_NextPart_000_0094_01C1CECC.72A43960
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

<!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 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>First, you need to decide what is the Key field. 
This is one which contains a unique value for the record you wish to add to the 
database. No other record in the table can have the same value.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>You might try something like:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp; sequence fKey, fData</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp; fKey = getText(keyid)</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; fData = getText(fld1)</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; fData = append(fData, getText(fld2))</FONT></DIV>
<DIV>
<DIV><FONT size=2>&nbsp;&nbsp; fData = append(fData, getText(fld3))</FONT></DIV>
<DIV>
<DIV><FONT size=2>&nbsp;&nbsp; fData = append(fData, getText(fld4))</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; . . . </FONT></DIV>
<DIV>
<DIV><FONT size=2>&nbsp;&nbsp; fData = append(fData, 
getText(fld14))</FONT></DIV>
<DIV>
<DIV><FONT size=2>&nbsp;&nbsp; fData = append(fData, 
getText(fld15))</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp; -- See if record already exists.</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; tn = db_find_key(fKey)</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; if tn &lt; 0 then</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; -- No, so insert it.</FONT></DIV>
<DIV><FONT size=2>&nbsp; &nbsp;&nbsp;&nbsp;if db_insert(fKey, fData) != DB_OK 
then</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -- insert 
failed.</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; end if</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; else</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; -- Yes, so update it.</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; db_replace(tn, fData)</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; end if</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV></DIV></DIV></DIV></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT:
#000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
<A title=sixs at ida.net href="mailto:sixs at ida.net">sixs at ida.net</A>
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=EUforum at topica.com 
  href="mailto:EUforum at topica.com">EUforum</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, March 18, 2002 4:29 
PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> put fields into EDB</DIV>
  <DIV><BR></DIV><PRE>============ The Euphoria Mailing List ============ 
</PRE>
  <DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
  <DIV><FONT face=Arial size=2>If you have 15 fields in your windows EditText 
  fields how do you put them in the db_insert command?What command?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Jvandal</FONT></DIV>
<DIV><FONT face=Arial
  size=2></FONT>&nbsp;</DIV><PRE>==^================================================================
This email was sent to: <A href="mailto:ddparnell at bigpond.comEASY">ddparnell
at bigpond.com

EASY</A> UNSUBSCRIBE click here: <A
href="http://topica.com/u/?b1dd66.b2mL5y">http://topica.com/u/?b1dd66.b2mL5y</A>
Or send an email to: EUforum-unsubscribe at topica.com

T O P I C A -- Register now to manage your mail!
<A
href="http://www.topica.com/partner/tag02/register">http://www.topica.com/partner/tag02/register</A>

------=_NextPart_000_0094_01C1CECC.72A43960--

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu