Database Problem

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

Hello All,

I am having trouble getting my database to work. I'll post my code and see if any of you can help. When I run it, it says cannot open database. I am using Eu 4.0

include std/eds.e 
include std/get.e 
include std/sort.e 
include std/filesys.e 
include std/io.e 
include std/os.e 
 
include Include/herodata.e 
include Include/enemydata.e 
include Include/bossdata.e 
include Include/vehicledata.e 
include Include/itemdata.e 
include Include/element.e 
include Include/attributedata.e 
include Include/npcdata.e 
include Include/mapdata.e  
include Include/weapondata.e 
include Include/shopdata.e 
include Include/attackdata.e 
include Include/spelldata.e 
include Include/skilldata.e 
include Include/sedata.e 
include Include/bgdata.e 
include Include/scdata.e 
include Include/tiledata.e 
include Include/classdata.e 
include Include/gamedata.e 
 
 
if db_create("RPGData", DB_LOCK_NO) != DB_OK then 
	puts(1,"Database could not be created") 
	abort(1) 
end if 
 
if db_open("RPGData", DB_LOCK_NO) != DB_OK then 
	puts(1,"Could not open database") 
	abort(1) 
end if 
 
if db_select("RPGData", DB_LOCK_NO) != DB_OK then 
	puts(1,"Could not select database") 
	abort(1) 
end if 
 
if db_create_table("RPGDataTable") != DB_OK then 
	puts(1,"Could not create table") 
	abort(1) 
end if 
 
if db_select_table("RPGDataTable") != DB_OK then 
	puts(1,"Could not select table") 
	abort(1) 
end if 
 
if db_insert(MAP_NAME, Map_Name) != DB_OK then 
	puts(1,"Failed to insert data") 
	abort(1) 
end if 
new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu