logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
How can I get ATS 1 to work with the sqlite database?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
Master Lexx



Joined: 23 May 2005
Posts: 3

PostPosted: Mon May 23, 2005 12:35    Post subject: How can I get ATS 1 to work with the sqlite database? Reply with quote

I donīt know if i am right here, but I was told to post here instead at bioware. My problem is, I dl ATS ( Ambrosia Tradeskill System 1.00 ) but I donīt want to use mysql. I tried it and I donīt like it, to much to do and I really donīt need it, sqlite is fine. I tried the sqlite database of nwnx2 /odbc2 and all works well, the demo mod works, can read and write and I got it to work with my mod.

But I canīt get it to work with ATS, I have read that there are more tables used than one, to store the ATS info sperate from the player variables and the location variables. ATS 1 is hosted on nwvault at http://nwvault.ign.com/View.php?view=Scripts.Detail&id=57

There are 3 mysql data files included so that the database is already right setup. But I donīt want to use mysql, is there a way to get the configuration out of those 3 files (.frm .myd .myi)?. I am no database professional, but I have seen that it can be easy, you only have to create such a table and can use it then. Like in the APS demo mod.

But the provider of ATS 1 gave no info about how to set up the database, just install mysql, get it to work and use the 3 files,.... thanks, nice.

Maybe somebody can help me, and tell me how I need to set the right tables to get them to work with ATS?
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue May 24, 2005 10:53    Post subject: Reply with quote

You (or someone else you know) will need to have MySQL running to extract the table definition from the three files. I think it is rather strange that the authors of ATS did not include the table create statements, since not everyone is using MySQL.

Alternatively, maybe someone on this forum has ATS running and can post the create statements ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Makzimia De Graf



Joined: 31 Dec 2004
Posts: 55
Location: San Diego CA.

PostPosted: Fri May 27, 2005 18:23    Post subject: Reply with quote

The Author, being my wife and I made it with KISS in mind Smile and clearly told everyone, that a: it would not be supported beyond that release, which with the later fixes, I added, works fine, and b: that it was just for NWNX2 and MySQL Smile. The table create statements weren't needed for us, because, my wife is a DB expert, I am not, and then, when I was asked for our version to be made public, I incuded those files to KISS Very Happy. Now, it really is not that hard to do a search for those that need it in the actual thread under the release on NWvault is in fact the commands for making the tables.

I am officially retired totally from NWN so thanks to Pap and team for what was a great way to run what is now IMO a totally outdated game... NEXT!!! have fun!.

Makz.
_________________
Makzimia De Graf

DM/Creator Island of Fredian
fredian.game-host.org:5123
Forums at http://castille.us/fredian/Forums
Back to top
View user's profile Send private message
Master Lexx



Joined: 23 May 2005
Posts: 3

PostPosted: Wed Jun 01, 2005 18:21    Post subject: Reply with quote

Yes, I already knew this. I knew that the authors donīt support anything, it is how it is. But i had have the hope, that somebody who knows a bit about databases could tell me how to set the tables for sqlite. I am no database professional! And I tried to get help here, because there is no useable info in nwvault, and the authors of ATS2 give no support. So please, can somebody tell me how to get the tables out of the 3 files? Or is there somebody who is enough expert to tell me how to make the config for sqlite?

Thanks!

(Makzimia De Graf: if you donīt want to help, please donīt post, you already made clear that you give no help for ATS2, thatīs why I asked here and not you)
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Wed Jun 01, 2005 21:51    Post subject: Reply with quote

I played around with this stuff (just for you Razz) and here it is:

Code:
-- DBTools DBSQLite - SQLite Database Dump
--

-- Dumping Table Structure for ats_data

--
CREATE TABLE [ats_data]
(
   [PLAYER] varchar (100) NOT NULL ,
   [NAME] varchar (100) NOT NULL ,
   [TAG] varchar (100) NOT NULL ,
   [VALUE] varchar (100) NOT NULL ,
   [EXPIRE] memo,
   [LAST] datetime,
   PRIMARY KEY ([PLAYER], [NAME], [TAG])
);
--
--
-- Dumping TRIGGERS
--
--
CREATE TRIGGER ats_timestamp_insert AFTER INSERT ON ats_data
  BEGIN
    UPDATE ats_data SET LAST = datetime('now') WHERE (player = new.player) AND (NAME = new.NAME) AND (tag = new.tag);
  END;
CREATE TRIGGER ats_timestamp_update AFTER UPDATE ON ats_data
  BEGIN
    UPDATE ats_data SET LAST = datetime('now') WHERE (player = new.player) AND (NAME = new.NAME) AND (tag = new.tag);
  END;


The triggers take care of updating the "last" column (note to self: this needs to go into the main distribution for table pwdata as well). There was only one table in the mysql files.

You should be able to execute that code in whatever interface you use for SQLite (I prefer DBManager, which is listed in the links section on this site).

Hope that helps.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Master Lexx



Joined: 23 May 2005
Posts: 3

PostPosted: Fri Jun 03, 2005 14:50    Post subject: nearly done Reply with quote

Thanks. You helped me a bit. I tried to use the Database Manager, but had have no luck with it yet. But I found the sqlite CC which helped me to set the table you wrote. But whenever I try to set the triggers I get an error:

Error: near ")": syntax error , Error: cannot commit - no transaction is active ,

The code you provided should be all I need to set the database up but sqliteCC wonīt do it. Both triggers have the syntax error. And I am still no database expert........ I have no idea where the error is. One last time help would be nice. Itīnow just a small syntax problem.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Fri Jun 03, 2005 18:58    Post subject: Reply with quote

I can not get it to work with SQLCC either. No idea what the problem is.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group