Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 I need help writing a dbs file
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

beznas
Starting Member

Morocco
23 Posts

Posted - 30 September 2002 :  00:21:31  Show Profile
I want to write a dbs file where I have to create 2 tables.
Any good people out there that could help me write the dbs file for that?

I can send them the db.

Thank you in advance.




Free Palestine!

burthold
Junior Member

USA
426 Posts

Posted - 30 September 2002 :  00:33:08  Show Profile  Visit burthold's Homepage
Do a search for DBS you will find a thread that has everything you need in it. I forget who wrote up the DBS commands and how to use them.
Go to Top of Page

alex042
Average Member

USA
631 Posts

Posted - 22 October 2002 :  09:39:20  Show Profile  Send alex042 an AOL message  Send alex042 a Yahoo! Message
quote:
Do a search for DBS you will find a thread that has everything you need in it. I forget who wrote up the DBS commands and how to use them.


Any idea where this topic is? I've been searching the archives for over an hour and can't find it. At this point, I just want to rename a column, but it would also be nice to have the other commands handy.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 22 October 2002 :  19:17:46  Show Profile  Visit HuwR's Homepage


Script file Instructions.
<br>
The file is formatted into sections, which are delimited with ini file style tags. You should name your file using the following format, dbs_FILENAME.asp, where FILENAME is your setup filename.<br>
The allowed Tags are
<br>
[CREATE] - for creating new tables
[ALTER]  - for Adding/deleting/changing columns in an existing table
[DELETE] - Deleting records from a Table
[INSERT] - Inserting records into a table
[UPDATE] - Updating specific values
[DROP]   - Deleting Tables
<br>
Section Formatting.<br>
<pre id=code><font face=Verdana, Arial, Helvetica size=1 id=code>
<--------------------------------- Start of File ------------------------------------------------------>
MyTest Mod		The fist line of the file is the name of the Mod the Db setup is for.

[CREATE]			Create table sections
TEST_TABLE		Name of the Table to create
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,text. 
			NULL#	   Column allows NULL leave blank for Not allow
			DEFAULT	   default value for new field
				Any missing items should be left blank, the '#' delimeters 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.


[ALTER]			Alter table start tag
TEST_TABLE		Name of table to be altered
ADD#field3#int#NULL#		Field Definitions - Format: As above
ALTER#field2#varchar(255)##	Change column Properties
DROP#field4###		Delete  a column from the Table
[END]			End Alter table tag


[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 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


[DROP]
TEST_TABLE
[END]
<----------------------------------- End of File ------------------------------------------------------>
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07