Re: wrong mode EDB

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

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 thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu