Data Entry Tool for SQL Databases

Written in Javascript this application will parse a sql create table statement and use that to create a web form with each field being named for a column name from the statement. Data entered into the form is stored in the "allinfo" array when the Add Record Button is clicked. When the Generate SQL Insert Statements button is clicked the data from the allinfo array is processed. Each item in the record is evaluated to see if it is not a number. If true then the value is enclose with single quotes. The completed insert statements are then listed in the result text area where they can be copied and pasted into a SQL database. Although data types if present in the create table statement are recorded in the fieldtype array, there is currently no functionality in this code to deal with them.

Standard SQL Format

CREATE TABLE table_name(field_1 INTEGER PRIMARY KEY , field_2 FLOAT , field_3 CHAR(10) , field_4 VARCHAR(100) , field_5 BLOB);

Tested with Firefox version, 3.0.6 Internet Explorer 6.0.2, 7.0.5 and Opera 9.24.