Re: Trouble with Database(EDS)

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

Thanks Tom,

I think I understand it better. Here is my updated code.

EDIT: Does anyone have an updated version of EDS viewer? Something that gives you a GUI way of looking through databases.

include std/eds.e 
include std/get.e 
include std/map.e 
 
without type_check 
 
atom db 
 
db = db_select("GameDatabase") 
 
if db = DB_OK then 
	puts(1,"Database is selected for use") 
	else db = db_open("GameDatabase") 
		if db = DB_OK then 
			puts(1,"Database open and selected for use") 
		else db = db_create("GameDatabase") 
		if db = DB_OK then 
			puts(1,"Database created, open and ready for use") 
		else 
			puts(1,"Database failure") 
		end if 
	end if 
end if 
 
atom tab 
 
tab = db_select_table("GameTable") 
 
if tab = DB_OK then 
	puts(1,"Table selected for use") 
	else tab = db_create_table("GameTable") 
	if tab = DB_OK then 
		puts(1,"Table created and selected for use") 
	else 
		puts(1,"Table failure") 
	end if 
end if 
 
db_insert("Uncharted 4",{"Naughty Dog",50}) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu