1. Error trying to close EDS database
- Posted by ronaustin at alltel.net Oct 14, 2003
- 519 views
--------------Boundary-00=_E8CQQL80000000000000 charset="iso-8859-1" The following program allows me to add one record and then blows up when = I try to add a second record. It says I should look in ex.err, which is a = 57K file that I don't understand. Does anyone see any 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 to come up with a way to get, display and edit a record, but first I 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 recor= d saved in the Diagnosis table.=0D =0D -- eyediag.exw=0D -- Diagnosis Code Maintenance=0D =0D include win32lib.ew=0D include database.e=0D without warning=0D integer err=0D =0D constant=0D Win =3D create( Window, "Diagnosis Code Maintenance", 0, Center, Center,350,200,0),=0D =0D Lbl1 =3D create(LText,"Code",Win,20,30,60,20,0),=0D Code =3D create(SleText,"",Win,80,30,42,20,0),=0D Lbl2 =3D create(LText,"Description",Win,20,80,60,20,0),=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 Delete_Pat =3D create(PushButton, "Delete",Win,250,130,80,20,0)=0D =0D =0D =0D -- run code=0D err=3D db_create("Eye-Comp", DB_LOCK_NO)=0D =0D setWindowBackColor(Win,rgb(0,255,127))=0D setFocus(Code)=0D =0D procedure Save_Diag(integer self, integer event,sequence parms)=0D err =3D db_open("Eye-Comp",DB_LOCK_NO)=0D err =3D db_create_table("Diagnosis")=0D err =3D db_insert(getText(Code),getText(Desc))=0D db_close()=0D end procedure=0D =0D setHandler(Save_Rec,w32HClick,routine_id("Save_Diag"))=0D =0D =0D WinMain( Win, Normal) =0D =20 --------------Boundary-00=_E8CQQL80000000000000 Content-Type: Text/HTML; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <HTML xmlns:o =3D "urn:schemas-microsoft-com:office:office"><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; SCROLLBAR-FACE-COLOR: #ebeae= a; FONT-SIZE: 12pt; MARGIN: 5px 10px 10px; SCROLLBAR-HIGHLIGHT-COLOR: #ae= aaaa; SCROLLBAR-SHADOW-COLOR: #a9a7a7; SCROLLBAR-3DLIGHT-COLOR: #e5e5e5; = SCROLLBAR-ARROW-COLOR: #875b38; FONT-FAMILY: Arial; SCROLLBAR-DARKSHADOW-= COLOR: #545252" bgColor=3D#ffffff background=3D"" scroll=3Dyes 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>The following program allows me to add one record and then blows up = when I try to add a second record. It says I should look in ex.err,= which is a 57K file that I don't understand. Does anyone see any o= bvious problems with this program as far as I have got with it?</DIV> <DIV> </DIV> <DIV>As you can see, I have not done any error trapping yet, and I have g= ot to come up with a way to get, display and edit a record, but first I a= m just trying to write out a record.</DIV> <DIV> </DIV> <DIV>I used the edb.exw program to look at the database and there is one = record saved in the Diagnosis table.</DIV> <DIV> </DIV> <DIV> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt; tab-stops: 63.0pt">= <SPAN style=3D"mso-fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT= face=3D"Courier New">-- eyediag.exw<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">-- Diagnosis Code Maintenance<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"> <o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">include win32lib.ew<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">include database.e<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">without warning<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">integer err</FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"> <o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">constant<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>Win<SPAN s= tyle=3D"mso-spacerun: yes"> </SPAN>=3D<SPAN style= =3D"mso-spacerun: yes"> </SPAN>create( Window, "Diagnosis Code Main= tenance", 0, Center, Center,350,200,0),<o:p></o:p></FONT></FONT></SPAN></= P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> = &= nbsp; </SPAN><SPAN style=3D"mso-spacerun: yes"> </= SPAN><o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>Lbl1 =3D c= reate(LText,"Code",Win,20,30,60,20,0),<o:p></o:p></FONT></FONT></SPAN></P= > <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>Code =3D c= reate(SleText,"",Win,80,30,42,20,0),<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>Lbl2 =3D c= reate(LText,"Description",Win,20,80,60,20,0),<o:p></o:p></FONT></FONT></S= PAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>Desc =3D c= reate(SleText,"",Win,80,80,248,20,0),<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p= ></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p= ></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>Save_Rec =3D= create(PushButton, "Save",Win,25,130,80,20,0),<o:p></o:p></FONT></FONT><= /SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>Delete_Pat= =3D create(PushButton, "Delete",Win,250,130,80,20,0)<o:p></o:p></FONT></= FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p= ></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p= ></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-tab-count: 1"> </SPAN= ><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p><= /FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">-- run code<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>err=3D db_create= ("Eye-Comp", DB_LOCK_NO)<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p></FON= T></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>setWindowBackCol= or(Win,rgb(0,255,127))<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>setFocus(Code)<o= :p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p></FON= T></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><SPAN styl= e=3D"mso-spacerun: yes"> </SPAN>procedure Save_Diag(integer self, in= teger event,sequence parms)<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><SPAN style=3D"mso-tab= -count: 1"> </SPAN><SPAN style=3D"mso-spacerun: yes">&n= bsp; </SPAN>err =3D db_open("Eye-Comp",DB_LOCK_NO)= <o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><SPAN style=3D"mso-tab= -count: 1"> </SPAN><SPAN style=3D"mso-spacerun: yes">&n= bsp; </SPAN>err =3D db_create_table("Diagnosis")<o= :p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><SPAN style=3D"mso-tab= -count: 1"> </SPAN><SPAN style=3D"mso-spacerun: yes">&n= bsp; </SPAN>err =3D db_insert(getText(Code),getTex= t(Desc))<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><SPAN style=3D"mso-tab= -count: 1"> </SPAN><SPAN style=3D"mso-spacerun: yes">&n= bsp; </SPAN>db_close()<o:p></o:p></FONT></FONT></S= PAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN>end = procedure<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-tab-count: 1"> </SPAN= ><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p></FONT>= </FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><SPAN style=3D"mso-spac= erun: yes"> </SPAN>setHandler(Save_Rec,w32HClick,routine_id("= Save_Diag"))<o:p></o:p></FONT></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></FO= NT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w"><SPAN style=3D"mso-spacerun: yes"> </SPAN><o:p></o:p></FON= T></FONT></SPAN></P> <P class=3DMsoPlainText style=3D"MARGIN: 0in 0in 0pt"><SPAN style=3D"mso-= fareast-font-family: 'MS Mincho'"><FONT size=3D2><FONT face=3D"Courier Ne= w">WinMain( Win, Normal) <o:p></o:p></FONT></FONT></SPAN></P></DIV> <DIV> </DIV></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=_E8CQQL80000000000000--
2. Re: Error trying to close EDS database
- Posted by "C. K. Lester" <euphoric at cklester.com> Oct 14, 2003
- 528 views
ronaustin at alltel.net wrote: > > > The following program allows me to add one record and then blows up > when I try to add a second record. It says I should look in ex.err, > which is a 57K file that I don't understand. Does anyone see any > obvious problems with this program as far as I have got with it? > > As you can see, I have not done any error trapping yet, and I have got > to come up with a way to get, display and edit a record, but first I > am just trying to write out a record. > > I used the edb.exw program to look at the database and there is one > record saved in the Diagnosis table. > > > -- eyediag.exw > > -- Diagnosis Code Maintenance > > > include win32lib.ew > > include database.e > > without warning > > integer err > > > constant > > Win = create( Window, "Diagnosis Code Maintenance", 0, > Center, Center,350,200,0), > > > > Lbl1 = create(LText,"Code",Win,20,30,60,20,0), > > Code = create(SleText,"",Win,80,30,42,20,0), > > Lbl2 = create(LText,"Description",Win,20,80,60,20,0), > > Desc = create(SleText,"",Win,80,80,248,20,0), > > > Save_Rec = create(PushButton, "Save",Win,25,130,80,20,0), > > Delete_Pat = create(PushButton, "Delete",Win,250,130,80,20,0) > > > -- run code > > err= db_create("Eye-Comp", DB_LOCK_NO) > You should now create your table here... err = db_create_table("Diagnosis") > > > setWindowBackColor(Win,rgb(0,255,127)) > > setFocus(Code) > > > procedure Save_Diag(integer self, integer event,sequence parms) > > err = db_open("Eye-Comp",DB_LOCK_NO) > > err = db_create_table("Diagnosis") > Instead of "db_create_table()," use "db_select_table()." This is probably what's causing the problem. > err = db_insert(getText(Code),getText(Desc)) > > db_close() > > end procedure > > > setHandler(Save_Rec,w32HClick,routine_id("Save_Diag")) > > > WinMain( Win, Normal) > >
3. Re: Error trying to close EDS database
- Posted by ronaustin at alltel.net Oct 14, 2003
- 503 views
--------------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> </DIV> <DIV id=3DIncrediOriginalMessage><I>-------Original Message-------</I></D= IV> <DIV> </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> </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>> <BR>&g= t;<BR>> The following program allows me to add one record and then blo= ws up <BR>> when I try to add a second record. It says I should look i= n ex.err, <BR>> which is a 57K file that I don't understand. Does anyo= ne see any <BR>> obvious problems with this program as far as I have g= ot with it?<BR>> <BR>> As you can see, I have not done any error tr= apping yet, and I have got <BR>> to come up with a way to get, display= and edit a record, but first I <BR>> am just trying to write out a re= cord.<BR>> <BR>> I used the edb.exw program to look at the database= and there is one <BR>> record saved in the Diagnosis table.<BR>> <= BR>><BR>> -- eyediag.exw<BR>><BR>> -- Diagnosis Code Maintena= nce<BR>><BR>> <BR>> include win32lib.ew<BR>><BR>> include = database.e<BR>><BR>> without warning<BR>><BR>> integer err<BR= >><BR>> <BR>> constant<BR>><BR>> Win =3D create( Window, "= Diagnosis Code Maintenance", 0, <BR>> Center, Center,350,200,0),<BR>&g= t;<BR>> <BR>><BR>> Lbl1 =3D create(LText,"Code",Win,20,30,60,20,= 0),<BR>><BR>> Code =3D create(SleText,"",Win,80,30,42,20,0),<BR>>= ;<BR>> Lbl2 =3D create(LText,"Description",Win,20,80,60,20,0),<BR>>= <BR>> Desc =3D create(SleText,"",Win,80,80,248,20,0),<BR>><BR>> = <BR>> Save_Rec =3D create(PushButton, "Save",Win,25,130,80,20,0),<BR>&= gt;<BR>> Delete_Pat =3D create(PushButton, "Delete",Win,250,130,80,20,= 0)<BR>><BR>> <BR>> -- run code<BR>><BR>> err=3D db_create(= "Eye-Comp", DB_LOCK_NO)<BR>><BR>You should now create your table here.= =2E.<BR>err =3D db_create_table("Diagnosis")<BR><BR>> <BR>><BR>>= setWindowBackColor(Win,rgb(0,255,127))<BR>><BR>> setFocus(Code)<BR= >><BR>> <BR>> procedure Save_Diag(integer self, integer event,se= quence parms)<BR>><BR>> err =3D db_open("Eye-Comp",DB_LOCK_NO)<BR>&= gt;<BR>> err =3D db_create_table("Diagnosis")<BR>><BR>Instead of "d= b_create_table()," use "db_select_table()."<BR><BR>This is probably what'= s causing the problem.<BR><BR>> err =3D db_insert(getText(Code),getTex= t(Desc))<BR>><BR>> db_close()<BR>><BR>> end procedure<BR>>= <BR>> <BR>> setHandler(Save_Rec,w32HClick,routine_id("Save_Diag"))<= BR>><BR>> <BR>> WinMain( Win, Normal)<BR>><BR>><BR><FONT c= olor=3D#ff8040>So I am creating the table more than once. 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--
4. Re: Error trying to close EDS database
- Posted by "C. K. Lester" <euphoric at cklester.com> Oct 14, 2003
- 523 views
ronaustin at alltel.net wrote: > > So I am creating the table more than once. Would it then be better to > write a short install program that would be ran one timR> > You could just check for the existence of the table and create it if it doesn't exist... err = db_select_table("whatever") if err != DB_OK then err = db_create_table("whatever") end if -- keep going...
5. Re: Error trying to close EDS database
- Posted by ronaustin at alltel.net Oct 14, 2003
- 551 views
--------------Boundary-00=_Q3GQQL80000000000000 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 > So I am creating the table more than once. Would it then be better to =0D > write a short install program that would be ran one timR>=0D >=0D You could just check for the existence of the table and create it if it =0D doesn't exist...=0D =0D err =3D db_select_table("whatever")=0D if err !=3D DB_OK then=0D err =3D db_create_table("whatever")=0D end if=0D -- keep going...=0D =0D I see what you mean. I changed the program as suggested (actually I just removed the db_create) and it's adding records like a charm. Now I have = to work on a way to retrieve, edit and save them.=0D =0D Thanks everybody for your help.=0D =0D =0D =0D =0D TOPICA - Start your own email discussion group. FREE!=0D =0D =0D =0D =0D =2E=20 --------------Boundary-00=_Q3GQQL80000000000000 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> </DIV> <DIV id=3DIncrediOriginalMessage><I>-------Original Message-------</I></D= IV> <DIV> </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 1:19:43 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> </DIV> <DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing List =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <BR><BR><BR><A href=3D"mailto:ronaustin@al= ltel.net">ronaustin at alltel.net</A> wrote:<BR><BR>><BR>> So I am cre= ating the table more than once. Would it then be better to <BR>> write= a short install program that would be ran one timR><BR>><BR>You co= uld just check for the existence of the table and create it if it <BR>doe= sn't exist...<BR><BR>err =3D db_select_table("whatever")<BR>if err !=3D D= B_OK then<BR>err =3D db_create_table("whatever")<BR>end if<BR>-- keep goi= ng...</DIV> <DIV> </DIV> <DIV><FONT color=3D#ff8000>I see what you mean. I changed the progr= am as suggested (actually I just removed the db_create) and it's adding r= ecords like a charm. Now I have to work on a way to retrieve, edit = and save them.</FONT></DIV> <DIV><FONT color=3D#ff8000></FONT> </DIV> <DIV><FONT color=3D#ff8000>Thanks everybody for your help.</FONT></DIV> <DIV><BR><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.b6KEgr.cm9uYXVz">http://topica.com/u/?b1dd66= =2Eb6KEgr.cm9uYXVz</A><BR>Or send an email to: <A href=3D"mailto:EUforum-= unsubscribe at topica.com">EUforum-unsubscribe at topica.com</A><BR><BR>TOPICA = - Start your own email discussion group. FREE!<BR><A href=3D"http://www.t= opica.com/partner/tag02/create/index2.html">http://www.topica.com/partner= /tag02/create/index2.html</A><BR>--^-------------------------------------= ---------------------------<BR><BR><BR><BR><BR>. </DIV></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=_Q3GQQL80000000000000--