Re: Error trying to close EDS database

new topic     » goto parent     » topic index » view thread      » older message » newer message

--------------Boundary-00=_QLEQQL80000000000000
  charset="iso-8859-1"

=0D
 =0D
-------Original Message-------=0D
 =0D
From: EUforum at topica.com=0D
Subject: Re: Error trying to close EDS database=0D
 =0D
=0D
=0D
ronaustin at alltel.net wrote:=0D
=0D
> =0D
>=0D
> The following program allows me to add one record and then blows up =0D
> when I try to add a second record. It says I should look in ex.err, =0D
> which is a 57K file that I don't understand. Does anyone see any =0D
> obvious problems with this program as far as I have got with it?=0D
> =0D
> As you can see, I have not done any error trapping yet, and I have got =
=0D
> to come up with a way to get, display and edit a record, but first I =0D
> am just trying to write out a record.=0D
> =0D
> I used the edb.exw program to look at the database and there is one =0D
> record saved in the Diagnosis table.=0D
> =0D
>=0D
> -- eyediag.exw=0D
>=0D
> -- Diagnosis Code Maintenance=0D
>=0D
> =0D
> include win32lib.ew=0D
>=0D
> include database.e=0D
>=0D
> without warning=0D
>=0D
> integer err=0D
>=0D
> =0D
> constant=0D
>=0D
> Win =3D create( Window, "Diagnosis Code Maintenance", 0, =0D
> Center, Center,350,200,0),=0D
>=0D
> =0D
>=0D
> Lbl1 =3D create(LText,"Code",Win,20,30,60,20,0),=0D
>=0D
> Code =3D create(SleText,"",Win,80,30,42,20,0),=0D
>=0D
> Lbl2 =3D create(LText,"Description",Win,20,80,60,20,0),=0D
>=0D
> Desc =3D create(SleText,"",Win,80,80,248,20,0),=0D
>=0D
> =0D
> Save_Rec =3D create(PushButton, "Save",Win,25,130,80,20,0),=0D
>=0D
> Delete_Pat =3D create(PushButton, "Delete",Win,250,130,80,20,0)=0D
>=0D
> =0D
> -- run code=0D
>=0D
> err=3D db_create("Eye-Comp", DB_LOCK_NO)=0D
>=0D
You should now create your table here...=0D
err =3D db_create_table("Diagnosis")=0D
=0D
> =0D
>=0D
> setWindowBackColor(Win,rgb(0,255,127))=0D
>=0D
> setFocus(Code)=0D
>=0D
> =0D
> procedure Save_Diag(integer self, integer event,sequence parms)=0D
>=0D
> err =3D db_open("Eye-Comp",DB_LOCK_NO)=0D
>=0D
> err =3D db_create_table("Diagnosis")=0D
>=0D
Instead of "db_create_table()," use "db_select_table()."=0D
=0D
This is probably what's causing the problem.=0D
=0D
> err =3D db_insert(getText(Code),getText(Desc))=0D
>=0D
> db_close()=0D
>=0D
> end procedure=0D
>=0D
> =0D
> setHandler(Save_Rec,w32HClick,routine_id("Save_Diag"))=0D
>=0D
> =0D
> WinMain( Win, Normal)=0D
>=0D
>=0D
So I am creating the table more than once.  Would it then be better to wr=
ite
a short install program that would be ran one time to create the database
and all the tables?=0D
=0D
=0D
TOPICA - Start your own email discussion group. FREE!=0D
=0D
=0D
=0D
=0D
=2E=20
--------------Boundary-00=_QLEQQL80000000000000
Content-Type: Text/HTML;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-=
1">
<META content=3D"IncrediMail 1.0" name=3DGENERATOR>
<!--IncrdiXMLRemarkStart>
<IncrdiX-Info>
<X-FID>FLAVOR00-NONE-0000-0000-000000000000</X-FID>
<X-FVER></X-FVER>
<X-CNT>;</X-CNT>
</IncrdiX-Info>
<IncrdiXMLRemarkEnd-->
</HEAD>
<BODY style=3D"BACKGROUND-POSITION: 0px 0px; FONT-SIZE: 12pt; MARGIN: 5px=
 10px 10px; FONT-FAMILY: Arial" bgColor=3D#ffffff background=3D"" scroll=3D=
yes ORGYPOS=3D"0" X-FVER=3D"3.0">
<TABLE id=3DINCREDIMAINTABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100=
%" border=3D0>
<TBODY>
<TR>
<TD id=3DINCREDITEXTREGION style=3D"FONT-SIZE: 12pt; CURSOR: auto; FONT-F=
AMILY: Arial" width=3D"100%">
<DIV><BR>&nbsp;</DIV>
<DIV id=3DIncrediOriginalMessage><I>-------Original Message-------</I></D=
IV>
<DIV>&nbsp;</DIV>
<DIV id=3Dreceivestrings>
<DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>From:</B></I> <A href=3D"m=
ailto:EUforum at topica.com">EUforum at topica.com</A></DIV>
<DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>Date:</B></I> Tuesday, Oct=
ober 14, 2003 12:28:51 AM</DIV>
<DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>To:</B></I> <A href=3D"mai=
lto:EUforum at topica.com">EUforum</A></DIV>
<DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>Subject:</B></I> Re: Error=
 trying to close EDS database</DIV></DIV>
<DIV>&nbsp;</DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailin=
g List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <BR><BR><BR><A href=3D"mailto=
:ronaustin at alltel.net">ronaustin at alltel.net</A> wrote:<BR><BR>&gt; <BR>&g=
t;<BR>&gt; The following program allows me to add one record and then blo=
ws up <BR>&gt; when I try to add a second record. It says I should look i=
n ex.err, <BR>&gt; which is a 57K file that I don't understand. Does anyo=
ne see any <BR>&gt; obvious problems with this program as far as I have g=
ot with it?<BR>&gt; <BR>&gt; As you can see, I have not done any error tr=
apping yet, and I have got <BR>&gt; to come up with a way to get, display=
 and edit a record, but first I <BR>&gt; am just trying to write out a re=
cord.<BR>&gt; <BR>&gt; I used the edb.exw program to look at the database=
 and there is one <BR>&gt; record saved in the Diagnosis table.<BR>&gt; <=
BR>&gt;<BR>&gt; -- eyediag.exw<BR>&gt;<BR>&gt; -- Diagnosis Code Maintena=
nce<BR>&gt;<BR>&gt; <BR>&gt; include win32lib.ew<BR>&gt;<BR>&gt; include =
database.e<BR>&gt;<BR>&gt; without warning<BR>&gt;<BR>&gt; integer err<BR=
>&gt;<BR>&gt; <BR>&gt; constant<BR>&gt;<BR>&gt; Win =3D create( Window, "=
Diagnosis Code Maintenance", 0, <BR>&gt; Center, Center,350,200,0),<BR>&g=
t;<BR>&gt; <BR>&gt;<BR>&gt; Lbl1 =3D create(LText,"Code",Win,20,30,60,20,=
0),<BR>&gt;<BR>&gt; Code =3D create(SleText,"",Win,80,30,42,20,0),<BR>&gt=
;<BR>&gt; Lbl2 =3D create(LText,"Description",Win,20,80,60,20,0),<BR>&gt;=
<BR>&gt; Desc =3D create(SleText,"",Win,80,80,248,20,0),<BR>&gt;<BR>&gt; =
<BR>&gt; Save_Rec =3D create(PushButton, "Save",Win,25,130,80,20,0),<BR>&=
gt;<BR>&gt; Delete_Pat =3D create(PushButton, "Delete",Win,250,130,80,20,=
0)<BR>&gt;<BR>&gt; <BR>&gt; -- run code<BR>&gt;<BR>&gt; err=3D db_create(=
"Eye-Comp", DB_LOCK_NO)<BR>&gt;<BR>You should now create your table here.=
=2E.<BR>err =3D db_create_table("Diagnosis")<BR><BR>&gt; <BR>&gt;<BR>&gt;=
 setWindowBackColor(Win,rgb(0,255,127))<BR>&gt;<BR>&gt; setFocus(Code)<BR=
>&gt;<BR>&gt; <BR>&gt; procedure Save_Diag(integer self, integer event,se=
quence parms)<BR>&gt;<BR>&gt; err =3D db_open("Eye-Comp",DB_LOCK_NO)<BR>&=
gt;<BR>&gt; err =3D db_create_table("Diagnosis")<BR>&gt;<BR>Instead of "d=
b_create_table()," use "db_select_table()."<BR><BR>This is probably what'=
s causing the problem.<BR><BR>&gt; err =3D db_insert(getText(Code),getTex=
t(Desc))<BR>&gt;<BR>&gt; db_close()<BR>&gt;<BR>&gt; end procedure<BR>&gt;=
<BR>&gt; <BR>&gt; setHandler(Save_Rec,w32HClick,routine_id("Save_Diag"))<=
BR>&gt;<BR>&gt; <BR>&gt; WinMain( Win, Normal)<BR>&gt;<BR>&gt;<BR><FONT c=
olor=3D#ff8040>So I am creating the table more than once.&nbsp; Would it =
then be better to write a short install program that would be ran one tim=
e to create the database and all the tables?</FONT><BR>--^---------------=
-------------------------------------------------<BR>This email was sent =
to: <A href=3D"mailto:ronaustin at alltel.net">ronaustin at alltel.net</A><BR><=
BR>EASY UNSUBSCRIBE click here: <A href=3D"http://topica.com/u/?b1dd66.b6=
KEgr.cm9uYXVz">http://topica.com/u/?b1dd66.b6KEgr.cm9uYXVz</A><BR>Or send=
 an email to: <A href=3D"mailto:EUforum-unsubscribe at topica.com">EUforum-u=
nsubscribe at topica.com</A><BR><BR>TOPICA - Start your own email discussion=
 group. FREE!<BR><A href=3D"http://www.topica.com/partner/tag02/create/in=
dex2.html">http://www.topica.com/partner/tag02/create/index2.html</A><BR>=
--^----------------------------------------------------------------<BR><B=
R><BR><BR><BR>. </TD></TR>
<TR>
<TD id=3DINCREDIFOOTER width=3D"100%">
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%">
<TBODY>
<TR>
<TD width=3D"100%"></TD>
<TD id=3DINCREDISOUND vAlign=3Dbottom align=3Dmiddle></TD>
<TD id=3DINCREDIANIM vAlign=3Dbottom align=3Dmiddle></TD></TR></TBODY></T=
--------------Boundary-00=_QLEQQL80000000000000--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu