1. wrong mode EDB

This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C394BE.7BBE9310
	charset="iso-8859-1"

I get "wrong mode for attempted operation"
I am trying to insert record in  the following.
Jvandal
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
if db_select_table("StockRecords") !=3D DB_OK then
 puts(2, "Couldn't find Stock table!\n")
 abort(1)
end if


s =3D 0
--if  db_table_size()> 0 then
 Key =3D Busname[Parenpos +1..Parenpos + 3]

 findrec =3D db_find_key(Key)
 if findrec > 0 then
  printf(handlew, "edit line \"%s\"\n",{Today})
 --   rtn_code =3D message_box("duplicate  record",
 --   "remind for Win98", MB_ICONWARNING+MB_OK)
 else=20
 =20
  if db_insert("KDD", {Company}) !=3D DB_OK then
   printf(handlew, "edit line \"%s\"\n",{Today})
--     rtn_code =3D message_box("error adding  record",
--     "remind for Win98", MB_ICONWARNING+MB_OK)
  else
   printf(handlew, "edit line \"%s\"\n",{Today})
 --      rtn_code =3D message_box("added  record",
--    "remind for Win98", MB_ICONWARNING+MB_OK)
  end if
 end if

------=_NextPart_000_0006_01C394BE.7BBE9310
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I get "wrong mode for attempted=20
operation"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to insert record in&nbsp; =
the=20
following.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Jvandal</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<=
/FONT></DIV>
<DIV><FONT face=3DArial size=3D2>if db_select_table("StockRecords") !=3D =
DB_OK=20
then<BR>&nbsp;puts(2, "Couldn't find Stock =
table!\n")<BR>&nbsp;abort(1)<BR>end=20
if</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=3DArial size=3D2>
<DIV><BR>s =3D 0<BR>--if&nbsp; db_table_size()&gt; 0 then<BR>&nbsp;Key =
=3D=20
Busname[Parenpos +1..Parenpos + 3]</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;findrec =3D db_find_key(Key)<BR>&nbsp;if findrec &gt; 0=20
then<BR>&nbsp;&nbsp;printf(handlew, "edit line=20
\"%s\"\n",{Today})<BR>&nbsp;--&nbsp; &nbsp;rtn_code =3D=20
message_box("duplicate&nbsp; record",<BR>&nbsp;-- &nbsp;&nbsp;"remind =
for=20
Win98",=20
MB_ICONWARNING+MB_OK)<BR>&nbsp;else&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;=
if=20
db_insert("KDD",&nbsp;{Company}) !=3D DB_OK=20
then<BR>&nbsp;&nbsp;&nbsp;printf(handlew, "edit line=20
\"%s\"\n",{Today})<BR>--&nbsp;&nbsp; &nbsp;&nbsp;rtn_code =3D =
message_box("error=20
adding&nbsp; record",<BR>-- &nbsp; &nbsp;&nbsp;"remind for Win98",=20
MB_ICONWARNING+MB_OK)<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;printf(han=
dlew,=20
"edit line \"%s\"\n",{Today})<BR>&nbsp;--&nbsp; &nbsp;&nbsp;&nbsp; =
rtn_code =3D=20
message_box("added&nbsp; record",<BR>-- &nbsp;&nbsp;&nbsp;"remind for =
Win98",=20
MB_ICONWARNING+MB_OK)<BR>&nbsp;&nbsp;end if<BR>&nbsp;end=20

------=_NextPart_000_0006_01C394BE.7BBE9310--

new topic     » topic index » view message » categorize

2. Re: wrong mode EDB

check your lock method for opening the database. it should be DB_LOCK_NO or
DB_LOCK_EXCLUSIVE, if it is DB_LOCK_SHARED then the file is read only.

~Greg

----- Original Message -----
From: sixs at ida.net
Subject: wrong mode EDB



I get "wrong mode for attempted operation"
I am trying to insert record in  the following.
Jvandal
==============================================
if db_select_table("StockRecords") != DB_OK then
 puts(2, "Couldn't find Stock table!\n")
 abort(1)
end if


s = 0
--if  db_table_size()> 0 then
 Key = Busname[Parenpos +1..Parenpos + 3]

 findrec = db_find_key(Key)
 if findrec > 0 then
  printf(handlew, "edit line \"%s\"\n",{Today})
 --   rtn_code = message_box("duplicate  record",
 --   "remind for Win98", MB_ICONWARNING+MB_OK)
 else

  if db_insert("KDD", {Company}) != DB_OK then
   printf(handlew, "edit line \"%s\"\n",{Today})
--     rtn_code = message_box("error adding  record",
--     "remind for Win98", MB_ICONWARNING+MB_OK)
  else
   printf(handlew, "edit line \"%s\"\n",{Today})
 --      rtn_code = message_box("added  record",
--    "remind for Win98", MB_ICONWARNING+MB_OK)
  end if
 end if

--^^---------------------------------------------------------------
This email was sent to: g.haberek at comcast.net


TOPICA - Start your own email discussion group. FREE!

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

Search



Quick Links

User menu

Not signed in.

Misc Menu