Re: Trouble with Database(EDS)

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

Ok I got it to open after deleting the previously made database. How do I make it so I can test it without the couldn't create database error coming up again? I'm using the Eu4 version of EDS.

Revised code

include std/eds.e 
include std/get.e 
--include std/misc.e 
 
--without type_check 
 
--namespace eds 
 
 
if db_create("GameDatabase",DB_LOCK_SHARED,5,5) != DB_OK then 
	puts(1,"Couldn't create database!\n") 
	abort(1) 
end if 
 
if db_open("GameDatabase",DB_LOCK_SHARED) != DB_OK then 
	puts(1,"Couldn't open Database!\n") 
end if 
 
if db_create_table("gametable") != DB_OK then 
	puts(1,"Failed to create table!\n") 
end if 
 
--Game name, Developer, Install-Size 
if db_insert("Uncharted",{"Naughty Dog",50}) then 
	puts(1,"Failed to insert data!\n") 
	elsif db_insert("Uncharted Collection",{"Naughty Dog",50}) then 
		puts(1,"Failed to insert data!\n") 
end if 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu