.edb question

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

Hi all,

Im just now trying out the edb and I got this error message. I have no 
idea what it could mean...I pretty much copied the code from the 
documentation. I included the error report as well as the code I'm 
trying to run.Thanks in advance for any help.



include database.e
--if db_create("mydata",DB_LOCK_NO) !=DB_OK then
--puts(1,"couldn't create the database!\n")
--abort(1)
    
--end if//ALREADY CREATED

object EC
err=db_open("mydata",DB_LOCK_NO)
object tries



              tries = 0
              while 1 do
                  err = db_open("mydata", DB_LOCK_SHARED) 
                  if err = DB_OK then
                      exit
                  elsif err = DB_LOCK_FAIL then
                  	tries += 1
                  	if tries > 10 then
                          puts(2, "too many tries, giving up\n")
                          abort(1)
                  	else    
                  	    sleep(5)
                  	end if
                  else
                  	puts(2, "Couldn't open the database!\n")
                  	abort(1)
                  end if
              end while


if db_create_table("my_new_table") != DB_OK then--line 34//error line!
                  puts(2, "Couldn't create my_new_table!\n")
              end if

--error report

C:\EUPHORIA\include\database.e:286 in procedure put4() 
wrong file mode for attempted operation 
    x = 1


--said it was called from line 34(see above)

Jason Dube

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

Search



Quick Links

User menu

Not signed in.

Misc Menu