NWN/SQL question
Moderator: Event DM
- Deider
- Demigod of Posts
- Posts: 13259
- Joined: Sun May 11, 2003 12:33 pm
- Timezone: GMT -8
- Location: California
NWN/SQL question
A quick question – is it possible to make a script in NWN that will automatically create a new database table for you?
-
- Team Member; Retired with Honors
- Posts: 1724
- Joined: Tue Nov 09, 2004 2:55 pm
- Timezone: GMT-6
- Location: St. Louis, MO
Yes. You can see an example of this in the NWNX2 test mod. It just uses the SQLExecDirect() statement.
You would have to make a script like:
You would have to make a script like:
Code: Select all
#include "aps_include"
void main(){
string sSQL = "CREATE TABLE STATEMENT";
SQLExecDirect(sSQL);
}
- PlasmaJohn
- CCC / Release Admin
- Posts: 9010
- Joined: Fri Dec 26, 2003 10:37 pm
- Timezone: US/Eastern
- Location: Negaria
- Contact:
Re: NWN/SQL question
Deider wrote:A quick question – is it possible to make a script in NWN that will automatically create a new database table for you?

Not saying that's what you're trying to do of course.
Calvin: This is so cool!
Hobbes: This is so stupid.
Hobbes: This is so stupid.
- Deider
- Demigod of Posts
- Posts: 13259
- Joined: Sun May 11, 2003 12:33 pm
- Timezone: GMT -8
- Location: California
Re: NWN/SQL question
It's for the holes. Something I'm playing around with in between fishing trips and Matlock reruns. Just wondering if you could set it up so that a table would be made automatically for the buyer when they buy a hole.PlasmaJohn wrote:Not saying that's what you're trying to do of course.
- Tesh
- Scholar
- Posts: 1421
- Joined: Thu Jan 13, 2005 10:58 am
- Timezone: GMT +12
- Location: Auckland, New Zealand
- Contact:
you'd create a whole new table for a new PC hole?
Can't say that's 'wrong' without a better understanding, but IMO for this kind of thing shouldn't all PC holes just have their own rows in the PCHole table?
Can't say that's 'wrong' without a better understanding, but IMO for this kind of thing shouldn't all PC holes just have their own rows in the PCHole table?
Roland of Gilead wrote: I told you we deal in lead, and so we do. But that doesn't make us hired guns.
Belkar wrote: One order of gluttony with a side of coriuption, please.