e3stone
Average Member
USA
885 Posts |
Posted - 24 April 2001 : 02:46:03
|
I just got finished putting together a "buddy" mod which lets you keep a list of buddies, sort of like the one on Alan's site. I basically just modified the bookmarks mod. but, I have one problem. I have no idea how to make the .dbs file to automatically add the tables to people's database. Could anyone tell me how this is done? I'm sure its fairly simple, but I just don't know where to start.
Thanks, Eric
http://www.insidewaco.com/forum
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 24 April 2001 : 03:31:38
|
This is quoted from a post by Huw (that's been archived)
quote:
Here you go
This is the latest mod_dbsetup.asp
Database Setup Tool
Instructions.
The file is formatted into sections, which are delimited with ini file style tags.
The allowed Tags are
[CREATE] - Creating new tables [DROP] - Dropping tables [ALTER] - Adding,Dropping and Altering columns in an existing table [INSERT] - Inserting records into a table [UDATE] - Updating specific values [DELETE] - Deleting records
Section Formatting. Create table sections [CREATE] TEST_TABLE - Name of the Table to create if it should use strMemberTablePrefix, then include MEMBER as part of the name TABLE_ID - Name of the ID Field, leave a blank line if no ID field is required field1#int#NULL#0 - The rest of the lines in this section are for the field definitions field2#varchar(20)## - They should all follow the same Format: FIELDNAME#FIELDTYPE#NULL#DEFAULT FIELDNAME# Name of column to add FIELDTYPE# Valid field Types are smallint,int,varchar,memo. These will be converted to the correct DAta types depending on your DB, NO OTHER TYPES are Supported NULL# Column allows NULL leave blank for Not allow DEFAULT default value for new field Any missing items should be left blank, the '#' deleimeters should all appear. i.e. field1#int#NULL#0 will create an integer field with a default value of 1 that allows NULL field2#varchar(20)## will create a varchar field with no default that does not allow NULLs [END] - End of create table tag. Drop Table sections [DROP] MODS - Table you wish to drop [END] Alter Table sections [ALTER] - Alter table start tag TEST_TABLE - Name of table to be altered ADD#field3#int#NULL# - Acction+Field Definitions - Format: As above Actions-ADD,ALTER,DROP [END] - End Alter table tag Insert records sections. [INSERT] - Insert Values start Tag TEST_TABLE - Name of table you whish to insert values into (field1,field2)#(12,'test') - Field Defs This uses the same basic definition as an insert statement. The first parameter being a comma delimeted list of fields and the second the corresponding values.Each parameter enclosed by () i.e. (field1,....)#(value1,....) [END] - End of Table insert Tag Update Table sections [UPDATE] - Table Update start Tag TEST_TABLE2 - Name of Table to update field22#'B'#TABLE_ID2 = 1 - Field definitions - Format: FIELDNAME#VALUE#WHERE CLAUSE FIELDNAME# - Name of field to be updated VALUE# - New value for field WHERE CLAUSE - Criteria to specify records to be updated, blank if All records [END] - End of update tag Delete records section [DELETE] MODS - Table do delete records from (M_NAME = 'Attachment' OR M_NAME = 'HModEnable') - Where clause [END]
|
|
|