----------------------------------------------------------------------
--- Knud van Eeden --- 31 August 2008 - 03:09 am ---------------------

Computer: Editor: TSE: Database: Table: Crud: Operation: Create: How to: How to create a simple CRUD database table using TSE? Web driven database: Databases: MySql, Sqlite, Microsoft SQL server, Oracle, Borland Firebird, Borland Interbase [to be added soon: IBM DB2, Sybase, Ingres, PostGreSql, Informix]

===

Goal:

---

This TSE macro will generate automatically a fully working simple
minimal web driven database system

(local, and or Intranet or Internet based).

---

Used here currently are PHP as the computer language,
and possible databases

1. MySql

2. Sqlite

3. Microsoft SQL server

4. Oracle

5. Borland Firebird

6. Borland Interbase

[currently to be added soon (not implemented yet)
 IBM DB2,
 Sybase,
 Ingres,
 PostGreSql,
 Informix
]

===

This generation of the PHP files and letting it run should usually
take only a few minutes.

===

Your local system you can e.g. use as test environment
and development environment,

The remote system you could use as production environment.

===

The TSE macro also uploads the generated PHP files automatically to
your ftp site (using Microsoft MSDOS ftp, which should be available on
any Microsoft Windows (XP) computer).

---

The first time you run the TSE macro, you have to fill in the data
reflecting the conditions on your system in the .ini file (e.g.
database information, ftp information, file locations, ...).

===

Description:

---

When you want to create a simple database system you might include the
4 operations

-'C'reate (or SQL 'INSERT')

-'R'ead (or SQL 'SELECT')

-'U'pdate (or SQL 'UPDATE')

-'D'elete (or SQL 'DELETE')

---

Because these 4 operations are usually minimally needed to create a
working simple minimal database system, and occur very often, they are
seen as rather special and are referred to as the CRUD operations.

---

The acronym 'CRUD' comes thus from the first letter of each of that
4 operations, 'C'reate, 'R'ead, 'U'pdate and 'D'elete.

---

For example you usually have to create 2 types of web pages:

 1. administrator pages

 2. client pages.

You can create first the administrator pages, using all 4 CRUD
operations.

To create the client pages, you just remove the CUD operations, leaving
only the R operation (='R'ead, or thus SQL SELECT).
This because the client is usually not allowed to change the database
data.

---

In practice, you can further divide this operations in another 2 operations each.
Each of the  4 operations has an input or 'get' part (usual via a HTML 'FORM').
and also a 'set' part, where you run the corresponding SQL query with that data
from the HTML form.
In total you will get thus 4 . 2 = 8 operations minimally.

The structure of the automatically generated PHP program reflects this.

It creates a PHP 'CASE' statement with 8 options.

--- cut here: begin --------------------------------------------------
CASE 1.1 'C'REATEGet -Get HTML form data about what you want to insert 1.2 'C'REATESet -Run INSERT Sql query with that data 2.1 'R'EADGet -Get HTML form data about what you want to select 2.2 'R'EADSet -Run SELECT Sql query with that data 3.1 'U'PDATEGet -Get HTML form data about what you want to update 3.2 'U'PDATESet -Run UPDATE Sql query with that data 4.1 'D'ELETEGet -Get HTML form data about what you want to delete 4.2 'D'ELETESet -Run DELETE Sql query with that data ENDCASE
--- cut here: end ---------------------------------------------------- --- The structure of the database table is kept very simple. It generates 1 database table only. The first table column is assumed to be the primary key, and should be integer. The other table columns are currently assumed to be all of type VARCHAR()) INT TEXT (if the database allows this) --- There is minimal error checking. --- Foreign key tables could be created separately. Not implemented yet. --- No normalization is used. --- You can thus set your initialization data in a TSE .ini file, at a location of your choice. Using this data the TSE macro will generate the necessary files. --- To create different databases via .ini files o -By using different sections the same .ini file You can store the data in the same ini file, but at different sections e.g. [default] ... [another] ... [yetanother] ... o By using different .ini files By creating different TSE .ini at different file locations, using that data, you can quickly automatically generate several different databases === E.g. -your 'Address' database --- cut here: begin --------------------------------------------------
id firstName lastName address city country description date
--- cut here: end ---------------------------------------------------- === E.g. -your 'Guestbook' database table1 --- cut here: begin --------------------------------------------------
id name email homepage country description date
--- cut here: end ---------------------------------------------------- === E.g. -your 'Todo' database table2 --- cut here: begin --------------------------------------------------
id todo priority done description date
--- cut here: end ---------------------------------------------------- === E.g. -your 'Calendar' database table3 --- cut here: begin --------------------------------------------------
id activity priority done description date
--- cut here: end ---------------------------------------------------- === -your 'URL favorites links' database table4 --- cut here: begin --------------------------------------------------
id url description date
--- cut here: end ---------------------------------------------------- and so on ... --- Using (Microsoft MSDOS) ftp the generated PHP files are automatically uploaded to your web site. === In the HTML forms where you are asked for the data, Using e.g. HTML lists, you can build the SQL queries, without having to type too much. Text fields to free type the SQL query (e.g. the SQL SELECT statement) should be added soon. --- Steps: Overview: 1. -You should have your database installed locally, e.g. one or more of the following -MySql -Oracle -Microsoft SQL server -Sqlite -Borland Firebird -Borland Interbase with following soon also (not implemented yet): IBM DB2 Sybase Ingres PostGreSql Informix 2. -You should have a web server (e.g. IIS, Apache, ...) installed locally and running 3. -Your web server (e.g. IIS, Apache, ...) should be PHP enabled. In other words, if it gets a web page with the extension .php, it should react accordingly. 4. -Optionally you should have the database and table created on your remote Internet system (check e.g. with your provider) 5. -Adapt the TSE .ini file to the conditions on your system (e.g. by editing it in your favorite text editor) E.g. create the following program: --- cut here: begin --------------------------------------------------
// filename=
--- cut here: end ---------------------------------------------------- --- cut here: begin --------------------------------------------------
// fileCreateDatabaseTableInternetCrudPhp.ini
--- cut here: end ---------------------------------------------------- --- cut here: begin --------------------------------------------------
[default] ; ---------------------------------------------------------------------- ; ; Where applicable, adapt these values below to the conditions on your system ; ; ---------------------------------------------------------------------- ; ; To disable an option put a semicolon ';' in front of that line. ; To enable an option, remove the semicolon ';' in front of that line. ; ; ---------------------------------------------------------------------- ; -Database: Product: Which database product number are you using? ; ; -Use that number to choose the real database product. E.g. 5 is Borland Interbase, 6 is Microsoft SQL server, 7 is MySql, 9 is Oracle, 11 is Sqlite ; databaseProductCurrentNumberS = 9 ; ---------------------------------------------------------------------- ; -Database: Product: ReadMe: Installation: Firebird ; databaseReadMeInstallationFirebird1 = 1. -You have to install Firebird v1.5 to remain compatible with ibase_connect(). databaseReadMeInstallationFirebird2 = Firebird v2.x possible should not work here databaseReadMeInstallationFirebird3 = (started with v2.0, but went back to v1.5) databaseReadMeInstallationFirebird4 = databaseReadMeInstallationFirebird5 = 2. -gds32.dll is the dll containing all procedures/functions used by PHP databaseReadMeInstallationFirebird6 = to connect to the Firebird database databaseReadMeInstallationFirebird7 = databaseReadMeInstallationFirebird8 = 3. -You have to put the correct gds32.dll in c:\windows\system32\. databaseReadMeInstallationFirebird9 = databaseReadMeInstallationFirebird10 = The best solution is to rename all existing gds32.dll on your computer databaseReadMeInstallationFirebird11 = (do e.g. a Microsoft Windows 'search' (via 'All programs') for gds32.dll) databaseReadMeInstallationFirebird12 = databaseReadMeInstallationFirebird13 = 4. -Do not forget to rename c:\PHP\gds32.dll databaseReadMeInstallationFirebird14 = databaseReadMeInstallationFirebird15 = 5. -If you use Delphi for PHP you will have to rename all the gds32.dll files in the databaseReadMeInstallationFirebird16 = Delphi for PHP (sub) directories. This are totally 4 gds32.dll files databaseReadMeInstallationFirebird17 = (in Delphi for PHP\2.0\, Delphi for PHP\apache2\, Delphi for PHP\packages\, databaseReadMeInstallationFirebird18 = Delphi for PHP\php\). Otherwise you might get the error 'connection refused') databaseReadMeInstallationFirebird19 = databaseReadMeInstallationFirebird20 = 6. -The only correct gds32.dll is that one coming with your Firebird version. databaseReadMeInstallationFirebird21 = In the case of Firebird v1.5, databaseReadMeInstallationFirebird22 = you get that file by copying the file (located in the Firebird v1.5 directory) databaseReadMeInstallationFirebird23 = fbclient.dll to gds32.dll. databaseReadMeInstallationFirebird24 = Then copy this file gds32.dll to c:\windows\system32\ databaseReadMeInstallationFirebird25 = databaseReadMeInstallationFirebird26 = 7. -enable in php.ini databaseReadMeInstallationFirebird27 = databaseReadMeInstallationFirebird28 = extension=php_interbase.dll databaseReadMeInstallationFirebird29 = save the file, databaseReadMeInstallationFirebird30 = then restart your webserver (e.g. Microsoft Internet Information Server (IIS): 'C:\WINDOWS\system32\iisreset.exe /restart') databaseReadMeInstallationFirebird31 = databaseReadMeInstallationFirebird32 = 8. -Set all display_errors to 'On' in php.ini databaseReadMeInstallationFirebird33 = databaseReadMeInstallationFirebird34 = 9. -You can check the dll version (right click in Microsoft Explorer databaseReadMeInstallationFirebird35 = on filename->Properties->tab version) ; ---------------------------------------------------------------------- ; -Database: Product: ReadMe: Installation: Interbase ; databaseReadMeInstallationInterbase1 = 1. -You will have to replace the gds32.dll in c:\windows\system32 databaseReadMeInstallationInterbase2 = by a gds32.dll from Interbase. databaseReadMeInstallationInterbase3 = Otherwise if you e.g. start 'isql.exe -U username -P password' databaseReadMeInstallationInterbase4 = the Interbase server will crash immediately databaseReadMeInstallationInterbase5 = 2. -gds32.dll is the dll containing all procedures/functions used by PHP databaseReadMeInstallationInterbase6 = to connect to the Interbase database databaseReadMeInstallationInterbase7 = databaseReadMeInstallationInterbase8 = 3. -You have to put the correct gds32.dll in c:\windows\system32\. databaseReadMeInstallationInterbase9 = databaseReadMeInstallationInterbase10 = The best solution is to rename all existing gds32.dll on your computer databaseReadMeInstallationInterbase11 = (do e.g. a Microsoft Windows 'search' (via 'All programs') for gds32.dll) databaseReadMeInstallationInterbase12 = databaseReadMeInstallationInterbase13 = 4. -Do not forget to rename c:\PHP\gds32.dll databaseReadMeInstallationInterbase14 = databaseReadMeInstallationInterbase15 = 5. -If you use Delphi for PHP you will have to rename all the gds32.dll files in the databaseReadMeInstallationInterbase16 = Delphi for PHP (sub) directories. This are totally 4 gds32.dll files databaseReadMeInstallationInterbase17 = (in Delphi for PHP\2.0\, Delphi for PHP\apache2\, Delphi for PHP\packages\, databaseReadMeInstallationInterbase18 = Delphi for PHP\php\). Otherwise you might get the error 'connection refused') databaseReadMeInstallationInterbase19 = databaseReadMeInstallationInterbase20 = 6. -The only correct gds32.dll is that one coming with your Interbase version. databaseReadMeInstallationInterbase21 = databaseReadMeInstallationInterbase22 = databaseReadMeInstallationInterbase23 = 7. -Before rename or copying gds32.dll, stop your webserver (e.g. iis) databaseReadMeInstallationInterbase24 = otherwise you might get a message that another process is accessing it. databaseReadMeInstallationInterbase25 = databaseReadMeInstallationInterbase26 = 8. -enable in php.ini databaseReadMeInstallationInterbase27 = databaseReadMeInstallationInterbase28 = extension=php_interbase.dll databaseReadMeInstallationInterbase29 = save the file, databaseReadMeInstallationInterbase30 = then restart your webserver (e.g. Microsoft Internet Information Server (IIS): 'C:\WINDOWS\system32\iisreset.exe /restart') databaseReadMeInstallationInterbase31 = databaseReadMeInstallationInterbase32 = 9. -Set all display_errors to 'On' in php.ini databaseReadMeInstallationInterbase33 = databaseReadMeInstallationInterbase34 = 10. -You can check the dll version (right click in Microsoft Explorer databaseReadMeInstallationInterbase35 = databaseReadMeInstallationInterbase36 = 11. -If you get error ''Dynamic SQL Error: -SQL error code = -804. -SQLDA missing or incorrect version, or incorrect number/type of variables'' databaseReadMeInstallationInterbase37 = replace the gds32.dll with a correct version gds32.dll (trying a higher version might also work) databaseReadMeInstallationInterbase38 = databaseReadMeInstallationInterbase39 = 12. -Manually restart Interbase server (ibserver.exe -a) when you get the error in your webpage databaseReadMeInstallationInterbase40 = Error: 'Could not connect to the database host computer: Unable to complete network request to host "localhost". Failed to establish a connection. No connection could be made because the target machine actively refused it.' ; ---------------------------------------------------------------------- ; -Database: Product: ReadMe: Installation: Oracle ; databaseReadMeInstallationOracle1 = 1. -enable in php.ini databaseReadMeInstallationOracle2 = databaseReadMeInstallationOracle3 = extension=php_oci8.dll databaseReadMeInstallationOracle4 = extension=php_pdo_oci.dll databaseReadMeInstallationOracle5 = extension=php_pdo_oci8.dll databaseReadMeInstallationOracle6 = databaseReadMeInstallationOracle7 = then restart your webserver (e.g. Microsoft Internet Information Server (IIS): 'C:\WINDOWS\system32\iisreset.exe /restart') databaseReadMeInstallationOracle8 = databaseReadMeInstallationOracle9 = 2. -Set all display_errors to 'On' in php.ini ; ---------------------------------------------------------------------- ; -Database: Product: Which database product are you using? ; ; (do not change this names (on the right hand site) itself, ; as they might be used verbatim (concatenated to the end of string) ; and checked for in this TSE macro. ; ; You can only enable one option (e.g. MySql) at a time. ; ; If you want to use another database product, you have to restart the TSE ; macro again, after you enabled that database product line here, or chose ; it from the menu, after restaart. ; ; ; got this working [kn, ri, su, 17-08-2008 14:41:36] ; (after about 3 days trying) ; databaseProduct1S = Firebird ; databaseProduct2S = IbmDb2 ; databaseProduct3S = Informix ; databaseProduct4S = Ingres ; ; got this working [kn, ri, mo, 18-08-2008 03:41:23] ; after a few hours trying (because Firebird is almost ; similar, and that was already solved) ; databaseProduct5S = Interbase ; ; got this working [kn, ri, we, 06-08-2008 03:45:54] ; after about 1 day trying ; databaseProduct6S = MicrosoftSqlServer ; ; got this working [kn, ri, mo, 04-08-2008 20:26:20] ; after about 1 day trying ; databaseProduct7S = MySql ; databaseProduct8S = Odbc ; databaseProduct9S = Oracle ; databaseProduct10S = PostGreSql ; ; I got it working for Sqlite v2, first when using PHP v5.2.2, finally with latest PHP version (currently PHP v5.2.6) ; after about 2 days trying [kn, ri, fr, 08-08-2008 03:43:49] ; databaseProduct11S = Sqlite ; databaseProduct12S = Sybase ; ---------------------------------------------------------------------- ; -Database: Name: Remote: What is the name of your remote database? ; ; (in which you store the table) ; ; Choose any name of your liking. ; ; But make sure that database exists ; (use e.g. CREATE <your database name>, ; in your database client, if applicable, ; ; or check e.g. with your provider (support)) ; databaseNameRemoteFirebirdS = database1 databaseNameRemoteIbmDb2S = database1 databaseNameRemoteInformixS = database1 databaseNameRemoteIngresS = database1 databaseNameRemoteInterbaseS = database1 databaseNameRemoteMicrosoftSqlServerS = database1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseNameRemoteMySqlS = database1 ; #REMOVE above and enable ';' below ; databaseNameRemoteMySqlS = yourDatabaseNameAtProvider ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseNameRemoteOdbcS = database1 databaseNameRemoteOracleS = database1 databaseNameRemotePostGreSqlS = database1 databaseNameRemoteSqliteS = database1 databaseNameRemoteSybaseS = database1 ; ---------------------------------------------------------------------- ; -How many tables totally are used in your database? ; databaseTableTotalS = 2 ; ---------------------------------------------------------------------- ; -Database: Table: Name: Remote: What is the name of your remote database table? 1 ; ; Choose any name of your liking. ; ; This remote database table is usually not automatically deleted and recreated when you start this TSE macro, ; because how to automate this would depend on how you perform this action on your database at your provider ; databaseTableNameRemote1FirebirdS = table1 databaseTableNameRemote1IbmDb2S = table1 databaseTableNameRemote1InformixS = table1 databaseTableNameRemote1IngresS = table1 databaseTableNameRemote1InterbaseS = table1 databaseTableNameRemote1MicrosoftSqlServerS = table1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseTableNameRemote1MySqlS = table1 ; #REMOVE above and enable ';' below ; databaseTableNameRemote1MySqlS = yourDatabaseTableNameAtProvider ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseTableNameRemote1OdbcS = table1 databaseTableNameRemote1OracleS = table1 databaseTableNameRemote1PostGreSqlS = table1 databaseTableNameRemote1SqliteS = table1 databaseTableNameRemote1SybaseS = table1 ; ---------------------------------------------------------------------- ; -Database: Table: Name: Remote: What is the name of your remote database table? ; ; Choose any name of your liking. ; ; This remote database table is usually not automatically deleted and recreated when you start this TSE macro, ; because how to automate this would depend on how you perform this action on your database at your provider ; databaseTableNameRemoteFirebirdS = table2 databaseTableNameRemoteIbmDb2S = table2 databaseTableNameRemoteInformixS = table2 databaseTableNameRemoteIngresS = table2 databaseTableNameRemoteInterbaseS = table2 databaseTableNameRemoteMicrosoftSqlServerS = table2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseTableNameRemoteMySqlS = table2 ; #REMOVE above and enable ';' below ; databaseTableNameRemoteMySqlS = yourDatabaseTableNameAtProvider ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseTableNameRemoteOdbcS = table2 databaseTableNameRemoteOracleS = table2 databaseTableNameRemotePostGreSqlS = table2 databaseTableNameRemoteSqliteS = table2 databaseTableNameRemoteSybaseS = table2 ; ---------------------------------------------------------------------- ; -Database: Table: Name: Remote: What is the name of your remote database table? 2 ; ; Choose any name of your liking. ; ; This remote database table is usually not automatically deleted and recreated when you start this TSE macro, ; because how to automate this would depend on how you perform this action on your database at your provider ; databaseTableNameRemote2FirebirdS = table2 databaseTableNameRemote2IbmDb2S = table2 databaseTableNameRemote2InformixS = table2 databaseTableNameRemote2IngresS = table2 databaseTableNameRemote2InterbaseS = table2 databaseTableNameRemote2MicrosoftSqlServerS = table2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseTableNameRemote2MySqlS = table2 ; #REMOVE above and enable ';' below ; databaseTableNameRemote2MySqlS = yourDatabaseTableNameAtProvider ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseTableNameRemote2OdbcS = table2 databaseTableNameRemote2OracleS = table2 databaseTableNameRemote2PostGreSqlS = table2 databaseTableNameRemote2SqliteS = table2 databaseTableNameRemote2SybaseS = table2 ; ---------------------------------------------------------------------- ; -What is the database table name you want to use on your web pages for this table? ; (e.g. in <TITLE>) ; tableNameWebPage = Address Database ; ---------------------------------------------------------------------- ; -How many columns totally are used in your database table? 1 ; tableColumnTotalS = 9 ; ---------------------------------------------------------------------- ; -How many columns totally are used in your database table? 1 ; tableColumnTotal1S = 9 ; ---------------------------------------------------------------------- ; -How many columns totally are used in your database table? 2 ; tableColumnTotal2S = 9 ; ---------------------------------------------------------------------- ; -What is the description of the names used for your table columns? ; (will be shown e.g. in your HTML input fields) ; tableColumnNameDescription1S = id tableColumnNameDescription2S = Foreign Key 1 tableColumnNameDescription3S = First Name tableColumnNameDescription4S = Last Name tableColumnNameDescription5S = Address tableColumnNameDescription6S = City tableColumnNameDescription7S = Country tableColumnNameDescription8S = Description tableColumnNameDescription9S = Date ; ---------------------------------------------------------------------- ; -What are the names used for your table columns? 1 ; tableColumnNameVariable1S = idI tableColumnNameVariable2S = foreignKeyI tableColumnNameVariable3S = firstNameS tableColumnNameVariable4S = lastNameS tableColumnNameVariable5S = addressS tableColumnNameVariable6S = cityS tableColumnNameVariable7S = countryS tableColumnNameVariable8S = descriptionS tableColumnNameVariable9S = dateS ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Firebird: 1 ; tableColumnType1FirebirdS = INT tableColumnType2FirebirdS = INT tableColumnType3FirebirdS = VARCHAR( 50 ) tableColumnType4FirebirdS = VARCHAR( 50 ) tableColumnType5FirebirdS = VARCHAR( 100 ) tableColumnType6FirebirdS = VARCHAR( 50 ) tableColumnType7FirebirdS = VARCHAR( 50 ) tableColumnType8FirebirdS = VARCHAR( 50 ) tableColumnType9FirebirdS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? IBM DB2: 1 ; tableColumnType1IbmDb2S = INT( 4 ) tableColumnType2IbmDb2S = INT( 4 ) tableColumnType3IbmDb2S = VARCHAR( 50 ) tableColumnType4IbmDb2S = VARCHAR( 50 ) tableColumnType5IbmDb2S = VARCHAR( 100 ) tableColumnType6IbmDb2S = VARCHAR( 50 ) tableColumnType7IbmDb2S = VARCHAR( 50 ) tableColumnType8IbmDb2S = TEXT tableColumnType9IbmDb2S = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Informix: 1 ; tableColumnType1InformixS = INT( 4 ) tableColumnType2InformixS = INT( 4 ) tableColumnType3InformixS = VARCHAR( 50 ) tableColumnType4InformixS = VARCHAR( 50 ) tableColumnType5InformixS = VARCHAR( 100 ) tableColumnType6InformixS = VARCHAR( 50 ) tableColumnType7InformixS = VARCHAR( 50 ) tableColumnType8InformixS = TEXT tableColumnType9InformixS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Ingres: 1 ; tableColumnType1IngresS = INT( 4 ) tableColumnType2IngresS = INT( 4 ) tableColumnType3IngresS = VARCHAR( 50 ) tableColumnType4IngresS = VARCHAR( 50 ) tableColumnType5IngresS = VARCHAR( 100 ) tableColumnType6IngresS = VARCHAR( 50 ) tableColumnType7IngresS = VARCHAR( 50 ) tableColumnType8IngresS = TEXT tableColumnType9IngresS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Interbase: 1 ; tableColumnType1InterbaseS = INT tableColumnType2InterbaseS = INT tableColumnType3InterbaseS = VARCHAR( 50 ) tableColumnType4InterbaseS = VARCHAR( 50 ) tableColumnType5InterbaseS = VARCHAR( 100 ) tableColumnType6InterbaseS = VARCHAR( 50 ) tableColumnType7InterbaseS = VARCHAR( 50 ) ; ; it looks like Interbase does not know the variable type 'TEXT' ; tableColumnType8InterbaseS = VARCHAR( 50 ) tableColumnType9InterbaseS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? MySql: 1 ; tableColumnType1MySqlS = INT( 4 ) AUTO_INCREMENT PRIMARY KEY tableColumnType2MySqlS = INT( 4 ) tableColumnType3MySqlS = VARCHAR( 50 ) tableColumnType4MySqlS = VARCHAR( 50 ) tableColumnType5MySqlS = VARCHAR( 100 ) tableColumnType6MySqlS = VARCHAR( 50 ) tableColumnType7MySqlS = VARCHAR( 50 ) tableColumnType8MySqlS = TEXT tableColumnType9MySqlS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Microsoft SQL server: 1 ; tableColumnType1MicrosoftSqlServerS = INT tableColumnType2MicrosoftSqlServerS = INT tableColumnType3MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType4MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType5MicrosoftSqlServerS = VARCHAR( 100 ) tableColumnType6MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType7MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType8MicrosoftSqlServerS = TEXT tableColumnType9MicrosoftSqlServerS = VARCHAR( 50 ) ; ; // debug further: autoincrement is still not working OK: 1. tableColumnTypeExtraMicrosoftSqlServerS = SET IDENTITY_INSERT database1.dbo.table2 ON ; // debug further: autoincrement is still not working OK: 2. this does not work if you want to insert: tableColumnType1MicrosoftSqlServerS = INT IDENTITY( 1, 1 ) PRIMARY KEY NOT NULL ; ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Microsoft SQL server: 2 ; tableColumnType21MicrosoftSqlServerS = INT tableColumnType22MicrosoftSqlServerS = INT tableColumnType23MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType24MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType25MicrosoftSqlServerS = VARCHAR( 100 ) tableColumnType26MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType27MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType28MicrosoftSqlServerS = TEXT tableColumnType29MicrosoftSqlServerS = VARCHAR( 50 ) ; ; // debug further: autoincrement is still not working OK: 1. tableColumnTypeExtraMicrosoftSqlServerS = SET IDENTITY_INSERT database1.dbo.table2 ON ; // debug further: autoincrement is still not working OK: 2. this does not work if you want to insert: tableColumnType1MicrosoftSqlServerS = INT IDENTITY( 1, 1 ) PRIMARY KEY NOT NULL ; ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Odbc: 1 ; tableColumnType11OdbcS = INT( 4 ) tableColumnType12OdbcS = INT( 4 ) tableColumnType13OdbcS = VARCHAR( 50 ) tableColumnType14OdbcS = VARCHAR( 50 ) tableColumnType15OdbcS = VARCHAR( 100 ) tableColumnType16OdbcS = VARCHAR( 50 ) tableColumnType17OdbcS = VARCHAR( 50 ) tableColumnType18OdbcS = TEXT tableColumnType19OdbcS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Odbc: 2 ; tableColumnType21OdbcS = INT( 4 ) tableColumnType22OdbcS = INT( 4 ) tableColumnType23OdbcS = VARCHAR( 50 ) tableColumnType24OdbcS = VARCHAR( 50 ) tableColumnType25OdbcS = VARCHAR( 100 ) tableColumnType26OdbcS = VARCHAR( 50 ) tableColumnType27OdbcS = VARCHAR( 50 ) tableColumnType28OdbcS = TEXT tableColumnType29OdbcS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Oracle: 1 ; tableColumnType1OracleS = NUMBER tableColumnType2OracleS = NUMBER tableColumnType3OracleS = VARCHAR2( 50 ) tableColumnType4OracleS = VARCHAR2( 50 ) tableColumnType5OracleS = VARCHAR2( 100 ) tableColumnType6OracleS = VARCHAR2( 50 ) tableColumnType7OracleS = VARCHAR2( 50 ) tableColumnType8OracleS = VARCHAR2( 100 ) tableColumnType9OracleS = VARCHAR2( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Oracle: 1 ; tableColumnType11OracleS = NUMBER tableColumnType12OracleS = NUMBER tableColumnType13OracleS = VARCHAR2( 50 ) tableColumnType14OracleS = VARCHAR2( 50 ) tableColumnType15OracleS = VARCHAR2( 100 ) tableColumnType16OracleS = VARCHAR2( 50 ) tableColumnType17OracleS = VARCHAR2( 50 ) tableColumnType18OracleS = VARCHAR2( 100 ) tableColumnType19OracleS = VARCHAR2( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Oracle: 2 ; tableColumnType21OracleS = NUMBER tableColumnType22OracleS = NUMBER tableColumnType23OracleS = VARCHAR2( 50 ) tableColumnType24OracleS = VARCHAR2( 50 ) tableColumnType25OracleS = VARCHAR2( 100 ) tableColumnType26OracleS = VARCHAR2( 50 ) tableColumnType27OracleS = VARCHAR2( 50 ) tableColumnType28OracleS = VARCHAR2( 100 ) tableColumnType29OracleS = VARCHAR2( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? PostGreSql: 1 ; tableColumnType11PostGreSqlS = INT( 4 ) tableColumnType12PostGreSqlS = INT( 4 ) tableColumnType13PostGreSqlS = VARCHAR( 50 ) tableColumnType14PostGreSqlS = VARCHAR( 50 ) tableColumnType15PostGreSqlS = VARCHAR( 100 ) tableColumnType16PostGreSqlS = VARCHAR( 50 ) tableColumnType17PostGreSqlS = VARCHAR( 50 ) tableColumnType18PostGreSqlS = TEXT tableColumnType19PostGreSqlS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? PostGreSql: 2 ; tableColumnType21PostGreSqlS = INT( 4 ) tableColumnType22PostGreSqlS = INT( 4 ) tableColumnType23PostGreSqlS = VARCHAR( 50 ) tableColumnType24PostGreSqlS = VARCHAR( 50 ) tableColumnType25PostGreSqlS = VARCHAR( 100 ) tableColumnType26PostGreSqlS = VARCHAR( 50 ) tableColumnType27PostGreSqlS = VARCHAR( 50 ) tableColumnType28PostGreSqlS = TEXT tableColumnType29PostGreSqlS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sqlite ; tableColumnType1SqliteS = INTEGER PRIMARY KEY tableColumnType2SqliteS = INTEGER tableColumnType3SqliteS = VARCHAR( 50 ) tableColumnType4SqliteS = VARCHAR( 50 ) tableColumnType5SqliteS = VARCHAR( 100 ) tableColumnType6SqliteS = VARCHAR( 50 ) tableColumnType7SqliteS = VARCHAR( 50 ) tableColumnType8SqliteS = TEXT tableColumnType9SqliteS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sqlite: 1 ; tableColumnType11SqliteS = INTEGER PRIMARY KEY tableColumnType12SqliteS = INTEGER tableColumnType13SqliteS = VARCHAR( 50 ) tableColumnType14SqliteS = VARCHAR( 50 ) tableColumnType15SqliteS = VARCHAR( 100 ) tableColumnType16SqliteS = VARCHAR( 50 ) tableColumnType17SqliteS = VARCHAR( 50 ) tableColumnType18SqliteS = TEXT tableColumnType19SqliteS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sqlite: 2 ; tableColumnType21SqliteS = INTEGER PRIMARY KEY tableColumnType22SqliteS = INTEGER tableColumnType23SqliteS = VARCHAR( 50 ) tableColumnType24SqliteS = VARCHAR( 50 ) tableColumnType25SqliteS = VARCHAR( 100 ) tableColumnType26SqliteS = VARCHAR( 50 ) tableColumnType27SqliteS = VARCHAR( 50 ) tableColumnType28SqliteS = TEXT tableColumnType29SqliteS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sybase: 1 ; tableColumnType11SybaseS = INT( 4 ) tableColumnType12SybaseS = INT( 4 ) tableColumnType13SybaseS = VARCHAR( 50 ) tableColumnType14SybaseS = VARCHAR( 50 ) tableColumnType15SybaseS = VARCHAR( 100 ) tableColumnType16SybaseS = VARCHAR( 50 ) tableColumnType17SybaseS = VARCHAR( 50 ) tableColumnType18SybaseS = TEXT tableColumnType19SybaseS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sybase: 2 ; tableColumnType21SybaseS = INT( 4 ) tableColumnType22SybaseS = INT( 4 ) tableColumnType23SybaseS = VARCHAR( 50 ) tableColumnType24SybaseS = VARCHAR( 50 ) tableColumnType25SybaseS = VARCHAR( 100 ) tableColumnType26SybaseS = VARCHAR( 50 ) tableColumnType27SybaseS = VARCHAR( 50 ) tableColumnType28SybaseS = TEXT tableColumnType29SybaseS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What is the description of the names used for your table columns? ; (will be shown e.g. in your HTML input fields) ; tableColumnNameDescription11S = id tableColumnNameDescription12S = Foreign Key 1 tableColumnNameDescription13S = First Name tableColumnNameDescription14S = Last Name tableColumnNameDescription15S = Address tableColumnNameDescription16S = City tableColumnNameDescription17S = Country tableColumnNameDescription18S = Description tableColumnNameDescription19S = Date ; ---------------------------------------------------------------------- tableColumnNameDescription21S = id tableColumnNameDescription22S = Foreign Key 2 tableColumnNameDescription23S = Column1 tableColumnNameDescription24S = Column2 tableColumnNameDescription25S = Column3 tableColumnNameDescription26S = Column4 tableColumnNameDescription27S = Column5 tableColumnNameDescription28S = Column6 tableColumnNameDescription29S = Column7 ; ---------------------------------------------------------------------- ; -What are the names used for your table columns? 1 ; tableColumnNameVariable11S = idI tableColumnNameVariable12S = foreignKey2I tableColumnNameVariable13S = firstNameS tableColumnNameVariable14S = lastNameS tableColumnNameVariable15S = addressS tableColumnNameVariable16S = cityS tableColumnNameVariable17S = countryS tableColumnNameVariable18S = descriptionS tableColumnNameVariable19S = dateS ; ---------------------------------------------------------------------- ; -What are the names used for your table columns? 2 ; tableColumnNameVariable21S = idI tableColumnNameVariable22S = ForeignKey2S tableColumnNameVariable23S = Column1S tableColumnNameVariable24S = Column2S tableColumnNameVariable25S = Column3S tableColumnNameVariable26S = Column4S tableColumnNameVariable27S = Column5S tableColumnNameVariable28S = Column6S tableColumnNameVariable29S = Column7S ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? ; ; (currently 'INT', ; 'VARCHAR' ; 'TEXT' ; are are used. ; ; (E.g. 'BLOB' should follow soon)) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Firebird: 1 ; tableColumnType11FirebirdS = INT tableColumnType12FirebirdS = INT tableColumnType13FirebirdS = VARCHAR( 50 ) tableColumnType14FirebirdS = VARCHAR( 50 ) tableColumnType15FirebirdS = VARCHAR( 100 ) tableColumnType16FirebirdS = VARCHAR( 50 ) tableColumnType17FirebirdS = VARCHAR( 50 ) ; ; it looks like Firebird does not know the variable type 'TEXT' ; tableColumnType18FirebirdS = VARCHAR( 50 ) tableColumnType19FirebirdS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Firebird: 2 ; tableColumnType21FirebirdS = INT tableColumnType22FirebirdS = INT tableColumnType23FirebirdS = VARCHAR( 50 ) tableColumnType24FirebirdS = VARCHAR( 50 ) tableColumnType25FirebirdS = VARCHAR( 100 ) tableColumnType26FirebirdS = VARCHAR( 50 ) tableColumnType27FirebirdS = VARCHAR( 50 ) ; ; it looks like Firebird does not know the variable type 'TEXT' ; tableColumnType28FirebirdS = VARCHAR( 50 ) tableColumnType29FirebirdS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? IBM DB2: 1 ; tableColumnType11IbmDb2S = INT( 4 ) tableColumnType12IbmDb2S = INT( 4 ) tableColumnType13IbmDb2S = VARCHAR( 50 ) tableColumnType14IbmDb2S = VARCHAR( 50 ) tableColumnType15IbmDb2S = VARCHAR( 100 ) tableColumnType16IbmDb2S = VARCHAR( 50 ) tableColumnType17IbmDb2S = VARCHAR( 50 ) tableColumnType18IbmDb2S = TEXT tableColumnType19IbmDb2S = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? IBM DB2: 2 ; tableColumnType21IbmDb2S = INT( 4 ) tableColumnType22IbmDb2S = INT( 4 ) tableColumnType23IbmDb2S = VARCHAR( 50 ) tableColumnType24IbmDb2S = VARCHAR( 50 ) tableColumnType25IbmDb2S = VARCHAR( 100 ) tableColumnType26IbmDb2S = VARCHAR( 50 ) tableColumnType27IbmDb2S = VARCHAR( 50 ) tableColumnType28IbmDb2S = TEXT tableColumnType29IbmDb2S = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Informix: 1 ; tableColumnType11InformixS = INT( 4 ) tableColumnType12InformixS = INT( 4 ) tableColumnType13InformixS = VARCHAR( 50 ) tableColumnType14InformixS = VARCHAR( 50 ) tableColumnType15InformixS = VARCHAR( 100 ) tableColumnType16InformixS = VARCHAR( 50 ) tableColumnType17InformixS = VARCHAR( 50 ) tableColumnType18InformixS = TEXT tableColumnType19InformixS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Informix: 2 ; tableColumnType21InformixS = INT( 4 ) tableColumnType22InformixS = INT( 4 ) tableColumnType23InformixS = VARCHAR( 50 ) tableColumnType24InformixS = VARCHAR( 50 ) tableColumnType25InformixS = VARCHAR( 100 ) tableColumnType26InformixS = VARCHAR( 50 ) tableColumnType27InformixS = VARCHAR( 50 ) tableColumnType28InformixS = TEXT tableColumnType29InformixS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Ingres: 1 ; tableColumnType11IngresS = INT( 4 ) tableColumnType12IngresS = INT( 4 ) tableColumnType13IngresS = VARCHAR( 50 ) tableColumnType14IngresS = VARCHAR( 50 ) tableColumnType15IngresS = VARCHAR( 100 ) tableColumnType16IngresS = VARCHAR( 50 ) tableColumnType17IngresS = VARCHAR( 50 ) tableColumnType18IngresS = TEXT tableColumnType19IngresS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Ingres: 2 ; tableColumnType21IngresS = INT( 4 ) tableColumnType22IngresS = INT( 4 ) tableColumnType23IngresS = VARCHAR( 50 ) tableColumnType24IngresS = VARCHAR( 50 ) tableColumnType25IngresS = VARCHAR( 100 ) tableColumnType26IngresS = VARCHAR( 50 ) tableColumnType27IngresS = VARCHAR( 50 ) tableColumnType28IngresS = TEXT tableColumnType29IngresS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Interbase: 1 ; tableColumnType11InterbaseS = INT tableColumnType12InterbaseS = INT tableColumnType13InterbaseS = VARCHAR( 50 ) tableColumnType14InterbaseS = VARCHAR( 50 ) tableColumnType15InterbaseS = VARCHAR( 100 ) tableColumnType16InterbaseS = VARCHAR( 50 ) tableColumnType17InterbaseS = VARCHAR( 50 ) ; ; it looks like Interbase does not know the variable type 'TEXT' ; tableColumnType18InterbaseS = VARCHAR( 50 ) tableColumnType19InterbaseS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Interbase: 2 ; tableColumnType21InterbaseS = INT tableColumnType22InterbaseS = INT tableColumnType23InterbaseS = VARCHAR( 50 ) tableColumnType24InterbaseS = VARCHAR( 50 ) tableColumnType25InterbaseS = VARCHAR( 100 ) tableColumnType26InterbaseS = VARCHAR( 50 ) tableColumnType27InterbaseS = VARCHAR( 50 ) ; ; it looks like Interbase does not know the variable type 'TEXT' ; tableColumnType28InterbaseS = VARCHAR( 50 ) tableColumnType29InterbaseS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? MySql: 1 ; tableColumnType11MySqlS = INT( 4 ) AUTO_INCREMENT PRIMARY KEY tableColumnType12MySqlS = INT( 4 ) tableColumnType13MySqlS = VARCHAR( 50 ) tableColumnType14MySqlS = VARCHAR( 50 ) tableColumnType15MySqlS = VARCHAR( 100 ) tableColumnType16MySqlS = VARCHAR( 50 ) tableColumnType17MySqlS = VARCHAR( 50 ) tableColumnType18MySqlS = TEXT tableColumnType19MySqlS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? MySql: 2 ; tableColumnType21MySqlS = INT( 4 ) AUTO_INCREMENT PRIMARY KEY tableColumnType22MySqlS = INT( 4 ) tableColumnType23MySqlS = VARCHAR( 50 ) tableColumnType24MySqlS = VARCHAR( 50 ) tableColumnType25MySqlS = VARCHAR( 100 ) tableColumnType26MySqlS = VARCHAR( 50 ) tableColumnType27MySqlS = VARCHAR( 50 ) tableColumnType28MySqlS = TEXT tableColumnType29MySqlS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Microsoft SQL server: 1 ; tableColumnType11MicrosoftSqlServerS = INT tableColumnType12MicrosoftSqlServerS = INT tableColumnType13MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType14MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType15MicrosoftSqlServerS = VARCHAR( 100 ) tableColumnType16MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType17MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType18MicrosoftSqlServerS = TEXT tableColumnType19MicrosoftSqlServerS = VARCHAR( 50 ) ; ; // debug further: autoincrement is still not working OK: 1. tableColumnTypeExtraMicrosoftSqlServerS = SET IDENTITY_INSERT database1.dbo.table2 ON ; // debug further: autoincrement is still not working OK: 2. this does not work if you want to insert: tableColumnType1MicrosoftSqlServerS = INT IDENTITY( 1, 1 ) PRIMARY KEY NOT NULL ; ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Microsoft SQL server: 2 ; tableColumnType21MicrosoftSqlServerS = INT tableColumnType22MicrosoftSqlServerS = INT tableColumnType23MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType24MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType25MicrosoftSqlServerS = VARCHAR( 100 ) tableColumnType26MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType27MicrosoftSqlServerS = VARCHAR( 50 ) tableColumnType28MicrosoftSqlServerS = TEXT tableColumnType29MicrosoftSqlServerS = VARCHAR( 50 ) ; ; // debug further: autoincrement is still not working OK: 1. tableColumnTypeExtraMicrosoftSqlServerS = SET IDENTITY_INSERT database1.dbo.table2 ON ; // debug further: autoincrement is still not working OK: 2. this does not work if you want to insert: tableColumnType1MicrosoftSqlServerS = INT IDENTITY( 1, 1 ) PRIMARY KEY NOT NULL ; ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Odbc: 1 ; tableColumnType11OdbcS = INT( 4 ) tableColumnType12OdbcS = INT( 4 ) tableColumnType13OdbcS = VARCHAR( 50 ) tableColumnType14OdbcS = VARCHAR( 50 ) tableColumnType15OdbcS = VARCHAR( 100 ) tableColumnType16OdbcS = VARCHAR( 50 ) tableColumnType17OdbcS = VARCHAR( 50 ) tableColumnType18OdbcS = TEXT tableColumnType19OdbcS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Odbc: 2 ; tableColumnType21OdbcS = INT( 4 ) tableColumnType22OdbcS = INT( 4 ) tableColumnType23OdbcS = VARCHAR( 50 ) tableColumnType24OdbcS = VARCHAR( 50 ) tableColumnType25OdbcS = VARCHAR( 100 ) tableColumnType26OdbcS = VARCHAR( 50 ) tableColumnType27OdbcS = VARCHAR( 50 ) tableColumnType28OdbcS = TEXT tableColumnType29OdbcS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? PostGreSql: 1 ; tableColumnType11PostGreSqlS = INT( 4 ) tableColumnType12PostGreSqlS = INT( 4 ) tableColumnType13PostGreSqlS = VARCHAR( 50 ) tableColumnType14PostGreSqlS = VARCHAR( 50 ) tableColumnType15PostGreSqlS = VARCHAR( 100 ) tableColumnType16PostGreSqlS = VARCHAR( 50 ) tableColumnType17PostGreSqlS = VARCHAR( 50 ) tableColumnType18PostGreSqlS = TEXT tableColumnType19PostGreSqlS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? PostGreSql: 2 ; tableColumnType21PostGreSqlS = INT( 4 ) tableColumnType22PostGreSqlS = INT( 4 ) tableColumnType23PostGreSqlS = VARCHAR( 50 ) tableColumnType24PostGreSqlS = VARCHAR( 50 ) tableColumnType25PostGreSqlS = VARCHAR( 100 ) tableColumnType26PostGreSqlS = VARCHAR( 50 ) tableColumnType27PostGreSqlS = VARCHAR( 50 ) tableColumnType28PostGreSqlS = TEXT tableColumnType29PostGreSqlS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sqlite: 1 ; tableColumnType11SqliteS = INTEGER PRIMARY KEY tableColumnType12SqliteS = INTEGER tableColumnType13SqliteS = VARCHAR( 50 ) tableColumnType14SqliteS = VARCHAR( 50 ) tableColumnType15SqliteS = VARCHAR( 100 ) tableColumnType16SqliteS = VARCHAR( 50 ) tableColumnType17SqliteS = VARCHAR( 50 ) tableColumnType18SqliteS = TEXT tableColumnType19SqliteS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sqlite: 2 ; tableColumnType21SqliteS = INTEGER PRIMARY KEY tableColumnType22SqliteS = INTEGER tableColumnType23SqliteS = VARCHAR( 50 ) tableColumnType24SqliteS = VARCHAR( 50 ) tableColumnType25SqliteS = VARCHAR( 100 ) tableColumnType26SqliteS = VARCHAR( 50 ) tableColumnType27SqliteS = VARCHAR( 50 ) tableColumnType28SqliteS = TEXT tableColumnType29SqliteS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sybase: 1 ; tableColumnType11SybaseS = INT( 4 ) tableColumnType12SybaseS = INT( 4 ) tableColumnType13SybaseS = VARCHAR( 50 ) tableColumnType14SybaseS = VARCHAR( 50 ) tableColumnType15SybaseS = VARCHAR( 100 ) tableColumnType16SybaseS = VARCHAR( 50 ) tableColumnType17SybaseS = VARCHAR( 50 ) tableColumnType18SybaseS = TEXT tableColumnType19SybaseS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- ; -What are the data types used for your table columns? Sybase: 2 ; tableColumnType21SybaseS = INT( 4 ) tableColumnType22SybaseS = INT( 4 ) tableColumnType23SybaseS = VARCHAR( 50 ) tableColumnType24SybaseS = VARCHAR( 50 ) tableColumnType25SybaseS = VARCHAR( 100 ) tableColumnType26SybaseS = VARCHAR( 50 ) tableColumnType27SybaseS = VARCHAR( 50 ) tableColumnType28SybaseS = TEXT tableColumnType29SybaseS = VARCHAR( 50 ) ; ---------------------------------------------------------------------- databaseNameInstallationDownloadFirebirdS = Firebird v1.5 for Windows databaseNameInstallationDownloadIbmDb2S = DB2 Express-C v9.5 for Windows databaseNameInstallationDownloadInformixS = Informix Dynamic Server Developer Edition 11.5 for Windows databaseNameInstallationDownloadIngresS = Ingres Icebreaker 2006 (Release 2 Appliance ISO) for Windows databaseNameInstallationDownloadInterbaseS = Interbase v2007 Developer for Windows databaseNameInstallationDownloadMicrosoftSqlServerS = Microsoft SQL Server 2000 Trial databaseNameInstallationDownloadMySqlS = MySql v5.0.67 Community Server for Windows databaseNameInstallationDownloadOdbcS = Check e.g. the database vendor web sites for ODBC drivers for your database product. databaseNameInstallationDownloadOracleS = Oracle 10g Express Edition v10.2.0.1 for Windows databaseNameInstallationDownloadPostGreSqlS = PostGreSql v8.3.3.1 for Windows databaseNameInstallationDownloadSqliteS = Sqlite v2.8.17 databaseNameInstallationDownloadSybaseS = SyBase Adaptive Server Enterprise (ASE) version 15.0.2 Developer's Edition for Windows ; ---------------------------------------------------------------------- ; -Database: Download: Where to download database if you do not have it installed yet, and you want to install it? ; databaseInformationInstallationDownloadFirebirdS = Free version. No registration. Open source. databaseInformationInstallationDownloadIbmDb2S = Free version. Registration. databaseInformationInstallationDownloadInformixS = Free version. Registration. databaseInformationInstallationDownloadIngresS = Free version. Registration. Open source. databaseInformationInstallationDownloadInterbaseS = Free version. Registration. Non-expiring free edition for development use. databaseInformationInstallationDownloadMicrosoftSqlServerS = Trial version (90 days). Registration. databaseInformationInstallationDownloadMySqlS = Free version. No registration. databaseInformationInstallationDownloadOdbcS = Usually free versions exist. Check e.g. the database vendor web sites for ODBC drivers for your database product. databaseInformationInstallationDownloadOracleS = Free version. Registration. Free to develop, deploy, and distribute. databaseInformationInstallationDownloadPostGreSqlS = Free version. No registration. Open source. databaseInformationInstallationDownloadSqliteS = Free version. No registration. Open source. You must use Sqlite version 2 (if you decide to use Sqlite version 3, then this TSE macro will not work for Sqlite) databaseInformationInstallationDownloadSybaseS = Free version. Registration. ; ---------------------------------------------------------------------- ; -Database: Download: Where to download database if you do not have it installed yet, and you want to install it? ; databaseUrlInstallationDownloadFirebirdS = http://prdownloads.sourceforge.net/firebird/Firebird-1.5.5.4926-3-Win32.exe databaseUrlInstallationDownloadIbmDb2S = https://www14.software.ibm.com/webapp/iwm/web/pick.do?lang=en_US&source=swg-db2expresscviper2 databaseUrlInstallationDownloadInformixS = https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=ifxids&S_TACT=105AGX28&S_CMP=DLMAIN databaseUrlInstallationDownloadIngresS = http://esd.ingres.com/product/Ingres_Database/2006/Windows_32-Bit/R2_SP1_GA/ingres2006-9.1.1-103-com-win-x86-Full.zip/http databaseUrlInstallationDownloadInterbaseS = http://cc.codegear.com/Free.aspx?id=24713 databaseUrlInstallationDownloadMicrosoftSqlServerS = http://www.microsoft.com/downloads/details.aspx?FamilyID=D20BA6E1-F44C-4781-A6BB-F60E02DC1335&displaylang=en databaseUrlInstallationDownloadMySqlS = http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67-win32.zip/from/http://mysql.mirrors.webname.dk/ databaseUrlInstallationDownloadOdbcS = http://www.google.com databaseUrlInstallationDownloadOracleS = http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.html databaseUrlInstallationDownloadPostGreSqlS = http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fbinary%2Fv8.3.3%2Fwin32%2Fpostgresql-8.3.3-1-binaries-no-installer.zip databaseUrlInstallationDownloadSqliteS = http://www.sqlite.org/sqlite-2_8_17.zip databaseUrlInstallationDownloadSybaseS = http://download.sybase.com/eval/ase1502/ase1502_winx86_dev.zip ; ---------------------------------------------------------------------- ; -Language: Computer: Download: Where to download computer language if you do not have it installed yet, and you want to install it? ; languageComputerNameInstallationDownloadBbcbasicS = BBCBASIC for Windows v5.80a languageComputerNameInstallationDownloadCsharpS = Microsoft Visual C# 2008 Express edition languageComputerNameInstallationDownloadCplusPlusS = Microsoft Visual C++ 2008 Express edition languageComputerNameInstallationDownloadDelphiS = Borland Turbo Delphi Explorer languageComputerNameInstallationDownloadJavaS = Sun Netbeans languageComputerNameInstallationDownloadJspS = Sun Netbeans languageComputerNameInstallationDownloadPhpS = Codegear Delphi for PHP languageComputerNameInstallationDownloadPerlS = Komodo languageComputerNameInstallationDownloadPythonS = Komodo languageComputerNameInstallationDownloadRubyS = Komodo languageComputerNameInstallationDownloadTclS = Komodo languageComputerNameInstallationDownloadVisualBasicS = Microsoft Visual Visual Basic 2008 Express edition ; -------------------------------------------------- -------------------- ; -Language: Computer: Download: Where to download computer language if you do not have it installed yet, and you want to install it? ; languageComputerInformationInstallationDownloadBbcbasicS = Free version. No registration. Free evaluation version of BBC BASIC for Windows is fully functional except that the amount of memory available for the user's program, data and stack is restricted to 8 Kbytes. languageComputerInformationInstallationDownloadCsharpS = Free version. No registration. languageComputerInformationInstallationDownloadCplusPlusS = Free version. No registration. languageComputerInformationInstallationDownloadDelphiS = Free version. Registration. languageComputerInformationInstallationDownloadJavaS = Free version. ? languageComputerInformationInstallationDownloadJspS = Free version. ? languageComputerInformationInstallationDownloadPhpS = Trial version. Registration. languageComputerInformationInstallationDownloadPerlS = Free version. ? languageComputerInformationInstallationDownloadPythonS = Free version. ? languageComputerInformationInstallationDownloadRubyS = Free version. ? languageComputerInformationInstallationDownloadTclS = Free version. ? languageComputerInformationInstallationDownloadVisualBasicS = Free version. No registration. ; ---------------------------------------------------------------------- ; -Language: Computer: Download: Where to download computer language if you do not have it installed yet, and you want to install it? ; languageComputerUrlInstallationDownloadBbcbasicS = http://www.bbcbasic.co.uk/bbcwin/bbcwdemo.exe languageComputerUrlInstallationDownloadCsharpS = http://www.microsoft.com/express/download/ languageComputerUrlInstallationDownloadCplusPlusS = http://www.microsoft.com/express/download/ languageComputerUrlInstallationDownloadDelphiS = http://www.codegear.com/downloads/free/turbo languageComputerUrlInstallationDownloadJavaS = ? languageComputerUrlInstallationDownloadJspS = ? languageComputerUrlInstallationDownloadPhpS = ? languageComputerUrlInstallationDownloadPerlS = ? languageComputerUrlInstallationDownloadPythonS = ? languageComputerUrlInstallationDownloadRubyS = ? languageComputerUrlInstallationDownloadTclS = ? languageComputerUrlInstallationDownloadVisualBasicS = http://www.microsoft.com/express/download/ ; ---------------------------------------------------------------------- ; -Language: Computer: Download: Where to download computer language IDE, if you do not have it installed yet, and you want to install it? ; languageComputerIdeNameInstallationDownloadBbcbasicS = BBCBASIC for Windows v5.80a languageComputerIdeNameInstallationDownloadCsharpS = Microsoft Visual C# 2008 Express edition languageComputerIdeNameInstallationDownloadCplusPlusS = Microsoft Visual C++ 2008 Express edition languageComputerIdeNameInstallationDownloadDelphiS = Borland Turbo Delphi Explorer languageComputerIdeNameInstallationDownloadJavaS = Sun Netbeans languageComputerIdeNameInstallationDownloadJspS = Sun Netbeans languageComputerIdeNameInstallationDownloadPhpS = Codegear Delphi for PHP languageComputerIdeNameInstallationDownloadPerlS = Komodo languageComputerIdeNameInstallationDownloadPythonS = Komodo languageComputerIdeNameInstallationDownloadRubyS = Komodo languageComputerIdeNameInstallationDownloadTclS = Komodo languageComputerIdeNameInstallationDownloadVisualBasicS = Microsoft Visual Visual Basic 2008 Express edition ; -------------------------------------------------- -------------------- ; -Language: Computer: Download: Where to download computer language if you do not have it installed yet, and you want to install it? ; languageComputerIdeInformationInstallationDownloadBbcbasicS = Free version. No registration. Free evaluation version of BBC BASIC for Windows is fully functional except that the amount of memory available for the user's program, data and stack is restricted to 8 Kbytes. languageComputerIdeInformationInstallationDownloadCsharpS = Free version. No registration. languageComputerIdeInformationInstallationDownloadCplusPlusS = Free version. No registration. languageComputerIdeInformationInstallationDownloadDelphiS = Free version. Registration. languageComputerIdeInformationInstallationDownloadJavaS = Free version. ? languageComputerIdeInformationInstallationDownloadJspS = Free version. ? languageComputerIdeInformationInstallationDownloadPhpS = Trial version. Registration. languageComputerIdeInformationInstallationDownloadPerlS = Free version. ? languageComputerIdeInformationInstallationDownloadPythonS = Free version. ? languageComputerIdeInformationInstallationDownloadRubyS = Free version. ? languageComputerIdeInformationInstallationDownloadTclS = Free version. ? languageComputerIdeInformationInstallationDownloadVisualBasicS = Free version. No registration. ; ---------------------------------------------------------------------- ; -Language: Computer: Download: Where to download computer language if you do not have it installed yet, and you want to install it? ; languageComputerIdeUrlInstallationDownloadBbcbasicS = http://www.bbcbasic.co.uk/bbcwin/bbcwdemo.exe languageComputerIdeUrlInstallationDownloadCsharpS = http://www.microsoft.com/express/download/ languageComputerIdeUrlInstallationDownloadCplusPlusS = http://www.microsoft.com/express/download/ languageComputerIdeUrlInstallationDownloadDelphiS = http://www.codegear.com/downloads/free/turbo languageComputerIdeUrlInstallationDownloadJavaS = ? languageComputerIdeUrlInstallationDownloadJspS = ? languageComputerIdeUrlInstallationDownloadPhpS = ? languageComputerIdeUrlInstallationDownloadPerlS = ? languageComputerIdeUrlInstallationDownloadPythonS = ? languageComputerIdeUrlInstallationDownloadRubyS = ? languageComputerIdeUrlInstallationDownloadTclS = ? languageComputerIdeUrlInstallationDownloadVisualBasicS = http://www.microsoft.com/express/download/ ; ---------------------------------------------------------------------- ; -Web server: Download: Where to download web server if you do not have it installed yet, and you want to install it? Apache ; webServerUrlInstallationDownloadApacheS = ? webServerInformationInstallationDownloadApacheS = ? webServerNameInstallationDownloadApacheS = ? ; ---------------------------------------------------------------------- ; -Web server: Download: Where to download web server if you do not have it installed yet, and you want to install it? Microsoft Internet Information Server (IIS) ; ; webServerUrlInstallationDownloadIisS = If Microsoft Windows server 2000, 2003, 2008, it is default present. If you use Microsoft Windows XP Professional, you need your Microsoft Windows XP installation CD for it. webServerInformationInstallationDownloadIisS = see your Microsoft Windows CD webServerNameInstallationDownloadIisS = Microsoft Internet Information Server (IIS) v6.0 or v7.0 ; ---------------------------------------------------------------------- ; -What is the location and name of a possible stylesheet CSS file? ; filenameStyleSheetS = c:\temp\ddd.css ; ---------------------------------------------------------------------- ; -Web server: Name: Number: Which web server are you using? ; ; -Use that number to choose the web server name. E.g. 1 is Apache, 2 is Microsoft Internet Information Server (IIS) ; webServerNameCurrentNumberS = 2 ; ; You can only enable one option (currently only English). If you want to use another natural language name, you have to restart the TSE ; macro again, after you changed that natural language number line here). ; ---------------------------------------------------------------------- ; -Web: Server: Name: Which web server name are you using? ; ; (do not change the names itself, as they might be used verbatim (concatenated to the end of string) ; and checked for in this TSE macro. ; webServerName1S = Apache webServerName2S = Iis ; ---------------------------------------------------------------------- ; -Language: Natural: Name: Number: Which natural language name number are you using? ; ; -Use that number to choose the real natural language name. E.g. 3 is English, 5 is French, 6 is German ; languageNaturalNameCurrentNumberS = 3 ; ; You can only enable one option (currently only English). If you want to use another natural language name, you have to restart the TSE ; macro again, after you changed that natural language number line here). ; ---------------------------------------------------------------------- ; -Language: Natural: Name: Which natural language name are you using? ; ; (do not change the names itself, as they might be used verbatim (concatenated to the end of string) ; and checked for in this TSE macro. ; languageNaturalName1S = Danish languageNaturalName2S = Dutch languageNaturalName3S = English languageNaturalName4S = Finnish languageNaturalName5S = French languageNaturalName6S = German languageNaturalName7S = Italian languageNaturalName8S = Norwegian languageNaturalName9S = Portuguese languageNaturalName10S = Russian languageNaturalName11S = Spanish languageNaturalName12S = Swedish ; ---------------------------------------------------------------------- ; -Computer: Language: Name: Number: Which computer language name number are you using? ; ; -Use that number to choose the real computer language name. E.g. 7 is PHP, 8 is Perl ; languageComputerNameCurrentNumberS = 7 ; ; You can only enable one option (currently only PHP). If you want to use another computer language name, you have to restart the TSE ; macro again, after you enabled that computer language name line here). ; ; ---------------------------------------------------------------------- ; -Computer: Language: Name: Which computer language name are you using? ; ; (do not change the names itself, as they might be used verbatim (concatenated to the end of string) ; and checked for in this TSE macro. ; languageComputerName1S = Bbcbasic languageComputerName2S = Csharp languageComputerName3S = CplusPlus languageComputerName4S = Delphi languageComputerName5S = Java languageComputerName6S = Jsp languageComputerName7S = Php languageComputerName8S = Perl languageComputerName9S = Python languageComputerName10S = Ruby languageComputerName11S = Tcl languageComputerName12S = VisualBasic ; ---------------------------------------------------------------------- ; -File: Location: What should be the location and name of the generated computer language file? ; ; Note: your web server (e.g. IIS or Apache) should be enabled for that computer language (e.g. PHP) ; ; This location where you store the file should be in your web server document directory. ; ; (e.g. if IIS put it default in c:\inetpub\wwwroot\) ; ; (e.g. if Apache put it default in the 'htdocs' directory of your Apache installation) ; ; The filename itself is not really relevant, ; but it must have a filename extension that the web server can recognize (e.g .php for PHP, .jsp for JSP, ...) ; and handle accordingly ; ; fileNameLanguageComputerSourceCodeLocalPhpS = C:\pdrive\apache\Apache2\htdocs\ ; fileNameLanguageComputerSourceCodeLocalAspS = c:\inetpub\wwwroot\ddd.asp fileNameLanguageComputerSourceCodeLocalBbcbasicS = c:\temp\ddd.bas fileNameLanguageComputerSourceCodeLocalCplusPlusS = c:\temp\ddd.cpp fileNameLanguageComputerSourceCodeLocalCsharpS = c:\temp\ddd.cs fileNameLanguageComputerSourceCodeLocalDelphiS = c:\temp\ddd.del fileNameLanguageComputerSourceCodeLocalJavaS = c:\temp\ddd.java fileNameLanguageComputerSourceCodeLocalJspS = c:\inetpub\wwwroot\ddd.jsp fileNameLanguageComputerSourceCodeLocalPerlS = c:\inetpub\wwwroot\cgi-bin\ddd.pl fileNameLanguageComputerSourceCodeLocalPhpS = c:\inetpub\wwwroot\ddd.php fileNameLanguageComputerSourceCodeLocalPythonS = c:\inetpub\wwwroot\cgi-bin\ddd.py fileNameLanguageComputerSourceCodeLocalRubyS = c:\inetpub\wwwroot\cgi-bin\ddd.rb fileNameLanguageComputerSourceCodeLocalTclS = c:\inetpub\wwwroot\cgi-bin\ddd.tcl fileNameLanguageComputerSourceCodeLocalVisualBasicS = c:\temp\ddd.vb ; ---------------------------------------------------------------------- ; -Database: File: Location: What should be the location and name of the generated sql file which creates the database table? ; ; Where you choose this location and the filename is not really relevant ; fileNameDatabaseSqlLocalS = c:\temp\ddd.sql ; ---------------------------------------------------------------------- ; -PHP: File: Location: Database: Connection: What should be the location and name of the local PHP database connection file? ; ; This are .php include files containing your database connection data ; ; Because this database login information is usually not the same local computer ; and on your ftp server, this information is stored in 3 separate files, ; 1. one local file, ; 2. one file on the ftp server, ; 3. and one file which is your current database connection file ; (that will be the local file if working local, ; and the ftp file when working on the ftp site) ; (currently (default by design) this files are stored in the same directory as your .php file) ; fileNameDatabaseConnectionLocalAspS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalBbcbasicS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalCplusPlusS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalCsharpS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalDelphiS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalJavaS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalJspS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalPerlS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalPhpS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalPythonS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalRubyS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalTclS = databaseCrudLocal.inc fileNameDatabaseConnectionLocalVisualBasicS = databaseCrudLocal.inc ; ---------------------------------------------------------------------- ; -PHP: File: Location: Database: Connection: What should be the location and name of the remote PHP database connection file? ; ; Note: put it not in the same directory with the same name as the local database connection file, ; in order to avoid clashing/overwriting/using one another ; ; Thus put this in some other directory or give it another name ; fileNameDatabaseConnectionRemoteAspS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteBbcbasicS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteCplusPlusS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteCsharpS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteDelphiS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteJavaS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteJspS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemotePerlS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemotePhpS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemotePythonS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteRubyS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteTclS = c:\temp\databaseCrudFtpRemote.inc fileNameDatabaseConnectionRemoteVisualBasicS = c:\temp\databaseCrudFtpRemote.inc ; ---------------------------------------------------------------------- ; -PHP: File: Location: Database: Connection: What should be the location and name of the currently used PHP database connection file? ; fileNameDatabaseConnectionCurrentAspS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentBbcbasicS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentCplusPlusS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentCsharpS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentDelphiS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentJavaS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentJspS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentPerlS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentPhpS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentPythonS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentRubyS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentTclS = databaseCrudCurrent.inc fileNameDatabaseConnectionCurrentVisualBasicS = databaseCrudCurrent.inc ; ---------------------------------------------------------------------- ; -Program to stop the processes (to keep it clean) ; ; This program can be found on Microsoft Windows XP (Professional), Microsoft Windows 2003 server, possibly Microsoft Windows 2008 server ; It can not be found on the other Microsoft Windows versions ; programProcessStopMainS = c:\windows\system32\taskkill.exe ; programProcessStopParameterS = /F /IM ; ---------------------------------------------------------------------- ; -Browser: URL: Local: What should be the URL prefix on your local machine, used to test that .php file? ; ; (usually 'http://localhost/', or 'http://127.0.0.1/') ; urlLocalPrefixS = http://localhost/ ; ---------------------------------------------------------------------- ; -Browser: Executable: What is the location and name of your browser executable? ; ; (e.g. Microsoft Internet Explorer, Firefox, Mozilla, Opera, Flock, ...) ; ; browserExecutableS = C:\Program Files\Mozilla Firefox\firefox.exe ; browserExecutableS = C:\Program Files\Opera\opera.exe ; browserExecutableS = iexplore ; ---------------------------------------------------------------------- ; -Database: Server: Computer: IP address: Local: What is the IP address or name of the computer on which your local database server is listening? ; ; The easiest situation: ; ; If the database server is listening on this computer, choose (except for Oracle, you have to choose your computer name, or adapt tnsnames.ora) ; localhost ; or more general, the IP address ; 127.0.0.1 ; (note: this is defined in your host file on Microsoft Windows) ; ; If your database server is running on another computer than your current computer, ; if running MySql, you must usually allow access, by GRANTing access to that user (e.g. via 'mysql.exe') ; ; In that case choose the IP address (e.g. 10.20.30.40) of that other computer ; on which your database server software runs. ; ; If your computer name is known in the DNS, you can chose the computer name (e.g. YOURNETWORKCOMPUTER2) ;; (note: you might chose to add this computer name to your 'hosts' file, so that you can use ; that computer name instead of the IP address) ; databaseHostNameLocalFirebirdS = localhost databaseHostNameLocalIbmDb2S = localhost databaseHostNameLocalInformixS = localhost databaseHostNameLocalIngresS = localhost databaseHostNameLocalInterbaseS = localhost databaseHostNameLocalMicrosoftSqlServerS = localhost databaseHostNameLocalMySqlS = localhost databaseHostNameLocalOdbcS = localhost ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseHostNameLocalOracleS = DELLI8500 ; #REMOVE above and enable ';' below ; databaseHostNameLocalOracleS = <your computer name (or less constant, the current IP address of your computer>. Using localhost will not work, or you must manually adapt your tnsname.ora file, and put localhost in there) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseHostNameLocalSqliteS = localhost databaseHostNameLocalPostGreSqlS = localhost databaseHostNameLocalSybaseS = localhost ; ---------------------------------------------------------------------- ; -Database: Server: Computer: IP address: Remote: What is the IP address or name of the computer on which your remote database server is listening? ; ; This would usually be 'localhost'. ; ; Otherwise use the IP address or computer name as given by your provider (ask e.g. your provider support) ; databaseHostNameRemoteFirebirdS = localhost databaseHostNameRemoteIbmDb2S = localhost databaseHostNameRemoteInformixS = localhost databaseHostNameRemoteIngresS = localhost databaseHostNameRemoteInterbaseS = localhost databaseHostNameRemoteMicrosoftSqlServerS = localhost databaseHostNameRemoteMySqlS = localhost databaseHostNameRemoteOdbcS = localhost ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseHostNameRemoteOracleS = localhost ; #REMOVE above and enable ';' below ; databaseHostNameRemoteOracleS = <your computer name (or less constant, the current IP address of your computer>. Using localhost will not work, or you must manually adapt your tnsname.ora file, and put localhost in there) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseHostNameRemoteSqliteS = localhost databaseHostNameRemotePostGreSqlS = localhost databaseHostNameRemoteSybaseS = localhost ; ---------------------------------------------------------------------- ; -FTP: General information and errors ; ; If you should decide to upload your .php file to your ftp site, ; (so that it if wanted e.g. might become accessible from everywhere on the Internet, using a browser) ; make sure: ; ; 1. -that you have a database server installed on your provider site ; (you might have to ask your provider for the possibilities, all but MySql usually costs extra money) ; ; 2. -a database is created which you can use ; ; (the easiest is using the same databasename as above, ; e.g. 'database1', ; otherwise you must e.g. first create that database ; (usually using e.g. 'PhpMyAdmin', a browser, telnet or SSH) ; change the database name in this .ini file to the database used at your provider, ; save the .ini file, ; and run the TSE macro again, ; then upload that .php file ; to your ftp site) ; ; 3. -Errors while connecting to the database ; ; -If you have no correct hostname/username/password given in this .ini file ; you will get an error in your browser ; ; 'can not connect to MySql database' ; ; (it might also be that your database server was not up yet, thus trying again ; later might solve it) ; ; -If your database exists, and you can connect, but the table does not exist ; you will get an error in your browser ; ; "Table 'database.table' doesn't exist" ; ; In that case create that table, using the tools (e.g. PhPMyAdmin, or a web browser) ; to create that table. ; You can e.g. copy/paste the content of the database SQL file, ; and run that SQL commands (if possible in the database client for your provider) ; ---------------------------------------------------------------------- ; -FTP: Server: Name: What is your remote ftp server name? ; ; (e.g. ftp://yourftpserver.com) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ftpServerNameRemoteS = <your ftp site> ; #REMOVE above and enable ';' below ; ftpServerNameRemoteS = yourFtpServerName ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ---------------------------------------------------------------------- ; -Ftp: User: Name: What is your remote ftp user name? ; ; (e.g. check the ftp user name received from your provider) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ftpUserNameRemoteS = <your ftp user name> ; #REMOVE above and enable ';' below ; ftpUserNameRemoteS = yourFtpUserName ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ---------------------------------------------------------------------- ; -Ftp: Password: What is your remote ftp password? ; ; (e.g. check the ftp password received from your provider) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ftpPasswordRemoteS = <your ftppassword> ; #REMOVE above and enable ';' below ; ftpPasswordRemoteS = yourFtpPassword ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ---------------------------------------------------------------------- ; -Ftp: Directory: What is the location of the physical remote ftp directory in which your PHP file is stored? ; (e.g. wwwroot/) ; ; (check and or create this remote ftp directory e.g. using Total Commander) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ftpDirectoryRemoteS = wwwroot/project/test/ ; #REMOVE above and enable ';' below ; ftpDirectoryRemoteS = yourdirectory/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ---------------------------------------------------------------------- ; -Ftp: File: What should be the location and name of the local filename you put your ftp commands in? ; ; (used to upload your .php file (automatically using ftp) to your ftp site) ; fileNameFtpLocalS = c:\temp\ddd.ftp ; ---------------------------------------------------------------------- ; -Ftp: Executable: What is the location and name of your local Microsoft MSDOS ftp executable? ; ; Usually just 'ftp' or 'ftp.exe' should do ; (when your Microsoft Windows system32 directory is in your PATH) ; Otherwise you might have to give the full path (e.g. c:\windows\system32\ftp.exe) ; fileNameFtpExecutableLocalS = ftp.exe ; ---------------------------------------------------------------------- ; -Ftp: Browser: What is the url which you can usee to test your uploaded .php program? ; ; (it should thus usually include the (sub)directory path ; where you uploaded your .php program to) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; urlFtpRemoteS = http://www.knudvaneeden.com/project/test/ ; #REMOVE above and enable ';' below ; urlFtpRemoteS = http://www.yourwebsite.com/yourdirectory/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ---------------------------------------------------------------------- ; -Database: Executable: Server: Local: What is the location and name of the used local database server executable file? ; ; (to start the listening of your database server) ; ; (usually this executable is located in the 'bin' directory of your installed database) ; ; // do not use Firebird version 2: databaseServerExecutableLocalFirebirdS = C:\Program Files\Firebird\Firebird_2_1\bin\fbserver.exe ; databaseServerExecutableLocalFirebirdS = C:\Program Files\Firebird\Firebird_1_5\bin\fbserver.exe ; databaseServerExecutableLocalIbmDb2S = ? databaseServerExecutableLocalInformixS = ? databaseServerExecutableLocalIngresS = ? databaseServerExecutableLocalInterbaseS = C:\Program Files\Borland\InterBase\bin\ibserver.exe databaseServerExecutableLocalMicrosoftSqlServerS = C:\Program Files\Microsoft SQL Server\MSSQL\Binn\sqlservr.exe databaseServerExecutableLocalOdbcS = ? databaseServerExecutableLocalOracleS = C:\oracle\product\10.1.0\Db_1\BIN\oracle.exe databaseServerExecutableLocalPostGreSqlS = ? ; ; if using sqlite v2 ; ; only use this when using Sqlite 2. If so make sure extension php_sqlite.dll is enabled in php.ini. databaseServerExecutableLocalSqliteS = C:\Program Files\Sqlite\sqlite.exe ; ; if using sqlite v3 ; This TSE macro is not working with Sqlite 3. Should you still want to use it, make sure extension=php_pdo.dll and extension=php_pdo_external.dll are enabled in php.ini. databaseServerExecutableLocalSqliteS = C:\Program Files\Sqlite\sqlite3.exe ; databaseServerExecutableLocalSybaseS = ? databaseServerExecutableLocalMySqlS = C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe ; ---------------------------------------------------------------------- ; -Database: Executable: Client: Local: What is the location and name of the used local database client command line executable file? ; ; (usually this executable is located in the 'bin' directory of your installed database) ; ; // do not use Firebird version 2: databaseClientExecutableLocalFirebirdS = C:\Program Files\Firebird\Firebird_2_1\bin\isql.exe ; databaseClientExecutableLocalFirebirdS = C:\Program Files\Firebird\Firebird_1_5\bin\isql.exe ; databaseClientExecutableLocalIbmDb2S = ? databaseClientExecutableLocalInformixS = ? databaseClientExecutableLocalIngresS = ? databaseClientExecutableLocalInterbaseS = C:\Program Files\Borland\InterBase\bin\isql.exe databaseClientExecutableLocalMicrosoftSqlServerS = C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isql.exe databaseClientExecutableLocalMySqlS = C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe databaseClientExecutableLocalOdbcS = ? databaseClientExecutableLocalOracleS = C:\oracle\product\10.1.0\Db_1\BIN\sqlplus.exe databaseClientExecutableLocalPostGreSqlS = psql.exe? ; ; only use this when using Sqlite 2. If so make sure extension php_sqlite.dll is enabled in php.ini. ; Here using sqlite2, you can download it at http://mirror.lzu.edu.cn/software/sqlite.org/download.html ; databaseClientExecutableLocalSqliteS = C:\Program Files\Sqlite\sqlite.exe ; ; only use this when using Sqlite 3. If so make sure extension php_pdo.dll and php_pdo_external.dll are enabled in php.ini. You can not use sqlite_open(), but other functions. ; databaseClientExecutableLocalSqliteS = C:\Program Files\Sqlite\sqlite3.exe ; databaseClientExecutableLocalSybaseS = isql.exe // name is correct (similar to Microsoft SQL server, location check further [kn, am, we, 22-04-2009 15:54:21]) ; ---------------------------------------------------------------------- ; -Database: Executable: Client: Local: What is the location and name of the used remote database client? ; ; (usually this executable is located in the 'bin' directory of your installed database) ; databaseClientExecutableRemoteFirebirdS = ? databaseClientExecutableRemoteIbmDb2S = ? databaseClientExecutableRemoteInformixS = ? databaseClientExecutableRemoteIngresS = ? databaseClientExecutableRemoteInterbaseS = ? databaseClientExecutableRemoteMicrosoftSqlServerS = ? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseClientExecutableRemoteMySqlS = http://tools.byohosting.com ; #REMOVE above and enable ';' above ; databaseClientExecutableRemoteMySqlS = your database client URL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseClientExecutableRemoteOdbcS = ? databaseClientExecutableRemoteOracleS = ? databaseClientExecutableRemotePostGreSqlS = ? databaseClientExecutableRemoteSqliteS = ? databaseClientExecutableRemoteSybaseS = ? ; ---------------------------------------------------------------------- ; -PHP functions ; ; You need to enable the database dll in the extensions in your php.ini file ; ; E.g. in php.ini, remove the semi-colon ';' in front of this dll ; ; extension=php_mssql.dll ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Firebird ; fnDbConnectFirebirdS = ibase_connect fnDbCommitFirebirdS = ? fnDbExecuteFirebirdS = ? fnDbFreeResultFirebirdS = ibase_free_result fnDbErrorFirebirdS = ibase_errmsg fnDbSelectFirebirdS = not applicable, because in Firebird you connect to the database using ibase_connect() fnDbCloseFirebirdS = ibase_close fnDbQueryFirebirdS = ibase_query fnDbNumFieldsFirebirdS = ibase_num_fields fnDbFieldNameFirebirdS = ibase_field_info fnDbFetchArrayFirebirdS = ibase_fetch_row ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? IBM DB2 ; fnDbConnectIbmDb2S = db2_connect fnDbCommitIbmDb2S = ? fnDbExecuteIbmDb2S = ? fnDbFreeResultIbmDb2S = ? fnDbErrorIbmDb2S = db2_error fnDbSelectIbmDb2S = db2_select_db fnDbCloseIbmDb2S = db2_close fnDbQueryIbmDb2S = db2_query fnDbNumFieldsIbmDb2S = db2_num_fields fnDbFieldNameIbmDb2S = db2_field_name fnDbFetchArrayIbmDb2S = db2_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Informix ; fnDbConnectInformixS = ifx_connect fnDbCommitInformixS = ? fnDbExecuteInformixS = ? fnDbFreeResultInformixS = ? fnDbErrorInformixS = ifx_error fnDbSelectInformixS = ifx_select_db fnDbCloseInformixS = ifx_close fnDbQueryInformixS = ifx_query nDbNumFieldsInformixS = ifx_num_fields fnDbFieldNameInformixS = ifx_field_name fnDbFetchArrayInformixS = ifx_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Ingres ; fnDbConnectIngresS = ingres_connect fnDbCommitIngresS = ? fnDbExecuteIngresS = ? fnDbFreeResultIngresS = ? fnDbErrorIngresS = ingres_error fnDbSelectIngresS = ingres_select_db fnDbCloseIngresS = ingres_close fnDbQueryIngresS = ingres_query fnDbNumFieldsIngresS = ingres_num_fields fnDbFieldNameIngresS = ingres_field_name fnDbFetchArrayIngresS = ingres_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Interbase ; fnDbConnectInterbaseS = ibase_connect fnDbCommitInterbaseS = ? fnDbExecuteInterbaseS = ? fnDbFreeResultInterbaseS = ibase_free_result fnDbErrorInterbaseS = ibase_errmsg fnDbSelectInterbaseS = not applicable, because in Interbase you connect to the database using ibase_connect() fnDbCloseInterbaseS = ibase_close fnDbQueryInterbaseS = ibase_query fnDbNumFieldsInterbaseS = ibase_num_fields fnDbFieldNameInterbaseS = ibase_field_info fnDbFetchArrayInterbaseS = ibase_fetch_row ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Microsoft SQL server ; fnDbConnectMicrosoftSqlServerS = mssql_connect fnDbCommitMicrosoftSqlServerS = ? fnDbExecuteMicrosoftSqlServerS = ? fnDbFreeResultMicrosoftSqlServerS = ? fnDbErrorMicrosoftSqlServerS = mssql_get_last_message fnDbSelectMicrosoftSqlServerS = mssql_select_db fnDbCloseMicrosoftSqlServerS = mssql_close fnDbQueryMicrosoftSqlServerS = mssql_query fnDbNumFieldsMicrosoftSqlServerS = mssql_num_fields fnDbFieldNameMicrosoftSqlServerS = mssql_field_name fnDbFetchArrayMicrosoftSqlServerS = mssql_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? MySql ; fnDbConnectMySqlS = mysql_connect fnDbCommitMySqlS = ? fnDbExecuteMySqlS = ? fnDbFreeResultMySqlS = ? fnDbErrorMySqlS = mysql_error fnDbSelectMySqlS = mysql_select_db fnDbCloseMySqlS = mysql_close fnDbQueryMySqlS = mysql_query fnDbNumFieldsMySqlS = mysql_num_fields fnDbFieldNameMySqlS = mysql_field_name fnDbFetchArrayMySqlS = mysql_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? ODBC ; fnDbConnectOdbcS = odbc_connect fnDbCommitOdbcS = ? fnDbExecuteOdbcS = ? fnDbFreeResultOdbcS = ? fnDbErrorOdbcS = odbc_error fnDbSelectOdbcS = odbc_select_db fnDbCloseOdbcS = odbc_close fnDbQueryOdbcS = odbc_query fnDbNumFieldsOdbcS = odbc_num_fields fnDbFieldNameOdbcS = odbc_field_name fnDbFetchArrayOdbcS = odbc_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Oracle ; fnDbConnectOracleS = oci_connect fnDbCommitOracleS = oci_commit fnDbExecuteOracleS = oci_execute fnDbFreeResultOracleS = oci_free_statement fnDbErrorOracleS = oci_error fnDbSelectOracleS = not applicable, because in Oracle you have only 1 database, so once you are connected, you do not have to choose a database further fnDbCloseOracleS = oci_close fnDbQueryOracleS = oci_parse fnDbNumFieldsOracleS = oci_num_fields fnDbFieldNameOracleS = oci_field_name fnDbFetchArrayOracleS = oci_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? PostGreSql ; fnDbConnectPostGreSqlS = pg_connect fnDbCommitPostGreSqlS = ? fnDbExecutePostGreSqlS = pg_exec fnDbErrorPostGreSqlS = pg_error fnDbSelectPostGreSqlS = pg_select_db fnDbClosePostGreSqlS = pg_close fnDbQueryPostGreSqlS = pg_query fnDbNumFieldsPostGreSqlS = pg_num_fields fnDbFieldNamePostGreSqlS = pg_field_name fnDbFetchArrayPostGreSqlS = pg_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Sqlite version 2 ; ; if using Sqlite2.exe you can use e.g. sqlite_open. ; ; But you must then download and run as command line tool the sqlite v2. ; You can download it at ; http://mirror.lzu.edu.cn/software/sqlite.org/download.html ; fnDbConnectSqliteS = sqlite_open fnDbCommitSqliteS = ? fnDbExecuteSqliteS = ? fnDbFreeResultSqliteS = ? fnDbErrorSqliteS = $sqliteerror fnDbSelectSqliteS = sqlite_select_db fnDbCloseSqliteS = sqlite_close fnDbQuerySqliteS = sqlite_query fnDbNumFieldsSqliteS = sqlite_num_fields fnDbFieldNameSqliteS = sqlite_field_name fnDbFetchArraySqliteS = sqlite_fetch_array ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Sqlite version 3 ; ; if using Sqlite3.exe, you must use PDO functions (thus in your ; php.ini file, disable extension 'php_sqlite.dll', and enable the two ; extensions 'php_pdo.dll' and 'php_pdo_external.dll') ; ; ; But if you combine a Sqlite3.exe command line database client (as is done here) with a Sqlite2.exe library (as is used in PHP v5), ; you get when using the function sqlite_open an error 'Sqlite filename is encrypted or is not a database'. ; You must use object oriented (which use e.g. '->'). But only for the open and query function. ; The other functions you should be able to leave unchanged. ; ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Sqlite version 3 ; ; [Internet: source: http://tanguay.info/web/tip.php?id=34] ; ; ; How to switch your PHP sites from sqlite2 to sqlite3 ; One reason to switch from sqlite2 to sqlite3 is that you can use the ; nice Firefox Plugin SQLite Manager to manager your databases. In ; addition, the files are smaller and sqlite3 supports BLOBs and UTF-8 ; and UTF-16. Also, Ruby on Rails 2.0 now uses sqlite3, so upgrading is ; worth it. Here is how: ; ; - go to http://www.sqlite.org/download.html ; - download sqlite-2_8_17.zip and unpack the file sqlite.exe to c:\sqliteConvert ; - download sqlite-3_5_4.zip and unpack the file sqlite3.exe to c:\sqliteConvert ; - put your old version 2 sqlite database (e.g. called old.db) in c:\sqliteConvert ; - at the command line go to c:\sqliteConvert and type "sqlite old.db .dump | sqlite3 new.db" ; - the file "new.db" will be a sqlite3 version of your old database ; ; I was able to get my PHP code to use the new sqlite3 database with only a few changes: ; ; - in php.in make sure your dll settings are commented/uncommented in ; this way since you need the PDO driver to use sqlite3: ; ; extension=php_pdo.dll ; ;extension=php_sqlite.dll ; extension=php_pdo_sqlite.dll ; (and then do not forget to restart your Apache) ; ; In my PHP code, I had to essentially change the syntax to this: ; ; $db = new PDO('sqlite:test.sqlite'); ; // ; $result = $db->query($sql); ; // ; while($row = $result->fetchObject()) { ; echo $row->id; ; } ; ; everything else was the same as the syntax for sqlite2 databases. ; ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Sqlite version 3 ; ; fnDbConnectSqliteS = new PDO( 'sqlite: ; fnDbCommitSqliteS = ? ; fnDbExecuteSqliteS = ? ; fnDbFreeResultSqliteS = ? ; fnDbErrorSqliteS = $sqliteerror ; fnDbSelectSqliteS = sqlite_select_db ; fnDbCloseSqliteS = sqlite_close ; fnDbQuerySqliteS = -> query( ; fnDbNumFieldsSqliteS = sqlite_num_fields ; fnDbFieldNameSqliteS = sqlite_field_name ; fnDbFetchArraySqliteS = -> fetchObject() ; ---------------------------------------------------------------------- ; -Database: Php: Function: What are the names of the PHP functions used to interact with your database? Sybase ; fnDbConnectSybaseS = sybase_connect fnDbCommitSybaseS = ? fnDbExecuteSybaseS = ? fnDbFreeResultSybaseS = ? fnDbErrorSybaseS = sybase_error fnDbSelectSybaseS = sybase_select_db fnDbCloseSybaseS = sybase_close fnDbQuerySybaseS = sybase_query fnDbNumFieldsSybaseS = sybase_num_fields fnDbFieldNameSybaseS = sybase_field_name fnDbFetchArraySybaseS = sybase_fetch_array ; ---------------------------------------------------------------------- ; -Database: Name: Local: What is the name of your local database? ; ; (in which you store the table) ; ; Choose any name of your liking. ; ; But make sure that database exists ; ; (use e.g. CREATE <your database name>, in your database client, if applicable) ; ; For Firebird, you have to give the full path to your database file. ; Also include the filename extension (e.g. no filename extension if not present, e.g. 'dbf' if that is the file extension). ; Note that a filename extension is not obligatory for Firebird. ; databaseNameLocalFirebirdS = c:\Program Files\Firebird\Firebird_1_5\bin\database1 ; databaseNameLocalIbmDb2S = database1 databaseNameLocalInformixS = database1 databaseNameLocalIngresS = database1 databaseNameLocalInterbaseS = C:\Program Files\Borland\InterBase\bin\DATABASE1 databaseNameLocalMicrosoftSqlServerS = database1 databaseNameLocalMySqlS = database1 databaseNameLocalOdbcS = database1 databaseNameLocalOracleS = orclknud databaseNameLocalPostGreSqlS = database1 ; ; If you get error that you can not write to a read-only database', backup (by copying to another file), delete the database. ; Then do not create the database yourself the first time, but just let PHP create this database ; (sqlite_open() will automatically create a new database, when you start it with a non existing database file. ; databaseNameLocalSqliteS = c:\temp\database1.db databaseNameLocalSybaseS = database1 ; ---------------------------------------------------------------------- ; -Database: Table: Name: Local: What is the name of your local database table? ; ; Choose any name of your liking. ; ; This database table is currently automatically deleted and recreated when you start this TSE macro. ; ; (If you want to keep your data, remove or rem out the line containing 'DROP TABLE' in this TSE macro) ; databaseTableNameLocalFirebirdS = table2 databaseTableNameLocalIbmDb2S = table2 databaseTableNameLocalInformixS = table2 databaseTableNameLocalIngresS = table2 databaseTableNameLocalInterbaseS = table2 databaseTableNameLocalMicrosoftSqlServerS = table2 databaseTableNameLocalMySqlS = table2 databaseTableNameLocalOdbcS = table2 databaseTableNameLocalOracleS = table2 databaseTableNameLocalPostGreSqlS = table2 databaseTableNameLocalSqliteS = table2 databaseTableNameLocalSybaseS = table2 ; ---------------------------------------------------------------------- ; -Database: User name: Local: What is the local database user name? ; ; (which you use to logon to the administration of your database) ; ; The default user name for the administrator is, for the different database products: ; databaseUserNameLocalFirebirdS = SYSDBA databaseUserNameLocalIbmDb2S = db2admin databaseUserNameLocalInformixS = informix databaseUserNameLocalIngresS = admin databaseUserNameLocalInterbaseS = SYSDBA databaseUserNameLocalMicrosoftSqlServerS = sa databaseUserNameLocalMySqlS = root databaseUserNameLocalOdbcS = same username as the vendor database you connect to (e.g. 'sa' if Microsoft SQL server, 'root' if MySql) databaseUserNameLocalOracleS = SYSTEM databaseUserNameLocalPostGreSqlS = postgres databaseUserNameLocalSqliteS = databaseUserNameLocalSybaseS = Admin ; ---------------------------------------------------------------------- ; -Database: Password: Local: What is the local database password? ; ; (which you use to logon to the administration of your database) ; ; The default password for the administrator is, for the different database products: ; ; (empty space after the equal sign means a blank password, or thus no password) ; databasePasswordLocalFirebirdS = masterkey databasePasswordLocalIbmDb2S = db2admin databasePasswordLocalInformixS = informix databasePasswordLocalIngresS = password databasePasswordLocalInterbaseS = masterkey databasePasswordLocalMicrosoftSqlServerS = databasePasswordLocalMySqlS = databasePasswordLocalOdbcS = <same password as the vendor database you connect to (e.g. no or empty password if Microsoft SQL server or MySql) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databasePasswordLocalOracleS = k ; #REMOVE above and enable ';' below ; databasePasswordLocalOracleS = yourDatabasePassword ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databasePasswordLocalPostGreSqlS = databasePasswordLocalSqliteS = databasePasswordLocalSybaseS = ; ---------------------------------------------------------------------- databaseServiceNameLocalFirebirdS = fbserver.exe databaseServiceNameLocalIbmDb2S = ? databaseServiceNameLocalInformixS = ? databaseServiceNameLocalIngresS = ? databaseServiceNameLocalInterbaseS = ibserver.exe databaseServiceNameLocalMicrosoftSqlServerS = sqlservr.exe databaseServiceNameLocalMySqlS = mysqld-nt.exe databaseServiceNameLocalOdbcS = ? databaseServiceNameLocalOracleS = oracle.exe databaseServiceNameLocalPostGreSqlS = ? databaseServiceNameLocalSqliteS = n/a databaseServiceNameLocalSybaseS = ? ; ---------------------------------------------------------------------- ; -Database: Port: Local: On which port is your local database server program listening? ; ; The default ports are: ; databasePortLocalFirebirdS = 3050 databasePortLocalIbmDb2S = 50000 databasePortLocalInformixS = 1526 databasePortLocalIngresS = 21064 databasePortLocalInterbaseS = 3050 databasePortLocalMicrosoftSqlServerS = 1433 databasePortLocalMySqlS = 3306 databasePortLocalOdbcS = <set this to the default port of the database vendor (e.g. 3306 for MySql, 1433 for Microsoft SQL server)> databasePortLocalOracleS = 1521 databasePortLocalPostGreSqlS = 5432 databasePortLocalSqliteS = <seems not to listen on a port, probably because it only runs on your local computer> databasePortLocalSybaseS = 5000 ; ---------------------------------------------------------------------- ; -Database: User name: Remote: What is the remote database user name? ; ; (which you use to logon to the administration of your remote database. ; This should not be an administrator password, as this is left to the provider. ; Ask e.g. your provider) ; databaseUserNameRemoteFirebirdS = ? databaseUserNameRemoteIbmDb2S = ? databaseUserNameRemoteInformixS = ? databaseUserNameRemoteIngresS = ? databaseUserNameRemoteInterbaseS = ? databaseUserNameRemoteMicrosoftSqlServerS = ? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseUserNameRemoteMySqlS = knud ; #REMOVE above and enable ';' below ; databaseUserNameRemoteMySqlS = yourDatabaseUsernameAtProvider ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databaseUserNameRemoteOdbcS = ? databaseUserNameRemoteOracleS = ? databaseUserNameRemotePostGreSqlS = ? databaseUserNameRemoteSqliteS = ? databaseUserNameRemoteSybaseS = ? ; ---------------------------------------------------------------------- ; -Database: Password: Remote: What is the remote database password? ; ; (Ask e.g. your provider) ; ; (empty space after the equal sign means a blank password) ; databasePasswordRemoteFirebirdS = ? databasePasswordRemoteIbmDb2S = ? databasePasswordRemoteInformixS = ? databasePasswordRemoteIngresS = ? databasePasswordRemoteInterbaseS = ? databasePasswordRemoteMicrosoftSqlServerS = ? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databasePasswordRemoteMySqlS = test ; #REMOVE above and enable ';' below ; databasePasswordRemoteMySqlS = yourDatabasePasswordAtProvider ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; databasePasswordRemoteOdbcS = ? databasePasswordRemoteOracleS = ? databasePasswordRemotePostGreSqlS = ? databasePasswordRemoteSqliteS = ? databasePasswordRemoteSybaseS = ? ; ---------------------------------------------------------------------- ; -Database: Port: Remote: On which port is your remote database server program listening? ; ; (ask e.g. your provider) ; databasePortRemoteFirebirdS = ? databasePortRemoteIbmDb2S = ? databasePortRemoteInformixS = ? databasePortRemoteIngresS = ? databasePortRemoteInterbaseS = ? databasePortRemoteMicrosoftSqlServerS = ? databasePortRemoteMySqlS = ? databasePortRemoteOdbcS = ? databasePortRemoteOracleS = ? databasePortRemotePostGreSqlS = ? databasePortRemoteSqliteS = ? databasePortRemoteSybaseS = ? ; ---------------------------------------------------------------------- ; ; put the natural language messages (error, warning, information, help, ...) resource files later in (a) different .ini file(s) ; ; also put the not necessary other data in this file in other .ini files. ; ; only the information relevant for the user should remain in 1 central .ini file ; ; ; ---------------------------------------------------------------------- ; -Language: Natural: Message: Error: What are the error messages for that natural language? 1 ; errorMessage1Danish = Vælg vsg. en database errorMessage1Dutch = Kies aub. een database errorMessage1EnglishS = Please choose a database errorMessage1FinnishS = ... ? errorMessage1FrenchS = Choississez-vous svp. une base de données errorMessage1GermanS = Wählen Sie bitte eine Datenbank errorMessage1Italian = Sceglie Lei per favore una base di dati errorMessage1Norwegian = Velg vsg. en database errorMessage1Portuguese = Escolhe por favor ...? errorMessage1Russian = v<bi>bira't<bz> ... ? errorMessage1Spanish = Elige Usted por favor una base de datos errorMessage1Swedish = Väl varsågod en databas ; ---------------------------------------------------------------------- ; -Language: Natural: Message: Error: What are the error messages for that natural language? 2 ; errorMessage2Danish = ...? errorMessage2Dutch = ...? errorMessage2EnglishS = ...? errorMessage2FinnishS = ...? errorMessage2FrenchS = ...? errorMessage2GermanS = ...? errorMessage2Italian = ...? errorMessage2Norwegian = ...? errorMessage2Portuguese = ...? errorMessage2Russian = ...? errorMessage2Spanish = ...? errorMessage2Swedish = ...? ; ---------------------------------------------------------------------- ; -Language: Natural: Message: Error: What are the error messages for that natural language? ... ; errorMessage...Danish = ...? errorMessage...Dutch = ...? errorMessage...EnglishS = ...? errorMessage...FinnishS = ...? errorMessage...FrenchS = ...? errorMessage...GermanS = ...? errorMessage...Italian = ...? errorMessage...Norwegian = ...? errorMessage...Portuguese = ...? errorMessage...Russian = ...? errorMessage...Spanish = ...? errorMessage...Swedish = ...? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- cut here: end ---------------------------------------------------- 6. -Save that .ini file in the directory of your choice (e.g. in the same directory as your TSE macro) 7. -Run the TSE macro --- cut here: begin --------------------------------------------------
E.g. create the following program: --- cut here: begin --------------------------------------------------
// filenamemacro=creaficp.s
--- cut here: end ---------------------------------------------------- --- cut here: begin --------------------------------------------------
// PROC PROCFileCreateDatabaseTableInternetCrudPhp( STRING fileNameIniS, STRING sectionIniS )
--- cut here: end ---------------------------------------------------- --- cut here: begin --------------------------------------------------
FORWARD INTEGER PROC FNBufferGetBufferIdFileCurrentI() FORWARD INTEGER PROC FNBufferGetBufferIdGivenBufferNameI( STRING s1 ) FORWARD INTEGER PROC FNErrorCheckEscapeB( STRING s1 ) FORWARD INTEGER PROC FNErrorCheckSB( STRING s1 ) FORWARD INTEGER PROC FNFileCheckEditCentralMessageB( STRING s1, INTEGER i1 ) FORWARD INTEGER PROC FNFileCheckEditMessageB( STRING s1 ) FORWARD INTEGER PROC FNFileCheckGotoEndB() FORWARD INTEGER PROC FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( STRING s1, INTEGER i1 ) FORWARD INTEGER PROC FNHistoryCheckAskCentralB( STRING s1, VAR STRING s2, INTEGER i1 ) FORWARD INTEGER PROC FNKeyCheckPressEscapeB( STRING s1 ) FORWARD INTEGER PROC FNLineCheckGotoBeginB() FORWARD INTEGER PROC FNLineCheckInsertAfterLineGotoBeginTextInsertB( STRING s1 ) FORWARD INTEGER PROC FNMacroCheckExecB( STRING s1 ) FORWARD INTEGER PROC FNMacroCheckLoadB( STRING s1 ) FORWARD INTEGER PROC FNMacroCheckPurgeB( STRING s1 ) FORWARD INTEGER PROC FNMathCheckGetLogicFalseB() FORWARD INTEGER PROC FNMathCheckGetLogicTrueB() FORWARD INTEGER PROC FNMathCheckInitializeNewBooleanFalseB() FORWARD INTEGER PROC FNMathCheckLogicNotB( INTEGER i1 ) FORWARD INTEGER PROC FNMathCheckLogicOrB( INTEGER i1, INTEGER i2 ) FORWARD INTEGER PROC FNMathGetInitializeNewI() FORWARD INTEGER PROC FNMathGetIntegerZeroI() FORWARD INTEGER PROC FNMathGetProgramLineNumberAbsoluteCurrentI() FORWARD INTEGER PROC FNMathGetStringTableColumnSizeI( STRING s1, INTEGER i1, INTEGER i2, INTEGER i3 ) FORWARD INTEGER PROC FNStringCheckEmptyB( STRING s1 ) FORWARD INTEGER PROC FNStringCheckEmptyNotB( STRING s1 ) FORWARD INTEGER PROC FNStringCheckEnvironmentFoundNotB( STRING s1 ) FORWARD INTEGER PROC FNStringCheckEqualB( STRING s1, STRING s2 ) FORWARD INTEGER PROC FNStringCheckEqualCharacterLastNB( STRING s1, STRING s2 ) FORWARD INTEGER PROC FNStringCheckEqualErrorOrEmptyB( STRING s1 ) FORWARD INTEGER PROC FNStringGetLengthI( STRING s1 ) FORWARD INTEGER PROC FNTextCheckInsertB( STRING s1 ) FORWARD INTEGER PROC FNTextCheckInsertCentralB( STRING s1, INTEGER i1 ) FORWARD PROC Main() FORWARD PROC PROCBrowserRunDefaultParameter( STRING s1 ) FORWARD PROC PROCDatabaseCreateConnectionPhp( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6, STRING s7, STRING s8, STRING s9, STRING s10, STRING s11, STRING s12 ) FORWARD PROC PROCDatabaseCreateTable( STRING s1, INTEGER i1, INTEGER i2, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6, STRING s7 ) FORWARD PROC PROCDatabaseCreateTableSqlQuery( STRING s1, INTEGER i1, INTEGER i2, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6, STRING s7 ) FORWARD PROC PROCDatabaseGetSqlQueryOperation( INTEGER i1 ) FORWARD PROC PROCDatabaseRemoveTableDrop( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6, STRING s7 ) FORWARD PROC PROCDatabaseRemoveTableDropSqlQuery( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6, STRING s7 ) FORWARD PROC PROCDatabaseRunSqlQuery( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6 ) FORWARD PROC PROCDatabaseTableConnect( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6 ) FORWARD PROC PROCError( STRING s1 ) FORWARD PROC PROCErrorCons3( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCErrorCons4( STRING s1, STRING s2, STRING s3, STRING s4 ) FORWARD PROC PROCErrorFileNotFound( STRING s1 ) FORWARD PROC PROCFileCreateDatabaseTableInternetCrudPhp( STRING s1, STRING s2 ) FORWARD PROC PROCFileDeleteCompletelyReturnSimple( STRING s1 ) FORWARD PROC PROCFileGotoEnd() FORWARD PROC PROCFileInsertEndPrepare() FORWARD PROC PROCFileInsertTextEnd( STRING s1, STRING s2, INTEGER i1 ) FORWARD PROC PROCLineInsertAfter() FORWARD PROC PROCLineInsertAfterLineGotoBeginTextInsert( STRING s1 ) FORWARD PROC PROCMacroExec( STRING s1 ) FORWARD PROC PROCMacroPurge( STRING s1 ) FORWARD PROC PROCMacroRunPurge( STRING s1 ) FORWARD PROC PROCMacroRunPurgeParameter( STRING s1, STRING s2 ) FORWARD PROC PROCMessage( STRING s1 ) FORWARD PROC PROCMessageCons3( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramGotoNavigatePage() FORWARD PROC PROCProgramGotoNavigatePageDisable() FORWARD PROC PROCProgramRunParallel( STRING s1 ) FORWARD PROC PROCProgramRunParallelParameter( STRING s1, STRING s2 ) FORWARD PROC PROCProgramRunParallelParameterDirectory( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunParallelParameterNotDirectoryNot( STRING s1 ) FORWARD PROC PROCProgramRunParallel_ParameterDirectoryWindow( STRING s1, STRING s2, STRING s3, INTEGER i1 ) FORWARD PROC PROCProgramRunProcessKill( STRING s1 ) FORWARD PROC PROCProgramRunProcessStopYesNo( STRING s1 ) FORWARD PROC PROCProgramRun_ParallelParameterDirectoryNot( STRING s1, STRING s2 ) FORWARD PROC PROCTextGotoLineBegin() FORWARD PROC PROCTextInsert( STRING s1 ) FORWARD PROC PROCTextRemovePositionStackPop() FORWARD PROC PROCTextSavePositionStackPush() FORWARD PROC PROCWarn( STRING s1 ) FORWARD PROC PROCWarnCons3( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCWarnCons4( STRING s1, STRING s2, STRING s3, STRING s4 ) FORWARD PROC PROCWarnCons5( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) FORWARD PROC PROCWindowsShellExecute( INTEGER i1, STRING s1, STRING s2, STRING s3, STRING s4, INTEGER i2 ) FORWARD PROC PROCWindowsShellExecute( INTEGER i1, STRING s1, STRING s2, STRING s3, STRING s4, INTEGER i2 ) FORWARD PROC PROCWindowsShellExecuteError( INTEGER i1, STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetArrayTableColumnCentralS( STRING s1, INTEGER i1 ) FORWARD STRING PROC FNStringGetArrayTableColumnNameDescriptionS( INTEGER i1 ) FORWARD STRING PROC FNStringGetArrayTableColumnNameVariableS( INTEGER i1 ) FORWARD STRING PROC FNStringGetArrayTableColumnTypeS( INTEGER i1 ) FORWARD STRING PROC FNStringGetAsciiToCharacterS( INTEGER i1 ) FORWARD STRING PROC FNStringGetCarS( STRING s1 ) FORWARD STRING PROC FNStringGetCharacterEndBackSlashNotEqualInsertEndS( STRING s1 ) FORWARD STRING PROC FNStringGetCharacterInsertEndIfEqualNotS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetCharacterSymbolCentralS( INTEGER i1 ) FORWARD STRING PROC FNStringGetCharacterSymbolSlashBackwardS() FORWARD STRING PROC FNStringGetCharacterSymbolSpaceS() FORWARD STRING PROC FNStringGetConcatS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetConcatSeparatorS( STRING s1, STRING s2, STRING s3 ) FORWARD STRING PROC FNStringGetConcatTailS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetCons3S( STRING s1, STRING s2, STRING s3 ) FORWARD STRING PROC FNStringGetCons4S( STRING s1, STRING s2, STRING s3, STRING s4 ) FORWARD STRING PROC FNStringGetCons5S( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) FORWARD STRING PROC FNStringGetConsS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetEmptyS() FORWARD STRING PROC FNStringGetEnvironmentS( STRING s1 ) FORWARD STRING PROC FNStringGetErrorS() FORWARD STRING PROC FNStringGetEscapeS() FORWARD STRING PROC FNStringGetFileGetFilenamePathDefaultS( STRING s1 ) FORWARD STRING PROC FNStringGetFileIniDefaultS( STRING s1 ) FORWARD STRING PROC FNStringGetFilenameCurrentS() FORWARD STRING PROC FNStringGetFilenameEndBackSlashNotEqualInsertEndS( STRING s1 ) FORWARD STRING PROC FNStringGetFilenameGlobalErrorS() FORWARD STRING PROC FNStringGetFilenameIniDefaultS() FORWARD STRING PROC FNStringGetGlobalS( STRING s1 ) FORWARD STRING PROC FNStringGetHistoryInputS( STRING s1, STRING s2, INTEGER i1 ) FORWARD STRING PROC FNStringGetInitializationGlobalS( STRING s1, STRING s2, STRING s3 ) FORWARD STRING PROC FNStringGetInitializeNewStringS() FORWARD STRING PROC FNStringGetInputFilenameCentralS( STRING s1, STRING s2, INTEGER i1, INTEGER i2 ) FORWARD STRING PROC FNStringGetInputFilenameS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetInputS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetLineNumberCurrentS() FORWARD STRING PROC FNStringGetMachineNameS() FORWARD STRING PROC FNStringGetMathIntegerToStringS( INTEGER i1 ) FORWARD STRING PROC FNStringGetMidStringS( STRING s1, INTEGER i1, INTEGER i2 ) FORWARD STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashNotS() FORWARD STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashS() FORWARD STRING PROC FNStringGetPortS() FORWARD STRING PROC FNStringGetProcessNameS( STRING s1 ) FORWARD STRING PROC FNStringGetProductChangeDatabaseCrudS( STRING s1, STRING s2, STRING s3, STRING s4 ) FORWARD STRING PROC FNStringGetRightStringLengthEqualS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetRightStringS( STRING s1, INTEGER i1 ) FORWARD STRING PROC FNStringGetSearchHistoryFindInputS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetSectionSeparatorS() FORWARD STRING PROC FNStringGetUserNameFirstS() FORWARD STRING PROC FNStringGetUserNameLastS() FORWARD STRING PROC FNStringGet_FilenameIniDefaultS() // --- MAIN --- // STRING databaseLinkGS[255] = "$databaselink" // global variable PROC Main() STRING s1[255] = "" STRING s2[255] = "" // s1 = FNStringGetInputFilenameS( "file: create: database: table: internet: crud: php: fileNameIniS = ", ".\fileCreateDatabaseTableInternetCrudPhp.ini" ) IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // // Note: you should not include the square brackets '[' and ']' around the section string name // or using GetProfileStr() you will not find the values in your .ini file // s2 = FNStringGetInputS( "file: create: database: table: internet: crud: php: sectionIniS (no '[]') = ", "default" ) IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // PROCFileCreateDatabaseTableInternetCrudPhp( s1, s2 ) END <F12> Main() // --- LIBRARY --- // // library: input: input a filename <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstifi.s) [kn, zoe, mo, 13-11-2000 18:00:11] STRING PROC FNStringGetInputFilenameS( STRING askS, STRING defaultS ) // e.g. PROC Main() // e.g. Message( FNStringGetInputFilenameS( "input a file", "c:\temp\ddd.txt" ) ) // gives e.g. "c:\temp\ddd.txt" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetInputFilenameCentralS( askS, defaultS, _DEFAULT_, _EDIT_HISTORY_ ) ) // END // library: key: check: press: escape <description>input: escape: test if escape was pressed</description> <version>1.0.0.0.2</version> (filenamemacro=checkepe.s) [kn, ni, we, 05-08-1998 20:29:00] INTEGER PROC FNKeyCheckPressEscapeB( STRING s ) // version with testing local variable // e.g. PROC Main() // e.g. Message( FNKeyCheckPressEscapeB( "" ) ) // version with testing local variable ) // gives e.g. FALSE // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringCheckEqualB( s, FNStringGetEscapeS() ) ) // END // library: string: get: input <description>input a string</description> <version>1.0.0.0.1</version> (filenamemacro=getstgiq.s) [kn, ni, mo, 03-08-1998 13:04:18] STRING PROC FNStringGetInputS( STRING askS, STRING answerDefaultS ) // e.g. PROC Main() // e.g. Message( FNStringGetConcat3S( "'", FNStringGetInputS( "Choose option (Y/n)", "Y" ), "'" ) ) // gives e.g. "Y" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetSearchHistoryFindInputS( askS, answerDefaultS ) ) // END // library: file: create: database: table: internet: crud: php <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=creaficp.s) [kn, ri, mo, 04-08-2008 20:26:20] PROC PROCFileCreateDatabaseTableInternetCrudPhp( STRING fileNameIniS, STRING sectionIniS ) // e.g. STRING databaseLinkGS[255] = "$databaselink" // global variable // e.g. // e.g. PROC Main() // e.g. STRING s1[255] = "" // e.g. STRING s2[255] = "" // e.g. // // e.g. s1 = FNStringGetInputFilenameS( "file: create: database: table: internet: crud: php: fileNameIniS = ", ".\fileCreateDatabaseTableInternetCrudPhp.ini" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. // // e.g. // Note: you should not include the square brackets '[' and ']' around the section string name // e.g. // or using GetProfileStr() you will not find the values in your .ini file // e.g. // // e.g. s2 = FNStringGetInputS( "file: create: database: table: internet: crud: php: sectionIniS (no '[]') = ", "default" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. // // e.g. PROCFileCreateDatabaseTableInternetCrudPhp( s1, s2 ) // e.g. END // e.g. // e.g. <F12> Main() // STRING foundNotS[255] = "<not found>" // STRING databaseProductCurrentNumberS[255] = GetProfileStr( sectionIniS, "databaseProductCurrentNumberS" , foundNotS, fileNameIniS ) STRING languageComputerNameCurrentNumberS[255] = GetProfileStr( sectionIniS, "languageComputerNameCurrentNumberS" , foundNotS, fileNameIniS ) STRING languageComputerIdeNameCurrentNumberS[255] = languageComputerNameCurrentNumberS STRING webServerNameCurrentNumberS[255] = GetProfileStr( sectionIniS, "webServerNameCurrentNumberS" , foundNotS, fileNameIniS ) // STRING languageNaturalNameCurrentNumberS[255] = GetProfileStr( sectionIniS, "languageNaturalNameCurrentNumberS" , foundNotS, fileNameIniS ) // STRING databaseProductS[255] = GetProfileStr( sectionIniS, Format( "databaseProduct", databaseProductCurrentNumberS, "S" ) , foundNotS, fileNameIniS ) STRING languageComputerNameS[255] = GetProfileStr( sectionIniS, Format( "languageComputerName", languageComputerNameCurrentNumberS, "S" ) , foundNotS, fileNameIniS ) STRING languageComputerIdeNameS[255] = GetProfileStr( sectionIniS, Format( "languageComputerIdeName", languageComputerIdeNameCurrentNumberS, "S" ) , foundNotS, fileNameIniS ) STRING webServerNameS[255] = GetProfileStr( sectionIniS, Format( "webServerName", webServerNameCurrentNumberS, "S" ) , foundNotS, fileNameIniS ) // STRING languageNaturalNameS[255] = GetProfileStr( sectionIniS, Format( "languageNaturalName", languageNaturalNameCurrentNumberS, "S" ) , foundNotS, fileNameIniS ) // STRING programProcessStopMainS[255] = GetProfileStr( sectionIniS, "programProcessStopMainS" , foundNotS, fileNameIniS ) STRING programProcessStopParameterS[255] = GetProfileStr( sectionIniS, "programProcessStopParameterS" , foundNotS, fileNameIniS ) // STRING browserExecutableS[255] = GetProfileStr( sectionIniS, "browserExecutableS" , foundNotS, fileNameIniS ) STRING fileNameDatabaseSqlLocalS[255] = GetProfileStr( sectionIniS, "fileNameDatabaseSqlLocalS" , foundNotS, fileNameIniS ) STRING fileNameFtpExecutableLocalS[255] = GetProfileStr( sectionIniS, "fileNameFtpExecutableLocalS" , foundNotS, fileNameIniS ) STRING fileNameFtpLocalS[255] = GetProfileStr( sectionIniS, "fileNameFtpLocalS" , foundNotS, fileNameIniS ) STRING filenameStyleSheetS[255] = GetProfileStr( sectionIniS, "filenameStyleSheetS" , foundNotS, fileNameIniS ) STRING ftpDirectoryRemoteS[255] = GetProfileStr( sectionIniS, "ftpDirectoryRemoteS" , foundNotS, fileNameIniS ) STRING ftpPasswordRemoteS[255] = GetProfileStr( sectionIniS, "ftpPasswordRemoteS" , foundNotS, fileNameIniS ) STRING ftpServerNameRemoteS[255] = GetProfileStr( sectionIniS, "ftpServerNameRemoteS" , foundNotS, fileNameIniS ) STRING ftpUserNameRemoteS[255] = GetProfileStr( sectionIniS, "ftpUserNameRemoteS" , foundNotS, fileNameIniS ) STRING tableColumnTotalS[255] = GetProfileStr( sectionIniS, "tableColumnTotalS" , foundNotS, fileNameIniS ) STRING tableNameWebPage[255] = GetProfileStr( sectionIniS, "tableNameWebPage" , foundNotS, fileNameIniS ) STRING urlFtpRemoteS[255] = GetProfileStr( sectionIniS, "urlFtpRemoteS" , foundNotS, fileNameIniS ) STRING urlLocalPrefixS[255] = GetProfileStr( sectionIniS, "urlLocalPrefixS" , foundNotS, fileNameIniS ) // STRING fileNameLanguageComputerSourceCodeLocalS[255] = "" STRING databaseNameInstallationDownloadS[255] = "" STRING databaseInformationInstallationDownloadS[255] = "" STRING databaseUrlInstallationDownloadS[255] = "" // STRING languageComputerNameInstallationDownloadS[255] = "" STRING languageComputerInformationInstallationDownloadS[255] = "" STRING languageComputerUrlInstallationDownloadS[255] = "" // STRING languageComputerIdeNameInstallationDownloadS[255] = "" STRING languageComputerIdeInformationInstallationDownloadS[255] = "" STRING languageComputerIdeUrlInstallationDownloadS[255] = "" // STRING webServerNameInstallationDownloadS[255] = "" STRING webServerInformationInstallationDownloadS[255] = "" STRING webServerUrlInstallationDownloadS[255] = "" // STRING databaseClientExecutableLocalS[255] = "" STRING databaseClientExecutableRemoteS[255] = "" STRING databaseHostNameLocalS[255] = "" STRING databaseHostNameRemoteS[255] = "" STRING databaseNameLocalS[255] = "" STRING databaseNameRemoteS[255] = "" STRING databasePasswordLocalS[255] = "" STRING databasePasswordRemoteS[255] = "" STRING databasePortLocalS[255] = "" STRING databasePortRemoteS[255] = "" STRING databaseServerExecutableLocalS[255] = "" STRING databaseTableNameLocalS[255] = "" STRING databaseTableNameRemoteS[255] = "" STRING databaseUserNameLocalS[255] = "" STRING databaseUserNameRemoteS[255] = "" STRING fnDbCloseS[255] = "" STRING fnDbCommitS[255] = "" STRING fnDbConnectS[255] = "" STRING fnDbErrorS[255] = "" STRING fnDbExecuteS[255] = "" STRING fnDbFetchArrayS[255] = "" STRING fnDbFieldNameS[255] = "" STRING fnDbFreeResultS[255] = "" STRING fnDbNumFieldsS[255] = "" STRING fnDbQueryS[255] = "" STRING fnDbSelectS[255] = "" // STRING urlLocalS[255] = "" STRING urlRemoteS[255] = "" // STRING fileNameDatabaseConnectionCurrentS[255] = "" STRING fileNameDatabaseConnectionLocalS[255] = "" STRING fileNameDatabaseConnectionRemoteS[255] = "" // STRING fileNameFileNameOnlyS[255] = "" // STRING separatorS[255] = "" // INTEGER I = 0 INTEGER columnMinI = 1 INTEGER columnMaxI = Val( tableColumnTotalS ) // STRING s[255] = "" STRING s1[255] = "" STRING s2[255] = "" STRING s3[255] = "" // // INTEGER debugI = _DEFAULT_ // use when you still are debugging INTEGER debugI = _DONT_PROMPT_ // use when your debugging has finished // INTEGER listX = 120 // databaseProductS = FNStringGetProductChangeDatabaseCrudS( databaseProductCurrentNumberS, sectionIniS, "databaseProduct", fileNameIniS ) // IF ( databaseProductS == "" ) RETURN() ENDIF // CASE databaseProductS WHEN "Firebird", "Interbase", "MySql", "MicrosoftSqlServer", "Oracle", "Sqlite" OTHERWISE Warn( Format( "this database product", " ", "'", databaseProductS, "'", " ", "has not been added yet" ) ) RETURN() ENDCASE // fileNameLanguageComputerSourceCodeLocalS = GetProfileStr( sectionIniS, Format( "fileNameLanguageComputerSourceCodeLocal", languageComputerNameS, "S" ), foundNotS, fileNameIniS ) // fileNameFileNameOnlyS = SplitPath( fileNameLanguageComputerSourceCodeLocalS, _NAME_ | _EXT_ ) // urlLocalS = Format( urlLocalPrefixS, fileNameFileNameOnlyS ) urlRemoteS = Format( urlFtpRemoteS, fileNameFileNameOnlyS ) // fileNameDatabaseConnectionCurrentS = SplitPath( fileNameLanguageComputerSourceCodeLocalS, _DRIVE_ | _PATH_ ) fileNameDatabaseConnectionCurrentS = Format( fileNameDatabaseConnectionCurrentS , GetProfileStr( sectionIniS, Format( "fileNameDatabaseConnectionCurrent", languageComputerNameS, "S" ), "", fileNameIniS ) ) // fileNameDatabaseConnectionLocalS = SplitPath( fileNameLanguageComputerSourceCodeLocalS, _DRIVE_ | _PATH_ ) fileNameDatabaseConnectionLocalS = Format( fileNameDatabaseConnectionLocalS, GetProfileStr( sectionIniS, Format( "fileNameDatabaseConnectionLocal", languageComputerNameS, "S" ), "", fileNameIniS ) ) // fileNameDatabaseConnectionRemoteS = GetProfileStr( sectionIniS, Format( "fileNameDatabaseConnectionRemote", languageComputerNameS, "S" ), foundNotS, fileNameIniS ) // databaseNameInstallationDownloadS = GetProfileStr( sectionIniS, Format( "databaseNameInstallationDownload", databaseProductS, "S" ) , foundNotS, fileNameIniS ) databaseInformationInstallationDownloadS = GetProfileStr( sectionIniS, Format( "databaseInformationInstallationDownload", databaseProductS, "S" ) , foundNotS, fileNameIniS ) databaseUrlInstallationDownloadS = GetProfileStr( sectionIniS, Format( "databaseUrlInstallationDownload", databaseProductS, "S" ) , foundNotS, fileNameIniS ) // languageComputerNameInstallationDownloadS = GetProfileStr( sectionIniS, Format( "languageComputerNameInstallationDownload", languageComputerNameS, "S" ) , foundNotS, fileNameIniS ) languageComputerInformationInstallationDownloadS = GetProfileStr( sectionIniS, Format( "languageComputerInformationInstallationDownload", languageComputerNameS, "S" ) , foundNotS, fileNameIniS ) languageComputerUrlInstallationDownloadS = GetProfileStr( sectionIniS, Format( "languageComputerUrlInstallationDownload", languageComputerNameS, "S" ) , foundNotS, fileNameIniS ) // languageComputerIdeNameInstallationDownloadS = GetProfileStr( sectionIniS, Format( "languageComputerIdeNameInstallationDownload", languageComputerNameS, "S" ) , foundNotS, fileNameIniS ) languageComputerIdeInformationInstallationDownloadS = GetProfileStr( sectionIniS, Format( "languageComputerIdeInformationInstallationDownload", languageComputerNameS, "S" ) , foundNotS, fileNameIniS ) languageComputerIdeUrlInstallationDownloadS = GetProfileStr( sectionIniS, Format( "languageComputerIdeUrlInstallationDownload", languageComputerNameS, "S" ) , foundNotS, fileNameIniS ) // webServerNameInstallationDownloadS = GetProfileStr( sectionIniS, Format( "webServerNameInstallationDownload", webServerNameS, "S" ) , foundNotS, fileNameIniS ) webServerInformationInstallationDownloadS = GetProfileStr( sectionIniS, Format( "webServerInformationInstallationDownload", webServerNameS, "S" ) , foundNotS, fileNameIniS ) webServerUrlInstallationDownloadS = GetProfileStr( sectionIniS, Format( "webServerUrlInstallationDownload", webServerNameS, "S" ) , foundNotS, fileNameIniS ) // databaseHostNameLocalS = GetProfileStr( sectionIniS, Format( "databaseHostNameLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseHostNameRemoteS = GetProfileStr( sectionIniS, Format( "databaseHostNameRemote" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseClientExecutableLocalS = GetProfileStr( sectionIniS, Format( "databaseClientExecutableLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseClientExecutableRemoteS = GetProfileStr( sectionIniS, Format( "databaseClientExecutableRemote" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseNameLocalS = GetProfileStr( sectionIniS, Format( "databaseNameLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseNameRemoteS = GetProfileStr( sectionIniS, Format( "databaseNameRemote" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databasePasswordLocalS = GetProfileStr( sectionIniS, Format( "databasePasswordLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databasePasswordRemoteS = GetProfileStr( sectionIniS, Format( "databasePasswordRemote" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databasePortLocalS = GetProfileStr( sectionIniS, Format( "databasePortLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databasePortRemoteS = GetProfileStr( sectionIniS, Format( "databasePortRemote" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseServerExecutableLocalS = GetProfileStr( sectionIniS, Format( "databaseServerExecutableLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseTableNameLocalS = GetProfileStr( sectionIniS, Format( "databaseTableNameLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseTableNameRemoteS = GetProfileStr( sectionIniS, Format( "databaseTableNameRemote" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseUserNameLocalS = GetProfileStr( sectionIniS, Format( "databaseUserNameLocal" , databaseProductS, "S" ), foundNotS, fileNameIniS ) databaseUserNameRemoteS = GetProfileStr( sectionIniS, Format( "databaseUserNameRemote" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbCloseS = GetProfileStr( sectionIniS, Format( "fnDbClose" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbFreeResultS = GetProfileStr( sectionIniS, Format( "fnDbFreeResult" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbConnectS = GetProfileStr( sectionIniS, Format( "fnDbConnect" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbErrorS = GetProfileStr( sectionIniS, Format( "fnDbError" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbFetchArrayS = GetProfileStr( sectionIniS, Format( "fnDbFetchArray" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbFieldNameS = GetProfileStr( sectionIniS, Format( "fnDbFieldName" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbNumFieldsS = GetProfileStr( sectionIniS, Format( "fnDbNumFields" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbQueryS = GetProfileStr( sectionIniS, Format( "fnDbQuery" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbExecuteS = GetProfileStr( sectionIniS, Format( "fnDbExecute" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbCommitS = GetProfileStr( sectionIniS, Format( "fnDbCommit" , databaseProductS, "S" ), foundNotS, fileNameIniS ) fnDbSelectS = GetProfileStr( sectionIniS, Format( "fnDbSelect" , databaseProductS, "S" ), foundNotS, fileNameIniS ) // IF ( Trim( databasePortLocalS ) == "" ) separatorS = "" ELSE // CASE databaseProductS WHEN "MySql" separatorS = ":" WHEN "MicrosoftSqlServer" separatorS = "," OTHERWISE // do nothing ENDCASE // ENDIF // CASE databaseProductS WHEN "MySql", "MicrosoftSqlServer" // databaseHostNameLocalS = Format( databaseHostNameLocalS, separatorS, databasePortLocalS ) // if MySql this becomes "localhost:3306", if Microsoft SQL server then "localhost,1433" // OTHERWISE // do nothing ENDCASE // // Store your table column information in an array FOR I = columnMinI TO columnMaxI SetGlobalStr( Format( "tableColumn", "NameDescription", Str( I ), "S" ), GetProfileStr( sectionIniS, Format( "tableColumn", "NameDescription", Str( I ), "S" ), "", fileNameIniS ) ) SetGlobalStr( Format( "tableColumn", "NameVariable", Str( I ), "S" ), GetProfileStr( sectionIniS, Format( "tableColumn", "NameVariable", Str( I ), "S" ), "", fileNameIniS ) ) SetGlobalStr( Format( "tableColumn", "Type", Str( I ), "S" ), GetProfileStr( sectionIniS, Format( "tableColumn", "Type", Str( I ), databaseProductS, "S" ), "", fileNameIniS ) ) ENDFOR // PushPosition() // PushBlock() // // Show the current set initialization data // PushPosition() PushBlock() GotoBufferId( CreateTempBuffer() ) // AddLine( "-----------------------" ) AddLine( Format( "databaseProductS" , " ", "=", " ", databaseProductS ) ) AddLine( Format( "databaseProductNumberS" , " ", "=", " ", databaseProductCurrentNumberS ) ) AddLine( Format( "databaseNameInstallationDownload" , " ", "=", " ", databaseNameInstallationDownloadS ) ) AddLine( Format( "databaseInformationInstallationDownload" , " ", "=", " ", databaseInformationInstallationDownloadS ) ) AddLine( Format( "databaseUrlInstallationDownload" , " ", "=", " ", databaseUrlInstallationDownloadS ) ) AddLine( "-----------------------" ) AddLine( Format( "databaseHostNameLocalS" , " ", "=", " ", databaseHostNameLocalS ) ) AddLine( Format( "databasePortLocalS" , " ", "=", " ", databasePortLocalS ) ) AddLine( Format( "databaseNameLocalS" , " ", "=", " ", databaseNameLocalS ) ) AddLine( Format( "databaseUserNameLocalS" , " ", "=", " ", databaseUserNameLocalS ) ) AddLine( Format( "databasePasswordLocalS" , " ", "=", " ", databasePasswordLocalS ) ) AddLine( Format( "databaseTableNameLocalS" , " ", "=", " ", databaseTableNameLocalS ) ) AddLine( Format( "databaseServerExecutableLocalS" , " ", "=", " ", databaseServerExecutableLocalS ) ) AddLine( Format( "databaseClientExecutableLocalS" , " ", "=", " ", databaseClientExecutableLocalS ) ) AddLine( "-----------------------" ) AddLine( Format( "databaseHostNameRemoteS" , " ", "=", " ", databaseHostNameRemoteS ) ) AddLine( Format( "databasePortRemoteS" , " ", "=", " ", databasePortRemoteS ) ) AddLine( Format( "databaseNameRemoteS" , " ", "=", " ", databaseNameRemoteS ) ) AddLine( Format( "databaseUserNameRemoteS" , " ", "=", " ", databaseUserNameRemoteS ) ) AddLine( Format( "databasePasswordRemoteS" , " ", "=", " ", databasePasswordRemoteS ) ) AddLine( Format( "databaseTableNameRemoteS" , " ", "=", " ", databaseTableNameRemoteS ) ) AddLine( "-----------------------" ) AddLine( Format( "fnDbCloseS" , " ", "=", " ", fnDbCloseS ) ) AddLine( Format( "fnDbFreeResult" , " ", "=", " ", fnDbFreeResultS ) ) AddLine( Format( "fnDbConnectS" , " ", "=", " ", fnDbConnectS ) ) AddLine( Format( "fnDbErrorS" , " ", "=", " ", fnDbErrorS ) ) AddLine( Format( "fnDbFetchArrayS" , " ", "=", " ", fnDbFetchArrayS ) ) AddLine( Format( "fnDbFieldNameS" , " ", "=", " ", fnDbFieldNameS ) ) AddLine( Format( "fnDbNumFieldsS" , " ", "=", " ", fnDbNumFieldsS ) ) AddLine( Format( "fnDbQueryS" , " ", "=", " ", fnDbQueryS ) ) AddLine( Format( "fnDbCommitS" , " ", "=", " ", fnDbCommitS ) ) AddLine( Format( "fnDbExecuteS" , " ", "=", " ", fnDbExecuteS ) ) AddLine( Format( "fnDbSelectS" , " ", "=", " ", fnDbSelectS ) ) AddLine( "-----------------------" ) AddLine( Format( "tableColumnTotalS" , " ", "=", " ", tableColumnTotalS ) ) AddLine( "-----------------------" ) // FOR I = columnMinI TO columnMaxI s = Format( "tableColumn", "NameDescription", Str( I ), "S" ) AddLine( Format( s, " ", "=", " ", FNStringGetArrayTableColumnNameDescriptionS( I ) ) ) ENDFOR // FOR I = columnMinI TO columnMaxI s = Format( "tableColumn", "NameVariable", Str( I ), "S" ) AddLine( Format( s, " ", "=", " ", FNStringGetArrayTableColumnNameVariableS( I ) ) ) ENDFOR // FOR I = columnMinI TO columnMaxI s = Format( "tableColumn", "Type", Str( I ), "S" ) AddLine( Format( s, " ", "=", " ", FNStringGetArrayTableColumnTypeS( I ) ) ) ENDFOR // AddLine( "-----------------------" ) AddLine( Format( "languageNaturalNameS" , " ", "=", " ", languageNaturalNameS ) ) AddLine( "-----------------------" ) AddLine( Format( "languageComputerNameS" , " ", "=", " ", languageComputerNameS ) ) AddLine( Format( "languageComputerNameNumberS" , " ", "=", " ", languageComputerNameCurrentNumberS ) ) AddLine( Format( "languageComputerNameInstallationDownloadS" , " ", "=", " ", languageComputerNameInstallationDownloadS ) ) AddLine( Format( "languageComputerInformationInstallationDownloadS" , " ", "=", " ", languageComputerInformationInstallationDownloadS ) ) AddLine( Format( "languageComputerUrlInstallationDownloadS" , " ", "=", " ", languageComputerUrlInstallationDownloadS ) ) AddLine( "-----------------------" ) AddLine( Format( "languageComputerIdeNameS" , " ", "=", " ", languageComputerNameS ) ) AddLine( Format( "languageComputerIdeNameNumberS" , " ", "=", " ", languageComputerIdeNameCurrentNumberS ) ) AddLine( Format( "languageComputerIdeNameInstallationDownloadS" , " ", "=", " ", languageComputerIdeNameInstallationDownloadS ) ) AddLine( Format( "languageComputerIdeInformationInstallationDownloadSS" , " ", "=", " ", languageComputerIdeInformationInstallationDownloadS ) ) AddLine( Format( "languageComputerIdeUrlInstallationDownloadS" , " ", "=", " ", languageComputerIdeUrlInstallationDownloadS ) ) AddLine( "-----------------------" ) AddLine( Format( "webServerNameS" , " ", "=", " ", webServerNameS ) ) AddLine( Format( "webServerNameNumberS" , " ", "=", " ", webServerNameCurrentNumberS ) ) AddLine( Format( "webServerNameInstallationDownloadS" , " ", "=", " ", webServerNameInstallationDownloadS ) ) AddLine( Format( "webServerInformationInstallationDownloadS" , " ", "=", " ", webServerInformationInstallationDownloadS ) ) AddLine( Format( "webServerUrlInstallationDownloadS" , " ", "=", " ", webServerUrlInstallationDownloadS ) ) AddLine( "-----------------------" ) AddLine( Format( "filenameStyleSheetS" , " ", "=", " ", filenameStyleSheetS ) ) AddLine( "-----------------------" ) AddLine( Format( "tableNameWebPage" , " ", "=", " ", tableNameWebPage ) ) AddLine( "-----------------------" ) AddLine( Format( "fileNameDatabaseSqlLocalS" , " ", "=", " ", fileNameDatabaseSqlLocalS ) ) AddLine( "-----------------------" ) AddLine( Format( "fileNameLanguageComputerSourceCodeLocalS" , " ", "=", " ", fileNameLanguageComputerSourceCodeLocalS ) ) AddLine( "-----------------------" ) AddLine( Format( "browserExecutableS" , " ", "=", " ", browserExecutableS ) ) AddLine( "-----------------------" ) AddLine( Format( "fileNameFtpLocalS" , " ", "=", " ", fileNameFtpLocalS ) ) AddLine( Format( "urlLocalPrefixS" , " ", "=", " ", urlLocalPrefixS ) ) AddLine( Format( "urlLocalS" , " ", "=", " ", urlLocalS ) ) AddLine( "-----------------------" ) AddLine( Format( "ftpDirectoryRemoteS" , " ", "=", " ", ftpDirectoryRemoteS ) ) AddLine( Format( "ftpPasswordRemoteS" , " ", "=", " ", ftpPasswordRemoteS ) ) AddLine( Format( "ftpServerNameRemoteS" , " ", "=", " ", ftpServerNameRemoteS ) ) AddLine( Format( "ftpUserNameRemoteS" , " ", "=", " ", ftpUserNameRemoteS ) ) AddLine( Format( "urlFtpRemoteS" , " ", "=", " ", urlFtpRemoteS ) ) AddLine( Format( "urlRemoteS" , " ", "=", " ", urlRemoteS ) ) AddLine( "-----------------------" ) AddLine( Format( "fileNameDatabaseConnectionCurrentS" , " ", "=", " ", fileNameDatabaseConnectionCurrentS ) ) AddLine( Format( "fileNameDatabaseConnectionLocalS" , " ", "=", " ", fileNameDatabaseConnectionLocalS ) ) AddLine( Format( "fileNameDatabaseConnectionRemoteS" , " ", "=", " ", fileNameDatabaseConnectionRemoteS ) ) AddLine( "-----------------------" ) AddLine( Format( "fileNameInitialization" , " ", "=", " ", fileNameIniS ) ) AddLine( Format( "sectionIniS" , " ", "=", " ", sectionIniS ) ) AddLine( "-----------------------" ) AddLine( Format( "fileNameFileNameOnlyS" , " ", "=", " ", fileNameFileNameOnlyS ) ) AddLine( "-----------------------" ) AddLine( Format( "programProcessStopMainS" , " ", "=", " ", programProcessStopMainS ) ) AddLine( Format( "programProcessStopParameterS" , " ", "=", " ", programProcessStopParameterS ) ) AddLine( "-----------------------" ) List( "Current initialization settings <press any key>", listX ) AbandonFile() PopPosition() PopBlock() // CASE databaseProductS WHEN "Firebird" Warn( Format( "If you get a 'remote connection rejected' error: Remember to put the correct 'gds32.dll' for the product", " ", databaseProductS, " ", "v1.5 in the windows system32 directory. Possibly replace it temporary, then put old gds32.dll back" ) ) Warn( Format( "if installed, Interbase overwrites (Firebird) gds32.dll automatically" ) ) WHEN "Interbase" Warn( Format( "If you get a 'remote connection rejected' error: Remember to put the correct 'gds32.dll' for the product", " ", databaseProductS, " ", "(e.g. v6.x or higher) in the windows system32 directory. Possibly replace it temporary, then put old gds32.dll back" ) ) WHEN "Oracle" Warn( Format( "Remember to drop the table for", " ", databaseProductS, " ", "by running ", urlLocalS, "?operation=deleteTable" ) ) Warn( Format( "If the operations (e.g. select) do not work (e.g. define error): Remember to create the table for", " ", databaseProductS, " ", "manually by running ", urlLocalS, "?operation=createTable" ) ) Warn( Format( "this because the database client did not seem to see the data in the webserver" ) ) WHEN "Sqlite" Warn( Format( "Remember to use Sqlite v2 (and not current Sqlite v3)" ) ) OTHERWISE ENDCASE // // Create the SQL text file which automatically will create the database table on your local system // PROCFileDeleteCompletelyReturnSimple( fileNameDatabaseSqlLocalS ) // EditFile( fileNameDatabaseSqlLocalS ) // PROCDatabaseTableConnect( databaseHostNameLocalS, databaseNameLocalS, databaseUserNameLocalS, databasePasswordLocalS, databaseTableNameLocalS, databaseProductS ) PROCDatabaseRemoveTableDrop( databaseTableNameLocalS, databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) PROCDatabaseCreateTable( databaseTableNameLocalS, columnMinI, columnMaxI, databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // SaveFile() // // // stopping all involved old processes, to keep it clean. You might skip this step. // PROCProgramRunProcessStopYesNo( browserExecutableS ) // CASE databaseProductS WHEN "Sqlite" // for the moment nothing, it might be necessary to stop it also, if multiple Sqlite processes in Microsoft Windows task manager WHEN "Oracle" // seems to run as a service. So leaving this for the moment OTHERWISE // // stopping all involved old processes, to keep it clean. You might skip this step. // PROCProgramRunProcessStopYesNo( databaseServerExecutableLocalS ) // ENDCASE // // Start your database server (E.g. if MySql this is the executable 'mysqld-nt.exe'). // (if debugging, you can check if this program is started using e.g. Microsoft Task Manager. // You should see the process 'mysqld-nt.exe' running. You should also see an MSDOS box running mysqld-nt.exe. // By running the MySql database server as as service, you could skip running it) // CASE databaseProductS WHEN "Firebird", "Interbase" // // you set the port with parameter -p at the server. See Firebird v1.5 release notes [Internet: source: http://www.crypton.co.uk/user/Firebird15ReleaseNotes.pdf] // PROCProgramRunParallelParameter( databaseServerExecutableLocalS, Format( "-a", " ", "-p", " ", databasePortLocalS ) ) WHEN "Sqlite" // do not run the database server when Sqlite, because the client does it all. OTHERWISE PROCProgramRunParallel( databaseServerExecutableLocalS ) ENDCASE // // Run the SQL text file in your MySql client // (because you pipe the SQL filename into your (MySql) client, // you need to use DOS (not ShellExecute() or StartPgm())) // CASE databaseProductS WHEN "Firebird", "Interbase" // isql -i c:\temp\ddd.sql -U sysdba -P masterkey Dos( Format( QuotePath( databaseClientExecutableLocalS ), " ", "-U", " ", databaseUserNameLocalS, " ", "-P", " ", databasePasswordLocalS, " ", "-i", " ", "'", QuotePath( fileNameDatabaseSqlLocalS ), "'" ), debugI ) WHEN "MySql" Dos( Format( QuotePath( databaseClientExecutableLocalS ), " ", "-u", " ", databaseUserNameLocalS, " ", "<", QuotePath( fileNameDatabaseSqlLocalS ) ), debugI ) WHEN "MicrosoftSqlServer" Dos( Format( QuotePath( databaseClientExecutableLocalS ), " ", "-U", " ", databaseUserNameLocalS, " ", "-P", " ", databasePasswordLocalS, " ", "<", QuotePath( fileNameDatabaseSqlLocalS ) ), debugI ) WHEN "Oracle" Dos( Format( QuotePath( databaseClientExecutableLocalS ), " ", "/nolog", " ", "@", QuotePath( fileNameDatabaseSqlLocalS ) ), debugI ) WHEN "Sqlite" Dos( Format( QuotePath( databaseClientExecutableLocalS ), " ", databaseNameLocalS, " ", "<", QuotePath( fileNameDatabaseSqlLocalS ) ), debugI ) OTHERWISE Warn( Format( "local database client executable has still to be determined for database product", " ", databaseProductS ) ) RETURN() ENDCASE // // Run the remote database client // CASE databaseProductS WHEN "MySql" PROCBrowserRunDefaultParameter( databaseClientExecutableRemoteS ) OTHERWISE Message( Format( "remote database client at provider has still to be determined for this database product", " ", databaseProductS ) ) ENDCASE // // Generate the local PHP database connection file // PROCDatabaseCreateConnectionPhp(databaseHostNameLocalS,databasePortLocalS,databaseUserNameLocalS,databasePasswordLocalS,databaseNameLocalS,fileNameDatabaseConnectionLocalS,fnDbConnectS,fnDbErrorS,fnDbSelectS,fnDbCloseS,fnDbExecuteS,databaseProductS) // // Generate the remote PHP database connection file // PROCDatabaseCreateConnectionPhp(databaseHostNameRemoteS,databasePortRemoteS,databaseUserNameRemoteS,databasePasswordRemoteS,databaseNameRemoteS,fileNameDatabaseConnectionRemoteS,fnDbConnectS,fnDbErrorS,fnDbSelectS,fnDbCloseS,fnDbExecuteS,databaseProductS) // // Set the local PHP database connection file // PROCFileDeleteCompletelyReturnSimple( fileNameDatabaseConnectionCurrentS ) EditFile( QuotePath( fileNameDatabaseConnectionLocalS ) ) SaveAs( QuotePath( fileNameDatabaseConnectionCurrentS ) ) // // Generate the PHP file with the operations 'C'reate/'R'ead/'U'pdate/'D'elete // PROCFileDeleteCompletelyReturnSimple( fileNameLanguageComputerSourceCodeLocalS ) // EditFile( fileNameLanguageComputerSourceCodeLocalS ) // AddLine( '<?php' ) AddLine( '// -----------------------------------------------' ) AddLine( ' $option1SA = array(' ) AddLine( ' "not_used" => "not_used",' ) AddLine( ' "=" => "=",' ) AddLine( ' ">" => "&gt;",' ) AddLine( ' "<" => "&lt;",' ) AddLine( ' ">=" => "&gt;=",' ) AddLine( ' "<=" => "&lt;=",' ) AddLine( ' "IN" => "IN",' ) AddLine( ' "LIKE" => "LIKE",' ) AddLine( ' "NOT" => "NOT"' ) AddLine( ' );' ) AddLine( '// -----------------------------------------------' ) AddLine( ' $option2SA = array(' ) AddLine( ' "not_used" => "not_used",' ) AddLine( ' "AND" => "AND",' ) AddLine( ' "OR" => "OR"' ) AddLine( ' );' ) AddLine( '// -----------------------------------------------' ) AddLine( ' $option3SA = array(' ) AddLine( ' "not_used" => "not_used",' ) AddLine( ' "=" => "="' ) AddLine( ' );' ) AddLine( '// -----------------------------------------------' ) // PROCProgramGotoNavigatePageDisable() // AddLine( '//' ) AddLine( Format( "include", " ", "'", SplitPath( fileNameDatabaseConnectionCurrentS, _NAME_ | _EXT_ ), "'", ";" ) ) AddLine( '//' ) // // When creating a table in the Oracle database client sqlplus.exe, even after a commit it was not seen in this program. Thus creating the table here (also). // // Now start the CRUD 'case' // AddLine( 'if ( Isset( $_REQUEST[ "operation" ] ) ) {' ) AddLine( ' $operationS = $_REQUEST[ "operation" ];' ) AddLine( '}' ) AddLine( 'else {' ) AddLine( ' $operationS = "";' ) AddLine( '};' ) AddLine( '//' ) AddLine( '//' ) AddLine( 'switch( $operationS ) {' ) // AddLine( ' case "":' ) AddLine( ' ?>' ) AddLine( ' <HTML>' ) AddLine( ' <HEAD>' ) AddLine( Format( ' <TITLE>', 'MENU', ' ', '-', ' ', tableNameWebPage, ' ', '-', ' ', 'database', ' ', databaseProductS, '</TITLE>' ) ) // AddLine( ' <LINK' ) AddLine( Format( ' HREF="', filenameStyleSheetS, '"' ) ) AddLine( ' REL="stylesheet"' ) AddLine( ' />' ) // AddLine( ' </HEAD>' ) AddLine( ' <BODY>' ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="red"' ) ) AddLine( Format( ' >' ) ) AddLine( Format( ' <H4 ALIGN="center">', tableNameWebPage, '</H4>' ) ) AddLine( Format( ' </FONT>' ) ) AddLine( '' ) AddLine( ' <TABLE' ) AddLine( ' BORDER="1"' ) AddLine( ' ALIGN="center"' ) AddLine( ' >' ) AddLine( ' <TR>' ) AddLine( ' <TH>' ) AddLine( ' OPERATIONS' ) AddLine( ' </TH>' ) AddLine( ' </TR>' ) AddLine( ' <TR> <TD ALIGN="center"> Create">http://localhost/ddd.php?operation=createGet">Create </TD> </TR>' ) AddLine( ' <TR> <TD ALIGN="center"> Read">http://localhost/ddd.php?operation=readGet">Read </TD> </TR>' ) AddLine( ' <TR> <TD ALIGN="center"> Update">http://localhost/ddd.php?operation=updateGet">Update </TD> </TR>' ) AddLine( ' <TR> <TD ALIGN="center"> Delete">http://localhost/ddd.php?operation=deleteGet">Delete </TD> </TR>' ) AddLine( ' <TR> <TD ALIGN="center"> &nbsp; </TD> </TR>' ) AddLine( ' <TR> <TD ALIGN="center"> Delete">http://localhost/ddd.php?operation=deleteTable">Delete Table </TD> </TR>' ) AddLine( ' <TR> <TD ALIGN="center"> Create">http://localhost/ddd.php?operation=createTable">Create Table </TD> </TR>' ) AddLine( ' </TABLE>' ) AddLine( '' ) AddLine( ' </BODY>' ) AddLine( ' </HTML>' ) AddLine( '' ) AddLine( ' <?php' ) AddLine( ' break;' ) // AddLine( ' case "deleteTable":' ) PROCDatabaseRemoveTableDropSqlQuery( databaseTableNameLocalS, databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) AddLine( ' break;' ) // AddLine( ' case "createTable":' ) PROCDatabaseCreateTableSqlQuery( databaseTableNameLocalS, columnMinI, columnMaxI, databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) AddLine( ' break;' ) // AddLine( ' case "createGet":' ) AddLine( ' ?>' ) AddLine( ' <HTML>' ) AddLine( ' <HEAD>' ) AddLine( Format( ' <TITLE>', "'", 'C', "'", 'reate', ' ', '-', ' ', tableNameWebPage, ' ', '-', ' ', 'database', ' ', databaseProductS, '</TITLE>' ) ) // AddLine( ' <LINK' ) AddLine( Format( ' HREF="', filenameStyleSheetS, '"' ) ) AddLine( ' REL="stylesheet"' ) AddLine( ' />' ) // AddLine( ' </HEAD>' ) AddLine( ' <BODY>' ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="red"' ) ) AddLine( Format( ' >' ) ) AddLine( Format( ' <H4>', tableNameWebPage, '</H4>' ) ) AddLine( Format( ' </FONT>' ) ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="blue"' ) ) AddLine( Format( ' >' ) ) AddLine( " <H5> CreateGet (=SQL INSERT) <H5/>" ) AddLine( Format( ' </FONT>' ) ) // AddLine( ' <FORM' ) AddLine( ' ACTION="<?php $PHP_SELF ?>"' ) AddLine( ' METHOD="GET"' ) AddLine( ' >' ) // AddLine( ' </BR>' ) AddLine( ' <INPUT' ) AddLine( ' TYPE="submit"' ) AddLine( ' NAME="operation"' ) AddLine( ' VALUE="createSet"' ) AddLine( ' />' ) AddLine( ' </BR>' ) // FOR I = columnMinI TO columnMaxI // s1 = FNStringGetArrayTableColumnNameDescriptionS( I ) s2 = FNStringGetArrayTableColumnNameVariableS( I ) s3 = FNStringGetArrayTableColumnTypeS( I ) // AddLine( ' </BR>' ) // AddLine( Format( "<H4>", s1, "</H4>" ) ) // CASE s3 WHEN "TEXT" AddLine( ' <TEXTAREA' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( Format( ' ROWS="', 5, '"' ) ) // AddLine( ' >' ) AddLine( ' </TEXTAREA>' ) OTHERWISE AddLine( ' <INPUT' ) AddLine( ' TYPE="text"' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( ' />' ) ENDCASE // ENDFOR // AddLine( ' </FORM>' ) AddLine( ' </BODY>' ) AddLine( ' </HTML>' ) AddLine( ' <?php' ) AddLine( ' break;' ) AddLine( ' case "createSet":' ) AddLine( ' //' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $', s2, ' = $_REQUEST[ "', s2, '" ];' ) ) // ENDFOR // AddLine( ' //' ) // s2 = FNStringGetArrayTableColumnNameVariableS( columnMinI ) // let id be the first column, by design // AddLine( Format( ' $', s2, ' = trim( $', s2, ' );' ) ) // AddLine( Format( ' if ( ( $', s2, ' == "" ) or ( $', s2, ' == "NULL" ) ) {' ) ) // if input value of that field is empty, let it be equal to NULL AddLine( Format( ' $', s2, ' = "NULL";' ) ) AddLine( ' };' ) AddLine( ' //' ) AddLine( ' $s = "";' ) AddLine( ' $s = $s . "INSERT INTO";' ) AddLine( ' $s = $s . " ";' ) AddLine( Format( ' $s = $s . ', '"', databaseTableNameLocalS, '"', ';' ) ) AddLine( ' $s = $s . " ";' ) AddLine( ' $s = $s . "(";' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) s3 = FNStringGetArrayTableColumnTypeS( I ) s3 = Trim( s3 ) s3 = Upper( s3 ) // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // AddLine( Format( ' $s = $s . "', s2, '" . "', separatorS, '";' ) ) // ENDFOR // AddLine( ' $s = $s . " " . ")" . " ";' ) AddLine( ' $s = $s . "VALUES";' ) AddLine( ' $s = $s . " " . "(" . " ";' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // s3 = FNStringGetArrayTableColumnTypeS( I ) s3 = Trim( s3 ) // // check if the beginning of the variable type starts with INT (then supposed it is integer), or NULL (then supposed it means 'NULL'), then do not it in single quotes // IF ( ( Upper( LeftStr( s3, Length( "INT" ) ) ) == "INT" ) OR ( Upper( LeftStr( s3, Length( "NULL" ) ) ) == "NULL" ) ) // In case of integer type or being NULL, put that value not between single quotes '' s = "" ELSE // otherwise put that value between single quotes '' s = "\'" ENDIF // AddLine( Format( " $s = $s . '", s, "' . $", s2, " . '", s, "'", " . ", '"', separatorS, '"', ';' ) ) // ENDFOR // AddLine( ' $s = $s . ")";' ) // AddLine( ' $s = $s . ";";' ) // do not put a semi-colon ';' at the end. The Oracle database does not like that. AddLine( ' //' ) AddLine( ' print( "</BR>" );' ) AddLine( ' //' ) // PROCDatabaseRunSqlQuery( databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // AddLine( ' break;' ) AddLine( ' case "readGet":' ) AddLine( ' ?>' ) AddLine( ' <HTML>' ) AddLine( ' <HEAD>' ) // AddLine( Format( ' <TITLE>', "'", 'R', "'", 'ead', ' ', '-', ' ', tableNameWebPage, ' ', '-', ' ', 'database', ' ', databaseProductS, '</TITLE>' ) ) // AddLine( ' <LINK' ) AddLine( Format( ' HREF="', filenameStyleSheetS, '"' ) ) AddLine( ' REL="stylesheet"' ) AddLine( ' />' ) // AddLine( ' </HEAD>' ) AddLine( ' <BODY>' ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="red"' ) ) AddLine( Format( ' >' ) ) AddLine( Format( ' <H4>', tableNameWebPage, '</H4>' ) ) AddLine( Format( ' </FONT>' ) ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="blue"' ) ) AddLine( Format( ' >' ) ) AddLine( " <H5> ReadGet (=SQL SELECT) <H5/>" ) AddLine( Format( ' </FONT>' ) ) // AddLine( ' <FORM' ) AddLine( ' ACTION="<?php $PHP_SELF ?>"' ) AddLine( ' METHOD="GET"' ) AddLine( ' >' ) // AddLine( ' </BR>' ) AddLine( ' <INPUT' ) AddLine( ' TYPE="submit"' ) AddLine( ' NAME="operation"' ) AddLine( ' VALUE="readSet"' ) AddLine( ' />' ) AddLine( ' </BR>' ) // FOR I = columnMinI TO columnMaxI // s1 = FNStringGetArrayTableColumnNameDescriptionS( I ) s2 = FNStringGetArrayTableColumnNameVariableS( I ) s3 = FNStringGetArrayTableColumnTypeS( I ) // AddLine( ' </BR>' ) // AddLine( Format( "<H4>", s1, "</H4>" ) ) // AddLine( ' <?php' ) AddLine( ' print "<SELECT";' ) AddLine( Format( ' print " NAME = \"select', I, '1S\"";' ) ) AddLine( ' print ">";' ) AddLine( ' //' ) AddLine( ' reset( $option1SA );' ) AddLine( ' while( list( $key, $value ) = each( $option1SA ) ) {' ) AddLine( ' //' ) AddLine( ' print "<OPTION";' ) AddLine( ' print " VALUE=";' ) // AddLine( ' print \";' ) AddLine( ' print $value;' ) // AddLine( ' print \";' ) AddLine( ' print ">";' ) AddLine( ' print $key;' ) AddLine( ' print "</OPTION>";' ) AddLine( ' }' ) AddLine( ' print "</SELECT>";' ) AddLine( ' ?>' ) // CASE s3 WHEN "TEXT" AddLine( ' <TEXTAREA' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( Format( ' ROWS="', 5, '"' ) ) // AddLine( ' >' ) AddLine( ' </TEXTAREA>' ) OTHERWISE AddLine( ' <INPUT' ) AddLine( ' TYPE="text"' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( ' />' ) ENDCASE // // the last option should not have a binary operator (like 'AND', 'OR', ...) after it IF ( NOT ( I == columnMaxI ) ) AddLine( ' <?php' ) AddLine( ' print "<SELECT";' ) AddLine( Format( ' print " NAME = \"select', I, '2S\"";' ) ) AddLine( ' print ">";' ) AddLine( ' //' ) AddLine( ' reset( $option2SA );' ) AddLine( ' while( list( $key, $value ) = each( $option2SA ) ) {' ) AddLine( ' //' ) AddLine( ' print "<OPTION";' ) AddLine( ' print " VALUE=";' ) AddLine( ' print $value;' ) AddLine( ' print ">";' ) AddLine( ' print $key;' ) AddLine( ' print "</OPTION>";' ) AddLine( ' }' ) AddLine( ' print "</SELECT>";' ) AddLine( ' ?>' ) ENDIF // ENDFOR // AddLine( ' </FORM>' ) AddLine( ' </BODY>' ) AddLine( ' </HTML>' ) AddLine( ' <?php' ) AddLine( ' break;' ) AddLine( ' case "readSet":' ) AddLine( ' //' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $', s2, ' = $_REQUEST[ "', s2, '" ];' ) ) // ENDFOR // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $select', I, '1S = $_REQUEST[ "', 'select', I, '1S" ];' ) ) // ENDFOR // // do not include the binary operator ('AND, OR, ...') for the last. Thus -1. FOR I = columnMinI TO columnMaxI - 1 // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $select', I, '2S = $_REQUEST[ "', 'select', I, '2S" ];' ) ) // ENDFOR // AddLine( ' //' ) AddLine( ' $s = "";' ) AddLine( ' $s = $s . "SELECT";' ) AddLine( ' $s = $s . " ";' ) AddLine( ' $s = $s . "*";' ) AddLine( ' $s = $s . " ";' ) AddLine( ' $s = $s . "FROM";' ) AddLine( ' $s = $s . " ";' ) AddLine( Format( ' $s = $s . ', '"', databaseTableNameLocalS, '"', ';' ) ) AddLine( ' $s = $s . " ";' ) // AddLine( ' if ( !(' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "and" ENDIF // AddLine( Format( ' ( $select', I, '1S == "not_used" ) ', separatorS ) ) // IF ( NOT ( I == columnMaxI ) ) AddLine( Format( ' ( $select', I, '2S == "not_used" ) ', separatorS ) ) ENDIF // ENDFOR // AddLine( ' ) ) {' ) AddLine( ' $s = $s . "WHERE";' ) AddLine( ' };' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' if ( !( $select', I, '1S == "not_used" ) ) {' ) ) // s3 = FNStringGetArrayTableColumnTypeS( I ) s3 = Trim( s3 ) // // check if the beginning of the variable type starts with INT (then supposed it is integer), or NULL (then supposed it means 'NULL'), then do not it in single quotes // IF ( ( Upper( LeftStr( s3, Length( "INT" ) ) ) == "INT" ) OR ( Upper( LeftStr( s3, Length( "NULL" ) ) ) == "NULL" ) ) // // In case of integer type or being NULL, put that value not between single quotes '' // s = "" // ELSE // otherwise put that value between single quotes '' s = "\'" ENDIF // AddLine( Format ( ' $s = $s . " " . "', s2, '" . " " . $select', I, '1S . " " . ', "'", s, "' . ", '$', s2, " . '", s, "'", ';' ) ) // AddLine( ' };' ) // // do not include the binary operator ('AND, OR, ...') for the last. IF ( NOT ( I == columnMaxI ) ) AddLine( Format( ' if ( !( $select', I, '2S == "not_used" ) ) {' ) ) AddLine( Format( ' $s = $s . " " . $select', I, '2S;' ) ) AddLine( ' };' ) ENDIF // ENDFOR // AddLine( ' //' ) AddLine( ' print( "</BR>" );' ) AddLine( ' //' ) // PROCDatabaseRunSqlQuery( databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // AddLine( Format( ' $columnMaxI = ', fnDbNumFieldsS, '( $result );' ) ) AddLine( ' //' ) AddLine( ' print( "</BR>" );' ) AddLine( ' print "<HTML>";' ) AddLine( ' print "<TABLE BORDER=1>";' ) AddLine( ' //' ) AddLine( ' print "<TR>";' ) AddLine( ' //' ) // CASE databaseProductS WHEN "Oracle" AddLine( ' for ( $I = 1; $I < $columnMaxI + 1; $I++ ) {' ) OTHERWISE AddLine( ' for ( $I = 0; $I < $columnMaxI; $I++ ) {' ) ENDCASE // AddLine( ' print "<TH>";' ) // AddLine( Format( ' print ', fnDbFieldNameS, '( $result, $I );' ) ) // AddLine( ' print "</TH>";' ) AddLine( ' }' ) // AddLine( ' //' ) AddLine( ' print "</TR>";' ) AddLine( ' //' ) // AddLine( Format( ' while ( $row = ', fnDbFetchArrayS, '( $result ) ) {' ) ) AddLine( ' //' ) AddLine( ' print "<TR>";' ) AddLine( ' //' ) AddLine( ' for ( $I = 0; $I < $columnMaxI; $I++ ) {' ) AddLine( ' print "<TD>";' ) AddLine( ' if ( ! isset( $row[ $I ] ) ) { // test for NULL value' ) AddLine( ' print "NULL";' ) AddLine( ' }' ) AddLine( ' else {' ) AddLine( ' print $row[ $I ];' ) AddLine( ' }' ) AddLine( ' print "</TD>";' ) AddLine( ' }' ) // PROCDatabaseGetSqlQueryOperation( columnMinI ) // AddLine( ' print "</TR>";' ) AddLine( ' }' ) // CASE databaseProductS WHEN "Firebird", "Interbase", "Oracle" AddLine( Format( fnDbFreeResultS, '(', " ", "$result", " ", ')', ';' ) ) OTHERWISE ENDCASE // AddLine( ' //' ) AddLine( ' print "</TABLE>";' ) AddLine( ' print "</HTML>";' ) AddLine( ' //' ) AddLine( ' break;' ) AddLine( ' case "updateGet":' ) AddLine( ' ?>' ) AddLine( ' <HTML>' ) AddLine( ' <HEAD>' ) // AddLine( Format( ' <TITLE>', "'", 'U', "'", 'pdate', ' ', '-', ' ', tableNameWebPage, ' ', '-', ' ', 'database', ' ', databaseProductS, '</TITLE>' ) ) // AddLine( ' <LINK' ) AddLine( Format( ' HREF="', filenameStyleSheetS, '"' ) ) AddLine( ' REL="stylesheet"' ) AddLine( ' />' ) // AddLine( ' </HEAD>' ) AddLine( ' <BODY>' ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="red"' ) ) AddLine( Format( ' >' ) ) AddLine( Format( ' <H4>', tableNameWebPage, '</H4>' ) ) AddLine( Format( ' </FONT>' ) ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="blue"' ) ) AddLine( Format( ' >' ) ) AddLine( " <H5> UpdateGet (= SQL UPDATE) <H5/>" ) AddLine( Format( ' </FONT>' ) ) // AddLine( ' </BR>' ) AddLine( ' <FORM' ) AddLine( ' ACTION="<?php $PHP_SELF ?>"' ) AddLine( ' METHOD="GET"' ) AddLine( ' >' ) // AddLine( ' </BR>' ) AddLine( ' SET' ) // AddLine( ' </BR>' ) AddLine( ' <INPUT' ) AddLine( ' TYPE="submit"' ) AddLine( ' NAME="operation"' ) AddLine( ' VALUE="updateSet"' ) AddLine( ' />' ) AddLine( ' </BR>' ) FOR I = columnMinI TO columnMaxI // s1 = FNStringGetArrayTableColumnNameDescriptionS( I ) s2 = FNStringGetArrayTableColumnNameVariableS( I ) s3 = FNStringGetArrayTableColumnTypeS( I ) // AddLine( ' </BR>' ) // AddLine( Format( "<H4>", s1, "</H4>" ) ) // AddLine( ' <?php' ) AddLine( ' print "<SELECT";' ) AddLine( Format( ' print " NAME = \"select1', I, '1S\"";' ) ) AddLine( ' print ">";' ) AddLine( ' //' ) AddLine( ' reset( $option3SA );' ) AddLine( ' while( list( $key, $value ) = each( $option3SA ) ) {' ) AddLine( ' //' ) AddLine( ' print "<OPTION";' ) AddLine( ' print " VALUE=";' ) // AddLine( ' print \";' ) AddLine( ' print $value;' ) // AddLine( ' print \";' ) AddLine( ' print ">";' ) AddLine( ' print $key;' ) AddLine( ' print "</OPTION>";' ) AddLine( ' }' ) AddLine( ' print "</SELECT>";' ) AddLine( ' ?>' ) // CASE s3 WHEN "TEXT" AddLine( ' <TEXTAREA' ) // AddLine( Format( ' NAME="', s2, '1"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( Format( ' ROWS="', 5, '"' ) ) // AddLine( ' >' ) AddLine( ' </TEXTAREA>' ) OTHERWISE AddLine( ' <INPUT' ) AddLine( ' TYPE="text"' ) // AddLine( Format( ' NAME="', s2, '1"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( ' />' ) ENDCASE // ENDFOR // AddLine( ' </BR>' ) AddLine( ' </BR>' ) AddLine( ' WHERE' ) AddLine( ' </BR>' ) // FOR I = columnMinI TO columnMaxI // s1 = FNStringGetArrayTableColumnNameDescriptionS( I ) s2 = FNStringGetArrayTableColumnNameVariableS( I ) s3 = FNStringGetArrayTableColumnTypeS( I ) // AddLine( ' </BR>' ) // AddLine( Format( "<H4>", s1, "</H4>" ) ) // AddLine( ' <?php' ) AddLine( ' print "<SELECT";' ) AddLine( Format( ' print " NAME = \"select', I, '1S\"";' ) ) AddLine( ' print ">";' ) AddLine( ' //' ) AddLine( ' reset( $option1SA );' ) AddLine( ' while( list( $key, $value ) = each( $option1SA ) ) {' ) AddLine( ' //' ) AddLine( ' print "<OPTION";' ) AddLine( ' print " VALUE=";' ) // AddLine( ' print \";' ) AddLine( ' print $value;' ) // AddLine( ' print \";' ) AddLine( ' print ">";' ) AddLine( ' print $key;' ) AddLine( ' print "</OPTION>";' ) AddLine( ' }' ) AddLine( ' print "</SELECT>";' ) AddLine( ' ?>' ) // CASE s3 WHEN "TEXT" AddLine( ' <TEXTAREA' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( Format( ' ROWS="', 5, '"' ) ) // AddLine( ' >' ) AddLine( ' </TEXTAREA>' ) OTHERWISE AddLine( ' <INPUT' ) AddLine( ' TYPE="text"' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( ' />' ) ENDCASE // // the last option should not have a binary operator (like 'AND', 'OR', ...) after it IF ( NOT ( I == columnMaxI ) ) AddLine( ' <?php' ) AddLine( ' print "<SELECT";' ) AddLine( Format( ' print " NAME = \"select', I, '2S\"";' ) ) AddLine( ' print ">";' ) AddLine( ' //' ) AddLine( ' reset( $option2SA );' ) AddLine( ' while( list( $key, $value ) = each( $option2SA ) ) {' ) AddLine( ' //' ) AddLine( ' print "<OPTION";' ) AddLine( ' print " VALUE=";' ) AddLine( ' print $value;' ) AddLine( ' print ">";' ) AddLine( ' print $key;' ) AddLine( ' print "</OPTION>";' ) AddLine( ' }' ) AddLine( ' print "</SELECT>";' ) AddLine( ' ?>' ) ENDIF // ENDFOR // AddLine( ' </FORM>' ) AddLine( ' </BODY>' ) AddLine( ' </HTML>' ) AddLine( ' <?php' ) AddLine( ' break;' ) AddLine( ' case "updateSet":' ) AddLine( ' //' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $', s2, ' = $_REQUEST[ "', s2, '" ];' ) ) // ENDFOR // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $', s2, '1 = $_REQUEST[ "', s2, '1" ];' ) ) // ENDFOR // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $select', I, '1S = $_REQUEST[ "', 'select', I, '1S" ];' ) ) // ENDFOR // // do not include the binary operator ('AND, OR, ...') for the last. Thus -1. FOR I = columnMinI TO columnMaxI - 1 // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $select', I, '2S = $_REQUEST[ "', 'select', I, '2S" ];' ) ) // ENDFOR // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $select1', I, '1S = $_REQUEST[ "', 'select1', I, '1S" ];' ) ) // ENDFOR // AddLine( ' //' ) AddLine( ' $s = "";' ) AddLine( ' $s = $s . "UPDATE";' ) AddLine( ' $s = $s . " ";' ) AddLine( Format( ' $s = $s . ', '"', databaseTableNameLocalS, '"', ';' ) ) AddLine( ' $s = $s . " ";' ) AddLine( ' $s = $s . "SET";' ) AddLine( ' $s = $s . " ";' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' if ( !( $select1', I, '1S == "not_used" ) ) {' ) ) // s3 = FNStringGetArrayTableColumnTypeS( I ) s3 = Trim( s3 ) // // check if the beginning of the variable type starts with INT (then supposed it is integer), or NULL (then supposed it means 'NULL'), then do not it in single quotes // IF ( ( Upper( LeftStr( s3, Length( "INT" ) ) ) == "INT" ) OR ( Upper( LeftStr( s3, Length( "NULL" ) ) ) == "NULL" ) ) // In case of integer type or being NULL, put that value not between single quotes '' s = "" ELSE // otherwise put that value between single quotes '' s = "\'" ENDIF // AddLine( Format ( ' $s = $s . " " . "', s2, '" . " " . $select1', I, '1S . " " . ', "'", s, "' . ", '$', s2, "1 . '", s, "'", ';' ) ) // AddLine( ' };' ) // ENDFOR // AddLine( ' $s = $s . " ";' ) AddLine( ' $s = $s . "WHERE" . " ";' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' if ( !( $select', I, '1S == "not_used" ) ) {' ) ) // s3 = FNStringGetArrayTableColumnTypeS( I ) s3 = Trim( s3 ) // // check if the beginning of the variable type starts with INT (then supposed it is integer), or NULL (then supposed it means 'NULL'), then do not it in single quotes // IF ( ( Upper( LeftStr( s3, Length( "INT" ) ) ) == "INT" ) OR ( Upper( LeftStr( s3, Length( "NULL" ) ) ) == "NULL" ) ) // In case of integer type or being NULL, put that value not between single quotes '' s = "" ELSE // otherwise put that value between single quotes '' s = "\'" ENDIF // AddLine( Format ( ' $s = $s . " " . "', s2, '" . " " . $select', I, '1S . " " . ', "'", s, "' . ", '$', s2, " . '", s, "'", ';' ) ) // AddLine( ' };' ) // // do not include the binary operator ('AND, OR, ...') for the last. IF ( NOT ( I == columnMaxI ) ) AddLine( Format( ' if ( !( $select', I, '2S == "not_used" ) ) {' ) ) AddLine( Format( ' $s = $s . " " . $select', I, '2S;' ) ) AddLine( ' };' ) ENDIF // ENDFOR // AddLine( ' //' ) AddLine( ' print( "</BR>" );' ) AddLine( ' //' ) // PROCDatabaseRunSqlQuery( databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // AddLine( ' break;' ) AddLine( ' case "deleteGet":' ) AddLine( ' ?>' ) AddLine( ' <HTML>' ) AddLine( ' <HEAD>' ) // AddLine( Format( ' <TITLE>', "'", 'D', "'", 'elete', ' ', '-', ' ', tableNameWebPage, ' ', '-', ' ', 'database', ' ', databaseProductS, '</TITLE>' ) ) // AddLine( ' <LINK' ) AddLine( Format( ' HREF="', filenameStyleSheetS, '"' ) ) AddLine( ' REL="stylesheet"' ) AddLine( ' />' ) // AddLine( ' </HEAD>' ) AddLine( ' <BODY>' ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="red"' ) ) AddLine( Format( ' >' ) ) AddLine( Format( ' <H4>', tableNameWebPage, '</H4>' ) ) AddLine( Format( ' </FONT>' ) ) // AddLine( Format( ' <FONT' ) ) AddLine( Format( ' COLOR="blue"' ) ) AddLine( Format( ' >' ) ) AddLine( " <H5> DeleteGet (= SQL DELETE) <H5/>" ) AddLine( Format( ' </FONT>' ) ) // AddLine( ' <FORM' ) AddLine( ' ACTION="<?php $PHP_SELF ?>"' ) AddLine( ' METHOD="GET"' ) AddLine( ' >' ) // AddLine( ' </BR>' ) AddLine( ' <INPUT' ) AddLine( ' TYPE="submit"' ) AddLine( ' NAME="operation"' ) AddLine( ' VALUE="deleteSet"' ) AddLine( ' />' ) AddLine( ' </BR>' ) // FOR I = columnMinI TO columnMaxI // s1 = FNStringGetArrayTableColumnNameDescriptionS( I ) s2 = FNStringGetArrayTableColumnNameVariableS( I ) s3 = FNStringGetArrayTableColumnTypeS( I ) // AddLine( ' </BR>' ) // AddLine( Format( "<H4>", s1, "</H4>" ) ) // AddLine( ' <?php' ) AddLine( ' print "<SELECT";' ) AddLine( Format( ' print " NAME = \"select', I, '1S\"";' ) ) AddLine( ' print ">";' ) AddLine( ' //' ) AddLine( ' reset( $option1SA );' ) AddLine( ' while( list( $key, $value ) = each( $option1SA ) ) {' ) AddLine( ' //' ) AddLine( ' print "<OPTION";' ) AddLine( ' print " VALUE=";' ) // AddLine( ' print \";' ) AddLine( ' print $value;' ) // AddLine( ' print \";' ) AddLine( ' print ">";' ) AddLine( ' print $key;' ) AddLine( ' print "</OPTION>";' ) AddLine( ' }' ) AddLine( ' print "</SELECT>";' ) AddLine( ' ?>' ) // CASE s3 WHEN "TEXT" AddLine( ' <TEXTAREA' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( Format( ' ROWS="', 5, '"' ) ) // AddLine( ' >' ) AddLine( ' </TEXTAREA>' ) OTHERWISE AddLine( ' <INPUT' ) AddLine( ' TYPE="text"' ) // AddLine( Format( ' NAME="', s2, '"' ) ) // AddLine( Format( ' SIZE="', FNMathGetStringTableColumnSizeI( s3, 50, 5, 150 ), '"' ) ) // AddLine( ' />' ) ENDCASE // // the last option should not have a binary operator (like 'AND', 'OR', ...) after it IF ( NOT ( I == columnMaxI ) ) AddLine( ' <?php' ) AddLine( ' print "<SELECT";' ) AddLine( Format( ' print " NAME = \"select', I, '2S\"";' ) ) AddLine( ' print ">";' ) AddLine( ' //' ) AddLine( ' reset( $option2SA );' ) AddLine( ' while( list( $key, $value ) = each( $option2SA ) ) {' ) AddLine( ' //' ) AddLine( ' print "<OPTION";' ) AddLine( ' print " VALUE=";' ) AddLine( ' print $value;' ) AddLine( ' print ">";' ) AddLine( ' print $key;' ) AddLine( ' print "</OPTION>";' ) AddLine( ' }' ) AddLine( ' print "</SELECT>";' ) AddLine( ' ?>' ) ENDIF // ENDFOR // AddLine( ' </FORM>' ) AddLine( ' </BODY>' ) AddLine( ' </HTML>' ) AddLine( ' <?php' ) AddLine( ' break;' ) AddLine( ' //' ) AddLine( ' case "deleteSet":' ) AddLine( ' //' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $', s2, ' = $_REQUEST[ "', s2, '" ];' ) ) // ENDFOR // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $select', I, '1S = $_REQUEST[ "', 'select', I, '1S" ];' ) ) // ENDFOR // // do not include the binary operator ('AND, OR, ...') for the last. Thus -1. FOR I = columnMinI TO columnMaxI - 1 // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' $select', I, '2S = $_REQUEST[ "', 'select', I, '2S" ];' ) ) // ENDFOR // AddLine( ' //' ) AddLine( ' $s = "";' ) AddLine( ' $s = $s . "DELETE";' ) AddLine( ' $s = $s . " ";' ) AddLine( ' $s = $s . "FROM";' ) AddLine( ' $s = $s . " ";' ) AddLine( Format( ' $s = $s . ', '"', databaseTableNameLocalS, '"', ';' ) ) AddLine( ' $s = $s . " ";' ) AddLine( ' $s = $s . "WHERE";' ) AddLine( ' $s = $s . " ";' ) // AddLine( Format( 'if ( Isset( $_REQUEST[ "', FNStringGetArrayTableColumnNameVariableS( columnMinI ), '" ] ) ) {' ) ) // AddLine( Format( ' $s = $s . ', "'", FNStringGetArrayTableColumnNameVariableS( columnMinI ), ' ', '=', ' ', "'", ' . $_REQUEST[ "', FNStringGetArrayTableColumnNameVariableS( columnMinI ), '" ]', ';' ) ) // AddLine( '}' ) AddLine( 'else {' ) // FOR I = columnMinI TO columnMaxI // s2 = FNStringGetArrayTableColumnNameVariableS( I ) // AddLine( Format( ' if ( !( $select', I, '1S == "not_used" ) ) {' ) ) // s3 = FNStringGetArrayTableColumnTypeS( I ) s3 = Trim( s3 ) // // check if the beginning of the variable type starts with INT (then supposed it is integer), or NULL (then supposed it means 'NULL'), then do not it in single quotes // IF ( ( Upper( LeftStr( s3, Length( "INT" ) ) ) == "INT" ) OR ( Upper( LeftStr( s3, Length( "NULL" ) ) ) == "NULL" ) ) // In case of integer type or being NULL, put that value not between single quotes '' s = "" ELSE // otherwise put that value between single quotes '' s = "\'" ENDIF // AddLine( Format ( ' $s = $s . " " . "', s2, '" . " " . $select', I, '1S . " " . ', "'", s, "' . ", '$', s2, " . '", s, "'", ';' ) ) // AddLine( ' };' ) // // do not include the binary operator ('AND, OR, ...') for the last. IF ( NOT ( I == columnMaxI ) ) AddLine( Format( ' if ( !( $select', I, '2S == "not_used" ) ) {' ) ) AddLine( Format( ' $s = $s . " " . $select', I, '2S;' ) ) AddLine( ' };' ) ENDIF // ENDFOR // AddLine( '};' ) AddLine( ' //' ) AddLine( ' print( "</BR>" );' ) AddLine( ' //' ) // PROCDatabaseRunSqlQuery( databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // AddLine( ' break;' ) AddLine( '}' ) AddLine( Format( 'if ( ', databaseLinkGS,' ) {' ) ) AddLine( Format( " ", fnDbCloseS, '( ', databaseLinkGS, ' );' ) ) AddLine( '}' ) AddLine( 'else {' ) AddLine( Format( ' die( "Could not close the databaselink:" . " " . ( ', fnDbErrorS, ' ) );' ) ) AddLine( '}' ) // AddLine( '?>' ) // SaveFile() // // Run the local PHP file, each with an operation (Create/Read/Update/Delete) // // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlLocalS, "?operation=createGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlLocalS, "?operation=readGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlLocalS, "?operation=updateGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlLocalS, "?operation=deleteGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlLocalS, "" ) ) // // Generate the remote database connection file // // copy remote database connection file to same name as your current file, and store it in same directory, after which you will upload EditFile( fileNameDatabaseConnectionRemoteS ) PROCFileDeleteCompletelyReturnSimple( Format( SplitPath( fileNameDatabaseConnectionRemoteS, _DRIVE_ | _PATH_ ), SplitPath( fileNameDatabaseConnectionCurrentS, _NAME_ | _EXT_ ) ) ) SaveAs( Format( SplitPath( fileNameDatabaseConnectionRemoteS, _DRIVE_ | _PATH_ ), SplitPath( fileNameDatabaseConnectionCurrentS, _NAME_ | _EXT_ ) ) ) // // Upload the remote PHP file and the remote database connection file // PROCFileDeleteCompletelyReturnSimple( fileNameFtpLocalS ) // EditFile( fileNameFtpLocalS ) // AddLine( Format( "open", " ", ftpServerNameRemoteS ) ) AddLine( ftpUserNameRemoteS ) AddLine( ftpPasswordRemoteS ) AddLine( "ascii" ) AddLine( Format( "cd", " ", ftpDirectoryRemoteS ) ) AddLine( Format( "lcd", " ", RemoveTrailingSlash( SplitPath( fileNameLanguageComputerSourceCodeLocalS, _DRIVE_ | _PATH_ ) ) ) ) AddLine( Format( "put", " ", fileNameFileNameOnlyS ) ) AddLine( Format( "lcd", " ", RemoveTrailingSlash( SplitPath( fileNameDatabaseConnectionRemoteS, _DRIVE_ | _PATH_ ) ) ) ) AddLine( Format( "put", " ", SplitPath( fileNameDatabaseConnectionCurrentS, _NAME_ | _EXT_ ) ) ) AddLine( "quit" ) SaveFile() // // Run the Microsoft MSDOS ftp.exe program using the '-s' parameter on a generated text file with ftp commands // (you might consider adding the '_DONT_PROMPT_', if you do not want to see your commands executing) // Dos( Format( fileNameFtpExecutableLocalS, " ", "-s:", fileNameFtpLocalS ), debugI ) // // Make sure you delete your file with ftp commands, as it contains e.g. your ftp user name and password // PROCFileDeleteCompletelyReturnSimple( fileNameFtpLocalS ) // // // Run the remote PHP file, each with an operation (Create/Read/Update/Delete) // // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlRemoteS, "?operation=createGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlRemoteS, "?operation=readGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlRemoteS, "?operation=updateGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlRemoteS, "?operation=deleteGet" ) ) // PROCProgramRun_ParallelParameterDirectoryNot( browserExecutableS, Format( urlRemoteS, "" ) ) // PopBlock() // PopPosition() END // library: string: get: input: filename: central <description>input a filename: central</description> <version>1.0.0.0.4</version> (filenamemacro=getstfce.s) [kn, zoe, mo, 14-06-1999 20:43:36] STRING PROC FNStringGetInputFilenameCentralS( STRING askS, STRING defaultS, INTEGER flagsI, INTEGER historyI ) // e.g. PROC Main() // e.g. Message( FNStringGetInputFilenameCentralS( "Filename =", "myfile.dok", 0, _EDIT_HISTORY_ ) ) // gives e.g. "myfile.dok" // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = defaultS // INTEGER escapeB = FNMathCheckInitializeNewBooleanFalseB() // escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, flagsI, historyI ) ) // // variation: escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, _FULL_PATH_ ) ) // // variation: escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, _MUST_EXIST_ ) ) // // variation: escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, _WRITE_ACCESS_ ) ) // // or combinations of the 3 above TSE variables (e.g. _FULL_PATH_ | _MUST_EXIST_) // // see TSE help // IF ( escapeB AND FNStringCheckEmptyB( s ) ) // RETURN( FNStringGetEscapeS() ) // ENDIF // <Escape> was pressed, and you cleared the filename box in response // IF FNStringCheckEmptyB( s ) // RETURN( defaultS ) // // variation: IF FNMathCheckLogicNotB( FNStringGetLengthI( s ) ) ...) // ENDIF // <Enter> was pressed, in response // RETURN( s ) // response was entered // END // library: string: equal: are two given strings equal? (stored in 'checstcf.s') [kn, zoe, we, 04-10-2000 18:23:27] INTEGER PROC FNStringCheckEqualB( STRING s1, STRING s2 ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: check: equal: first string = ", "a" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "string: check: equal: second string = ", "a" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNStringCheckEqualB( s1, s2 ) ) // gives e.g. TRUE when string1 is equal to string2 // e.g. END // e.g. // e.g. <F12> Main() // // // <F12> PROCMessage( FNStringCheckEqualB( "knud", "knud" ) ) // gives TRUE // // <F12> PROCMessage( FNStringCheckEqualB( "knud", "van" ) ) // gives FALSE RETURN( s1 == s2 ) END // library: string: get: escape <description>general output string to recognize an escape (e.g. in another routine). Central routine, only one occurrence of this constant string</description> <version>1.0.0.0.2</version> (filenamemacro=getstges.s) [kn, ri, sa, 05-12-1998 18:52:24] STRING PROC FNStringGetEscapeS() // e.g. PROC Main() // e.g. Message( FNStringGetEscapeS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( "<ESCAPE>" ) // END // library: string: get: search: history: find: input <description>input a string: history: find</description> <version>1.0.0.0.2</version> (filenamemacro=getstfir.s) [kn, ri, sa, 25-08-2001 21:00:25] STRING PROC FNStringGetSearchHistoryFindInputS( STRING askS, STRING answerDefaultS ) // e.g. PROC Main() // e.g. Message( FNStringGetSearchHistoryFindInputS( "Please input something", "test" ) ) // gives e.g. "test" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetHistoryInputS( askS, answerDefaultS, _FIND_HISTORY_ ) ) // END // library: string: get: product: change: database: crud <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstdcr.s) [kn, ri, fr, 08-08-2008 21:52:33] STRING PROC FNStringGetProductChangeDatabaseCrudS( STRING lineChoiceS, STRING sectionS, STRING arrayAS, STRING fileNameS ) // e.g. PROC Main() // e.g. Message( FNStringGetProductChangeDatabaseCrudS( "", "", "", "" ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() INTEGER xListI = 80 INTEGER stringLengthI = MAXSTRINGLEN STRING s[255] = "" INTEGER stopB = FALSE INTEGER minI = 1 INTEGER I = 0 INTEGER bufferI = 0 // PushPosition() // PushPosition() bufferI = CreateTempBuffer() PopPosition() // GotoBufferId( bufferI ) // I = minI - 1 // REPEAT // I = I + 1 // s = GetProfileStr( sectionS, Format( arrayAS, Str( I ), "S" ), "", fileNameS ) // stopB = ( s == "" ) // IF ( NOT ( stopB ) ) AddLine( s ) ENDIF // UNTIL ( stopB ) // GotoLine( Val( lineChoiceS ) ) // goto chosen product option, as chosen in .ini file // IF ( List( "Choose an option", xListI ) == 0 ) GotoBufferId( bufferI ) AbandonFile() PopPosition() RETURN( FNStringGetEmptyS() ) ENDIF // s = GetText( 1, stringLengthI ) // AbandonFile() // PopPosition() // s = Trim( s ) // RETURN( s ) // END // library: string: get: array: table: column: name <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcng.s) [kn, ho, we, 06-08-2008 13:28:41] STRING PROC FNStringGetArrayTableColumnNameDescriptionS( INTEGER I ) // e.g. PROC Main() // e.g. Message( FNStringGetArrayTableColumnNameDescriptionS( 1 ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetArrayTableColumnCentralS( "NameDescription", I ) ) // END // library: string: get: array: table: column: name: variable <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstnva.s) [kn, ho, we, 06-08-2008 13:28:41] STRING PROC FNStringGetArrayTableColumnNameVariableS( INTEGER I ) // e.g. PROC Main() // e.g. Message( FNStringGetArrayTableColumnNameVariableS( 1 ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetArrayTableColumnCentralS( "NameVariable", I ) ) END // library: string: get: array: table: column: type <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcty.s) [kn, ho, we, 06-08-2008 13:28:45] STRING PROC FNStringGetArrayTableColumnTypeS( INTEGER I ) // e.g. PROC Main() // e.g. Message( FNStringGetArrayTableColumnTypeS( 1 ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetArrayTableColumnCentralS( "Type", I ) ) END // library: file: delete: completely: return: simple <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=delefics.s) [kn, ri, su, 01-08-2004 19:39:58] PROC PROCFileDeleteCompletelyReturnSimple( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "file: delete: ring: disk: completely: filename = ", "dxyzddd.ddd" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. PROCFileDeleteCompletelyReturnSimple( s1 ) // e.g. END // e.g. // e.g. <F12> Main() PushPosition() // // // do not change this with own procedure and function name (use e.g. to demonstrate to others TSE macros) // // Delete that file from disk // EraseDiskFile( s ) // // Remove that file also from the ring // EditFile( s ) Abandonfile() // PopPosition() END // library: database: table: connect <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=tabldatc.s) [kn, ri, mo, 01-09-2008 01:35:22] PROC PROCDatabaseTableConnect( STRING databaseHostNameS, STRING databaseNameS, STRING databaseUserNameS, STRING databasePasswordS, STRING databaseTableNameS, STRING databaseProductS ) // e.g. PROC Main() // e.g. PROCDatabaseTableConnect( "table2", "Oracle", "$databaselink", "oci_parse", "oci_execute", "oci_commit", "oci_error" ) // e.g. END // e.g. // e.g. <F12> Main() CASE databaseProductS // WHEN "Firebird", "Interbase" // AddLine( Format( "CONNECT", " ", "'", Format( databaseHostNameS, ":", databaseNameS ), "'", ";" ) ) // WHEN "MicrosoftSqlServer" // AddLine( Format( "USE", " ", databaseNameS, ";" ) ) // WHEN "MySql" // AddLine( Format( "USE", " ", databaseNameS, ";" ) ) // WHEN "Oracle" // AddLine( Format( "CONNECT", " ", databaseUserNameS, '/', databasePasswordS, '@', databaseNameS, " ", 'AS', " ", 'SYSDBA', ";" ) ) // WHEN "Sqlite" // // do nothing // OTHERWISE // Warn( Format( "database table connect SQL commands have still to be determined for database product", " ", databaseProductS ) ) // RETURN() // ENDCASE // END // library: database: remove: table: drop <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=remodatd.s) [kn, ri, su, 24-08-2008 02:43:11] PROC PROCDatabaseRemoveTableDrop( STRING databaseTableNameS, STRING databaseProductS, STRING databaseLinkGS, STRING fnDbQueryS, STRING fnDbExecuteS, STRING fnDbCommitS, STRING fnDbErrorS ) // e.g. PROC Main() // e.g. PROCDatabaseRemoveTableDrop( "table2", "Oracle", "$databaselink", "oci_parse", "oci_execute", "oci_commit", "oci_error" ) // e.g. END // e.g. // e.g. <F12> Main() CASE databaseProductS // WHEN "Firebird", "Interbase" // AddLine( Format( "DROP TABLE", " ", databaseTableNameS, ";" ) ) // WHEN "MicrosoftSqlServer" // AddLine( Format( "DROP TABLE", " ", databaseTableNameS, ";" ) ) // WHEN "MySql" // AddLine( Format( "DROP TABLE IF EXISTS", " ", databaseTableNameS, ";" ) ) // WHEN "Oracle" // AddLine( Format( "DROP TABLE", " ", databaseTableNameS, ";" ) ) // WHEN "Sqlite" // AddLine( Format( "DROP TABLE", " ", databaseTableNameS, ";" ) ) // OTHERWISE // Warn( Format( "database table drop SQL commands have still to be determined for database product", " ", databaseProductS ) ) // RETURN() // ENDCASE // END // library: database: create: table <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=creadacu.s) [kn, ri, su, 24-08-2008 02:43:33] PROC PROCDatabaseCreateTable( STRING databaseTableNameS, INTEGER columnMinI, INTEGER columnMaxI, STRING databaseProductS, STRING databaseLinkGS, STRING fnDbQueryS, STRING fnDbExecuteS, STRING fnDbCommitS, STRING fnDbErrorS ) // e.g. PROC Main() // e.g. PROCDatabaseCreateTable( "table2", 1, 6, "Oracle", "$databaselink", "oci_parse", "oci_execute", "oci_commit", "oci_error" ) // e.g. END // e.g. // e.g. <F12> Main() INTEGER I = 0 STRING separatorS[255] = "" // CASE databaseProductS // WHEN "Firebird", "Interbase" // AddLine( "CREATE TABLE" ) AddLine( " " ) AddLine( databaseTableNameS ) AddLine( "(" ) // FOR I = columnMinI TO columnMaxI // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // AddLine( Format( FNStringGetArrayTableColumnNameVariableS( I ), " ", FNStringGetArrayTableColumnTypeS( I ), separatorS ) ) // ENDFOR // AddLine( ")" ) AddLine( ";" ) AddLine( "" ) // Firebird or Interbase needs an empty line at the end of the commands. Put one extra to be sure CReturn() // Firebird or Interbase needs an empty line at the end of the commands CReturn() // Firebird or Interbase needs an empty line at the end of the commands. Put one extra to be sure // WHEN "MicrosoftSqlServer" // AddLine( "CREATE TABLE" ) AddLine( " " ) AddLine( databaseTableNameS ) AddLine( "(" ) // FOR I = columnMinI TO columnMaxI // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // AddLine( Format( FNStringGetArrayTableColumnNameVariableS( I ), " ", FNStringGetArrayTableColumnTypeS( I ), separatorS ) ) // ENDFOR // AddLine( ")" ) AddLine( ";" ) // WHEN "MySql" // AddLine( "CREATE TABLE" ) AddLine( " " ) AddLine( databaseTableNameS ) AddLine( "(" ) // FOR I = columnMinI TO columnMaxI // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // AddLine( Format( FNStringGetArrayTableColumnNameVariableS( I ), " ", FNStringGetArrayTableColumnTypeS( I ), separatorS ) ) // ENDFOR // AddLine( ")" ) AddLine( " TYPE = INNODB" ) AddLine( ";" ) // WHEN "Oracle" // AddLine( "CREATE TABLE" ) AddLine( databaseTableNameS ) AddLine( "(" ) // FOR I = columnMinI TO columnMaxI // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // AddLine( Format( FNStringGetArrayTableColumnNameVariableS( I ), " ", FNStringGetArrayTableColumnTypeS( I ), separatorS ) ) // ENDFOR // AddLine( ")" ) AddLine( ";" ) // AddLine( "" ) AddLine( "COMMIT;" ) // necessary in Oracle, otherwise the table might not be seen in the PHP program AddLine( "" ) AddLine( "quit;" ) // exit the Oracle database client // WHEN "Sqlite" // AddLine( "CREATE TABLE" ) AddLine( " " ) AddLine( databaseTableNameS ) AddLine( "(" ) // FOR I = columnMinI TO columnMaxI // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // AddLine( Format( FNStringGetArrayTableColumnNameVariableS( I ), " ", FNStringGetArrayTableColumnTypeS( I ), separatorS ) ) // ENDFOR // AddLine( ")" ) AddLine( ";" ) OTHERWISE // Warn( Format( "database table create SQL commands have still to be determined for database product", " ", databaseProductS ) ) // RETURN() // ENDCASE // END // library: program: run: process: stop: yes: no <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runpryno.s) [kn, ri, mo, 01-09-2008 03:22:49] PROC PROCProgramRunProcessStopYesNo( STRING s ) // e.g. PROC Main() // e.g. PROCProgramRunProcessStopYesNo( "iexplore" ) // e.g. END // e.g. // e.g. <F12> Main() // IF ( YesNo( Format( "do you want to stop process", " ", s, " ", "?" ) ) == 1 ) // PROCProgramRunProcessKill( s ) // Warn( Format( "stopped process", " ", s, " ", "<press any key to continue>" ) ) // ENDIF // END // library: program: run: parallel <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runprppa.s) [kn, ri, sa, 22-05-2004 00:22:05] PROC PROCProgramRunParallelParameter( STRING s, STRING parameterS ) // e.g. PROC Main() // e.g. PROCProgramRunParallelParameter( "iexplore", "http://www.faqts.com" ) // e.g. END // e.g. // e.g. <F12> Main() PROCProgramRun_ParallelParameterDirectoryNot( s, parameterS ) END // library: program: run: parallel <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runprrpa.s) [kn, ri, sa, 22-05-2004 00:13:32] PROC PROCProgramRunParallel( STRING s ) // e.g. PROC Main() // e.g. PROCProgramRunParallel( "mailto:test@test.com" ) // e.g. END // e.g. // e.g. <F12> Main() PROCProgramRunParallelParameterNotDirectoryNot( s ) END // library: browser: run: default: parameter <description></description> <version control></version control> <version>1.0.0.0.4</version> (filenamemacro=runbrdpa.s) [kn, ri, tu, 20-03-2001 19:10:11] PROC PROCBrowserRunDefaultParameter( STRING parameterS ) // e.g. PROC Main() // e.g. PROCBrowserRunDefaultParameter( "" ) // e.g. END // e.g. // e.g. <F12> Main() // // PROCBrowserRunMicrosoftExplorer( parameterS ) // [kn, ri, mo, 01-06-2009 14:31:52] // PROCMacroRunPurgeParameter( "runbrmpa", parameterS ) // run default browser macro with that parameter // END // library: database: create: connection: php <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=creadacp.s) [kn, ri, th, 07-08-2008 02:37:21] PROC PROCDatabaseCreateConnectionPhp(STRING hostNameS,STRING portS,STRING userS,STRING passwordS,STRING databaseNameS,STRING fileNameS,STRING fnDbConnectS,STRING fnDbErrorS,STRING fnDbSelectS,STRING fnDbCloseS,STRING fnDbExecuteS,STRING databaseProductS) // PROCFileDeleteCompletelyReturnSimple( fileNameS ) // EditFile( fileNameS ) // // Sqlite only opens a database file // IF ( databaseProductS == "Sqlite" ) AddLine( '<?php' ) AddLine( Format( databaseLinkGS, ' = ', fnDbConnectS, '( ', "'", databaseNameS, "'", ",", " ", '0666', ',', fnDbErrorS, ' );' ) ) AddLine( '//' ) AddLine( Format( 'if ( ', databaseLinkGS,' ) {' ) ) AddLine( ' print "<BR/>";' ) AddLine( ' print "<BR/>";' ) AddLine( ' print "Connected successfully to the database host computer";' ) AddLine( '}' ) AddLine( 'else {' ) AddLine( Format( ' die( "Could not connect to the database host computer:" . " " . ( ', fnDbErrorS, ' ) );' ) ) AddLine( '}' ) AddLine( '// -----------------------------------------------' ) AddLine( 'print "<BR/>";' ) AddLine( 'print "<BR/>";' ) AddLine( '// -----------------------------------------------' ) // AddLine( '?>' ) // SaveFile() // RETURN() // ENDIF // AddLine( '<?php' ) AddLine( '// Connect to your database' ) AddLine( '//' ) AddLine( '// -----------------------------------------------' ) AddLine( '// open database connection on the host computer' ) AddLine( '//' ) // AddLine( Format( "$databaseport", " ", "=", "'", portS, "'", ';' ) ) // AddLine( Format( "$databasehostname", " ", "=", "'", hostNameS, "'", ';' ) ) // AddLine( Format( "$databasename", " ", "=", "'", databaseNameS, "'", ';' ) ) // AddLine( Format( "$databaseusername", " ", "=", " ", "'", userS, "'", ';' ) ) // AddLine( Format( "$databasepassword", " ", "=", "'", passwordS, "'", ';' ) ) // AddLine( '//' ) // // CASE databaseProductS WHEN "Firebird", "Interbase" // // AddLine( "$databasehostname = 'localhost:c:/Program Files/Firebird/Firebird_2_1/bin/DATABASE1';" ) // AddLine( "$databasehostname = 'localhost:c:/Program Files/Firebird/Firebird_1_5/bin/DATABASE1';" ) // $databasehostname = 'localhost:c:/Program Files/Firebird/Firebird_2_1/bin/DATABASE1'; // $databasehostname = 'localhost:c:/Program Files/Firebird/Firebird_1_5/bin/DATABASE1'; // AddLine( Format( "$database", " ", "=", "'", Format( hostNameS, ":", databaseNameS ), "'", ';' ) ) // AddLine( Format( databaseLinkGS, ' ', '=', ' ', fnDbConnectS, '( $database, $databaseusername, $databasepassword )', ';' ) ) // WHEN "Oracle" // // $databaseusername = 'SYSTEM'; // $databasepassword ='<your password>'; // $database = '//machine:1521/orcl'; // $database = '//<your computer name>:<your port>/<your database name>'; // #REMOVE below // $database = '//DELLI8500:1521/orclknud'; // AddLine( Format( '$database', ' ', '=', "'", '//', hostNameS, ':', portS, '/', databaseNameS, "'", ';' ) ) // AddLine( Format( databaseLinkGS, ' ', '=', ' ', fnDbConnectS, '( $databaseusername, $databasepassword, $database )', ';' ) ) // WHEN "MicrosoftSqlServer", "MySql" // AddLine( Format( databaseLinkGS, ' ', '=', ' ', fnDbConnectS, '( $databasehostname, $databaseusername, $databasepassword )', ';' ) ) // OTHERWISE // Warn( Format( "this database", " ", databaseProductS, " ", "still has to be added" ) ) // RETURN() // ENDCASE // AddLine( '//' ) AddLine( Format( 'if ( ', databaseLinkGS,' ) {' ) ) AddLine( ' print "<BR/>";' ) AddLine( ' print "<BR/>";' ) AddLine( ' print "Connected successfully to the database host computer";' ) AddLine( '}' ) AddLine( 'else {' ) AddLine( Format( ' die( "Could not connect to the database host computer:" . " " . ', fnDbErrorS, '() );' ) ) AddLine( '}' ) // CASE databaseProductS WHEN "Oracle" // Oracle does not use the _connect to database at all, so this step can be skipped for Oracle WHEN "Firebird", "Interbase" // // Firebird or Interbase is already connected to the database while using ibase_connect(), because you have to supply the database name there. // So this step can be skipped for Firebird // OTHERWISE // AddLine( '// -----------------------------------------------' ) AddLine( 'print "<BR/>";' ) AddLine( 'print "<BR/>";' ) AddLine( '// -----------------------------------------------' ) // AddLine( '// connect to the specific database' ) // AddLine( Format( 'if ( ', fnDbSelectS, '( ', "'", databaseNameS, "'", ' ) ) {' ) ) AddLine( ' print "Connected successfully to the database";' ) AddLine( '}' ) AddLine( 'else {' ) AddLine( ' print "<BR/>";' ) AddLine( ' print "<BR/>";' ) AddLine( Format( ' print "Unable to locate the ', "'", databaseNameS, "'", ' database";' ) ) AddLine( Format( fnDbCloseS, '( ', databaseLinkGS, ' );' ) ) AddLine( ' exit();' ) AddLine( '}' ) ENDCASE // AddLine( '?>' ) // SaveFile() // END // library: program: goto: navigate: page: disable <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotoprpd.s) [kn, ri, mo, 01-09-2008 05:16:13] PROC PROCProgramGotoNavigatePageDisable() // e.g. PROC Main() // e.g. PROCProgramGotoNavigatePageDisable() // e.g. END // e.g. // e.g. <F12> Main() // AddLine( '?>' ) // PROCProgramGotoNavigatePage() // AddLine( '<?php' ) // END // library: database: remove: table: drop: sql: query <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=remodasq.s) [kn, ri, su, 24-08-2008 02:43:11] PROC PROCDatabaseRemoveTableDropSqlQuery( STRING databaseTableNameS, STRING databaseProductS, STRING databaseLinkGS, STRING fnDbQueryS, STRING fnDbExecuteS, STRING fnDbCommitS, STRING fnDbErrorS ) // e.g. PROC Main() // e.g. PROCDatabaseRemoveTableDrop( "table2", "Oracle", "$databaselink", "oci_parse", "oci_execute", "oci_commit", "oci_error" ) // e.g. END // e.g. // e.g. <F12> Main() CASE databaseProductS WHEN "Oracle", "Firebird", "MicrosoftSqlServer", "Interbase", "Sqlite" // AddLine( Format( " $s = 'DROP TABLE", ' ', databaseTableNameS, "'", ';' ) ) // WHEN "MySql" // AddLine( Format( " $s = 'DROP TABLE IF EXISTS", ' ', databaseTableNameS, "'", ';' ) ) // OTHERWISE // Warn( Format( "database table drop SQL commands have still to be determined for database product", " ", databaseProductS ) ) // RETURN() // ENDCASE // CASE databaseProductS // WHEN "Firebird", "Interbase", "MicrosoftSqlServer", "Oracle", "MySql", "Sqlite" // PROCDatabaseRunSqlQuery( databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // OTHERWISE // // do nothing // ENDCASE // END // library: database: create: table: sql: query <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=creadasq.s) [kn, ri, su, 24-08-2008 02:43:33] PROC PROCDatabaseCreateTableSqlQuery( STRING databaseTableNameS, INTEGER columnMinI, INTEGER columnMaxI, STRING databaseProductS, STRING databaseLinkGS, STRING fnDbQueryS, STRING fnDbExecuteS, STRING fnDbCommitS, STRING fnDbErrorS ) // e.g. PROC Main() // e.g. PROCDatabaseCreateTable( "table2", 1, 6, "Oracle", "$databaselink", "oci_parse", "oci_execute", "oci_commit", "oci_error" ) // e.g. END // e.g. // e.g. <F12> Main() INTEGER I = 0 STRING separatorS[255] = "" // CASE databaseProductS // WHEN "Firebird", "Interbase", "MicrosoftSqlServer", "Oracle", "MySql", "Sqlite" // AddLine( " $s = '';" ) // AddLine( Format( " $s = $s . ' ' . 'CREATE TABLE'", ';' ) ) AddLine( Format( " $s = $s . ' ' . ", "'", databaseTableNameS, "'", ';' ) ) // AddLine( " $s = $s . ' ' . '(';" ) // FOR I = columnMinI TO columnMaxI // IF ( I == columnMaxI ) separatorS = "" ELSE separatorS = "," ENDIF // AddLine( Format( " $s = $s . ' ' . ", "'", FNStringGetArrayTableColumnNameVariableS( I ), " ", FNStringGetArrayTableColumnTypeS( I ), separatorS, "'", ';' ) ) // ENDFOR // AddLine( " $s = $s . ' ' . ')';" ) // OTHERWISE // Warn( Format( "database table create SQL commands have still to be determined for database product", " ", databaseProductS ) ) // RETURN() // ENDCASE // CASE databaseProductS // WHEN "MySql" // AddLine( " $s = $s . ' ' . ' TYPE = INNODB';" ) // OTHERWISE // // do nothing // ENDCASE // CASE databaseProductS // WHEN "Firebird", "Interbase", "MicrosoftSqlServer", "Oracle", "MySql", "Sqlite" // PROCDatabaseRunSqlQuery( databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // OTHERWISE // // do nothing // ENDCASE // CASE databaseProductS // WHEN "Oracle" // AddLine( " $s = 'COMMIT';" ) // necessary in Oracle, otherwise the table might not be seen in the PHP program // PROCDatabaseRunSqlQuery( databaseProductS, databaseLinkGS, fnDbQueryS, fnDbExecuteS, fnDbCommitS, fnDbErrorS ) // OTHERWISE // // do nothing // ENDCASE // END // library: math: get: string: table: column: size (goal: extract the length of VARCHAR(), E.g. if VARCHAR(100), this gets a text size of 100) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getmacsi.s) [kn, ho, we, 06-08-2008 19:04:53] INTEGER PROC FNMathGetStringTableColumnSizeI( STRING s, INTEGER defaultI, INTEGER minI, INTEGER maxI ) // e.g. PROC Main() // e.g. Warn( FNMathGetStringTableColumnSizeI( "VARCHAR(100)", 50, 5, 150 ) ) // gives e.g. 100 // e.g. Warn( FNMathGetStringTableColumnSizeI( "VARCHAR(250)", 50, 2, 300 ) ) // gives e.g. 250 // e.g. Warn( FNMathGetStringTableColumnSizeI( "TEXT", 50, 1, 100 ) ) // gives e.g. 50 // e.g. END // e.g. // e.g. <F12> Main() INTEGER resultI = 0 INTEGER strFindFoundBeginI = 0 INTEGER strFindLengthI = 0 // // IF ( s == "TEXT" ) // RETURN( defaultI ) ENDIF // strFindFoundBeginI = StrFind( "[0-9]#", s, "x", 1, strFindLengthI ) // IF ( strFindFoundBeginI == 0 ) resultI = defaultI ELSE resultI = Val( SubStr( s, strFindFoundBeginI, strFindLengthI ) ) ENDIF // // do not let the length be too long, or it might go past screen width // IF ( resultI < minI ) resultI = minI ENDIF // IF ( resultI > maxI ) resultI = maxI ENDIF // RETURN( resultI ) END // library: database: run: sql: query <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=rundasqu.s) [kn, ri, su, 24-08-2008 01:46:40] PROC PROCDatabaseRunSqlQuery( STRING databaseProductS, STRING databaseLinkGS, STRING fnDbQueryS, STRING fnDbExecuteS, STRING fnDbCommitS, STRING fnDbErrorS ) // e.g. PROC Main() // e.g. PROCDatabaseRunSqlQuery( "Oracle", "$databaselink", "oci_parse", "oci_execute", "oci_commit", "oci_error" ) // e.g. END // e.g. // e.g. <F12> Main() // CASE databaseProductS WHEN "Oracle" AddLine( Format( ' $result = ', fnDbQueryS, '( ', databaseLinkGS, ', $s );' ) ) AddLine( Format( ' $execute = ', fnDbExecuteS, '( ', ' ', '$result', ' ', ')', ';' ) ) AddLine( Format( ' $commit = ', fnDbCommitS, '(', ' ', databaseLinkGS, ' ', ')', ';' ) ) WHEN "Sqlite" AddLine( Format( ' $result = ', fnDbQueryS, '( ', databaseLinkGS, ', $s )', ';' ) ) WHEN "Firebird", "Interbase", "MicrosoftSqlServer", "MySql" AddLine( Format( ' $result = ', fnDbQueryS, '( $s );' ) ) OTHERWISE Warn( Format( "please add this database", " ", databaseProductS ) ) ENDCASE // AddLine( ' //' ) AddLine( ' if ( $result ) {' ) AddLine( ' print "Could successfully run the SQL query" . " " . "<BR/>" . $s;' ) AddLine( ' }' ) AddLine( ' else {' ) // CASE databaseProductS WHEN "Sqlite" AddLine( Format( ' die( "Could not successfully run the SQL query" . " " . "<BR/>" . $s . " " . ":" . " " . "<BR/>" . ( ', fnDbErrorS, ' ) );' ) ) OTHERWISE AddLine( Format( ' die( "Could not successfully run the SQL query" . " " . "<BR/>" . $s . " " . ":" . " " . "<BR/>" . ', fnDbErrorS, '() );' ) ) ENDCASE // AddLine( ' }' ) AddLine( ' //' ) // CASE databaseProductS WHEN "Oracle" AddLine( ' //' ) AddLine( ' if ( $execute ) {' ) AddLine( ' print "Could successfully execute the SQL query" . " " . "<BR/>" . $s;' ) AddLine( ' }' ) AddLine( ' else {' ) AddLine( Format( ' die( "Could not successfully execute the SQL query" . " " . "<BR/>" . $s . " " . ":" . " " . "<BR/>" . ', fnDbErrorS, '() );' ) ) AddLine( ' }' ) AddLine( ' //' ) OTHERWISE ENDCASE // CASE databaseProductS WHEN "Oracle" AddLine( ' //' ) AddLine( ' if ( $commit ) {' ) AddLine( ' print "Could successfully commit the SQL query" . " " . "<BR/>" . $s;' ) AddLine( ' }' ) AddLine( ' else {' ) AddLine( Format( ' die( "Could not successfully commit the SQL query" . " " . "<BR/>" . $s . " " . ":" . " " . "<BR/>" . ', fnDbErrorS, '() );' ) ) AddLine( ' }' ) AddLine( ' //' ) OTHERWISE ENDCASE // END // library: database: get: sql: query: operation <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getdaqop.s) [kn, ri, mo, 01-09-2008 06:03:05] PROC PROCDatabaseGetSqlQueryOperation( INTEGER I ) // e.g. PROC Main() // e.g. PROCDatabaseGetSqlQueryOperation( 1 ) // e.g. END // e.g. // e.g. <F12> Main() // AddLine( Format( ' print ', "'", '<TD>http://localhost/ddd.php?operation=deleteSet&', FNStringGetArrayTableColumnNameVariableS( I ), '=', "'", ' . $row[ 0 ] . ', "'", '">Delete</TD>', "'", ';' ) ) AddLine( Format( ' print ', "'", '<TD>http://localhost/ddd.php?operation=updateSet&', FNStringGetArrayTableColumnNameVariableS( I ), '=', "'", ' . $row[ 0 ] . ', "'", '">Update</TD>', "'", ';' ) ) // END // library: program: run: parallel: directory <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runprdnp.s) [kn, ri, sa, 22-05-2004 00:23:39] PROC PROCProgramRun_ParallelParameterDirectoryNot( STRING s, STRING parameterS ) // e.g. PROC Main() // e.g. PROCProgramRun_ParallelParameterDirectoryNot( "iexplore", "http://www.faqts.com" ) // e.g. END // e.g. // e.g. <F12> Main() PROCProgramRunParallelParameterDirectory( s, parameterS, FNStringGetEmptyS() ) END // library: initialize: check: new: boolean: false <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checinbf.s) [kn, ri, su, 22-07-2001 15:58:06] INTEGER PROC FNMathCheckInitializeNewBooleanFalseB() // e.g. PROC Main() // e.g. Message( FNMathCheckInitializeNewBooleanFalseB() ) // gives e.g. FALSE // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNMathCheckGetLogicFalseB() ) END // library: math: check: logic: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmaln.s) [kn, ri, tu, 15-05-2001 16:54:21] INTEGER PROC FNMathCheckLogicNotB( INTEGER B ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "math: check: logic: not: number = ", "1" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. Message( FNMathCheckLogicNotB( FNStringGetToIntegerI( s ) ) ) // e.g. END // e.g. // e.g. <F12> Main() RETURN( NOT B ) END // library: string: empty: is given string empty? [kn, ri, sa, 20-05-2000 20:11:08] INTEGER PROC FNStringCheckEmptyB( STRING s ) RETURN( FNStringCheckEqualB( s, FNStringGetEmptyS() ) ) END // library: string: get: history: input <description>input a string and store it in that specific history list</description> <version>1.0.0.0.2</version> (filenamemacro=getsthin.s) [kn, ni, mo, 03-08-1998 13:04:18] STRING PROC FNStringGetHistoryInputS( STRING infoS, STRING answerDefaultS, INTEGER historyI ) // e.g. PROC Main() // e.g. Message( FNStringGetHistoryInputS( "Please input something", "test", _FIND_HISTORY_ ) ) // gives e.g. "test" // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = answerDefaultS // INTEGER escapeB = FNMathCheckInitializeNewBooleanFalseB() // escapeB = FNMathCheckLogicNotB( FNHistoryCheckAskCentralB( infoS, s, historyI ) ) // IF ( escapeB ) // RETURN( FNStringGetEscapeS() ) // ENDIF // <Escape> was pressed, in response // IF FNStringCheckEmptyB( s ) AND FNStringCheckEmptyNotB( answerDefaultS ) // RETURN( FNStringGetEmptyS() ) // input of an empty string, user has removed the string to indicate that an empty string was wanted // ENDIF // IF FNStringCheckEmptyB( s ) // RETURN( answerDefaultS ) // ENDIF // <Enter> was pressed, in response (variation: IF FNMathCheckLogicNotB( MathGetStringLengthI( s ) ) ...) // removed FN because it gave problems compiling [kn, ri, sa, 16-02-2008 21:53:49] // RETURN( s ) // response was entered // END // library: string: get: empty (return an empty string) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgem.s) [kn, ri, sa, 20-05-2000 20:11:03] STRING PROC FNStringGetEmptyS() // e.g. PROC Main() // e.g. Message( FNStringGetEmptyS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( "" ) END // library: string: get: array: table: column: central <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=central.s) [kn, ho, we, 06-08-2008 13:27:12] STRING PROC FNStringGetArrayTableColumnCentralS( STRING caseS, INTEGER I ) // STRING s[255] = "" // s = Format( "tableColumn", caseS, Str( I ), "S" ) // RETURN( GetGlobalStr( s ) ) // END // library: program: run: process: kill <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runprpsu.s) [kn, ri, tu, 26-08-2008 21:29:22] PROC PROCProgramRunProcessKill( STRING s ) // e.g. PROC Main() // e.g. PROCProgramRunProcessKill( "bbcwin.exe" ) // e.g. END // e.g. // e.g. <F12> Main() PROCProgramRunParallelParameter( "c:\windows\system32\taskkill.exe", Format( "/F /IM", " ", FNStringGetProcessNameS( s ) ) ) END // library: program: run: parallel: directory <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runprdno.s) [kn, ri, sa, 22-05-2004 00:08:36] PROC PROCProgramRunParallelParameterNotDirectoryNot( STRING s ) // e.g. PROC Main() // e.g. PROCProgramRunParallelParameterNotDirectoryNot( "mailto:test@test.com" ) // e.g. END // e.g. // e.g. <F12> Main() PROCProgramRunParallelParameterDirectory( s, FNStringGetEmptyS(), FNStringGetEmptyS() ) END // library: macro: run a macro, then purge it, pass parameter string [kn, ri, sa, 17-02-2001 02:22:27] PROC PROCMacroRunPurgeParameter( STRING macronameS, STRING commandlineparameterS ) // PROCMacroRunPurge( FNStringGetConsS( macronameS, commandlineparameterS ) ) // END // library: program: goto: navigate: page <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotoprnp.s) [kn, ri, mo, 01-09-2008 05:10:36] PROC PROCProgramGotoNavigatePage() // e.g. PROC Main() // e.g. PROCProgramGotoNavigatePage() // e.g. END // e.g. // e.g. <F12> Main() // AddLine( ' </BR>' ) // AddLine( ' <TABLE' ) AddLine( ' BORDER="1"' ) AddLine( ' >' ) AddLine( ' <TR> <TD> <<">http://localhost/ddd.php"><< Return to menu </TD> </TR>' ) AddLine( ' <TR> <TD> > Forward </TD> </TR>' ) AddLine( ' <TR> <TD> < Back </TD> </TR>' ) AddLine( ' </TABLE>' ) // AddLine( ' </BR>' ) // END // library: program: run: parallel: directory <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runprpdi.s) [kn, ri, fr, 21-05-2004 23:53:00] PROC PROCProgramRunParallelParameterDirectory( STRING s, STRING parameterS, STRING directoryS ) // e.g. PROC Main() // e.g. PROCProgramRunParallelParameterDirectory( "iexplore.exe", "http://www.faqts.com", "" ) // e.g. END // e.g. // e.g. <F12> Main() PROCProgramRunParallel_ParameterDirectoryWindow( s, parameterS, directoryS, _START_MAXIMIZED_ ) END // library: math: check: get: logic: false: wrapper <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalf.s) [kn, ri, su, 22-07-2001 15:43:08] INTEGER PROC FNMathCheckGetLogicFalseB() // e.g. PROC Main() // e.g. Message( FNMathCheckGetLogicFalseB() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FALSE ) END // library: history: check: ask: central <description>input: ask: find history</description> <version>1.0.0.0.1</version> (filenamemacro=chechiac.s) [kn, ri, sa, 25-08-2001 20:34:13] INTEGER PROC FNHistoryCheckAskCentralB( STRING askS, VAR STRING answerDefaultS, INTEGER historyI ) // e.g. PROC Main() // e.g. STRING s[255] = "test" // e.g. Message( FNHistoryCheckAskCentralB( "Please input something", s, _FIND_HISTORY_ ) ) // gives e.g. "test" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( Ask( askS, answerDefaultS, historyI ) ) // END // library: string: check: empty: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checstep.s) [kn, ri, su, 21-05-2006 22:32:11] INTEGER PROC FNStringCheckEmptyNotB( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringCheckEmptyNotB( FNStringGetEmptyS() ) ) // gives e.g. FALSE // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNMathCheckLogicNotB( FNStringCheckEmptyB( s ) ) ) END // library: string: get: process: name <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstpnb.s) [kn, ri, mo, 25-08-2008 22:07:10] STRING PROC FNStringGetProcessNameS( STRING inS ) // e.g. PROC Main() // e.g. Message( FNStringGetProcessNameS( "bbcwin.exe" ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = SplitPath( inS, _NAME_ ) STRING extensionS[255] = SplitPath( inS, _EXT_ ) // IF ( ( SplitPath( inS, _EXT_ ) == "" ) OR ( Lower( extensionS ) == Lower( ".exe" ) ) ) s = Format( s, ".exe" ) ENDIF // RETURN( s ) // END // library: macro: run a macro, then purge it (this text goes into the main macro file) [kn, zoe, tu, 27-10-1998 18:54:17] PROC PROCMacroRunPurge( STRING macronameS ) // e.g. PROC Main() // e.g. PROCMacroRunPurge( "mysubma1.mac myparameter11 myparameter12" ) // e.g. PROCMacroRunPurge( "mysubma2.mac myparameter21" ) // e.g. PROCMacroRunPurge( "mysubma3.mac myparameter31 myparameter32" ) // e.g. END IF FNStringCheckEmptyB( macronameS ) PROCError( "macro should not be empty" ) RETURN() ENDIF IF FNMacroCheckLoadB( FNStringGetCarS( macronameS ) ) // necessary if you pass parameters in a string PROCMacroExec( macronameS ) PROCMacroPurge( FNStringGetCarS( macronameS ) ) ENDIF // PROCFileInsertStringEndFilenameDefault( macronameS ) // if you want to count the frequency a certain macro has been called END // library: string: get: cons: string: concatenation: concatenation 2 words to 1 word (separated by a space) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcx.s) [kn, ri, we, 25-11-1998 20:15:03] STRING PROC FNStringGetConsS( STRING s1, STRING s2 ) // version with test if string empty // e.g. PROC Main() // e.g. Message( FNStringGetConsS( "knud", "van" ) ) // gives "knud van" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConcatSeparatorS( s1, s2, FNStringGetCharacterSymbolSpaceS() ) ) END // library: program: run: parallel: directory <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runprdwi.s) [kn, ri, fr, 21-05-2004 23:17:29] PROC PROCProgramRunParallel_ParameterDirectoryWindow( STRING s, STRING parameterS, STRING directoryS, INTEGER windowstateI ) // e.g. PROC Main() // e.g. PROCProgramRunParallel_ParameterDirectoryWindow( "iexplore.exe", "http://www.faqts.com", "", _START_MAXIMIZED_ ) // e.g. END // e.g. // e.g. <F12> Main() PROCWindowsShellExecute( 0, "", s, parameterS, directoryS, windowstateI ) END // library: error: central routine [kn, ni, mo, 03-08-1998 13:08:12] // INTEGER ErrorGB = FNMathCheckGetLogicFalseB() PROC PROCError( STRING s ) // e.g. <F12> PROCError( "this is an error" ) PROCTextSavePositionStackPush() // Alarm() // PROCWarn( s ) // Message( s ) // Message( "Linenr ", FNMathGetProgramLineNumberAbsoluteCurrentI(), ": ", s ) PROCWarnCons4( "Error: Linenr", FNStringGetLineNumberCurrentS(), ":", s ) // only when seriously: PROCFileInsertTextEnd( "line " + STR( FNMathGetProgramLineNumberAbsoluteCurrentI() ) + ": " + s, FNStringGetFilenameGlobalErrorS(), FNMathCheckGetLogicTrueB() ) PROCFileInsertTextEnd( "line " + STR( FNMathGetProgramLineNumberAbsoluteCurrentI() ) + ": " + s, FNStringGetFilenameGlobalErrorS(), FNMathCheckGetLogicTrueB() ) // errorGB = FNMathCheckGetLogicTrueB() PROCTextRemovePositionStackPop() END // library: macro: load: (Loads a Macro File From Disk Into Memory) R LoadMacro(STRING macro_filename)* [kn, zoe, we, 16-06-1999 01:07:06] INTEGER PROC FNMacroCheckLoadB( STRING macronameS ) RETURN( LoadMacro( macronameS ) ) END // library: string: get: word: token: get: first: FNStringGetCarS(): Get the first word of a string (words delimited by a space " " (=space delimited list)). <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgca.s) [kn, ni, su, 02-08-1998 15:54:17] STRING PROC FNStringGetCarS( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: get: word: token: get: first: s = ", "this is a test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNStringGetCarS( s1 ) ) // gives e.g. "this" // e.g. END // e.g. // e.g. <F12> Main() // // variation: RETURN( FNStringGetTokenFirstS( s, " " ) ) RETURN( GetToken( s, " ", 1 ) ) // faster, but not central END // library: macro: (Executes the Requested Macro) O ExecMacro([STRING macroname])* [kn, zoe, we, 16-06-1999 01:06:54] PROC PROCMacroExec( STRING macronameS ) // e.g. <F12> PROCMacroExec( "video" ) IF FNMathCheckLogicNotB( FNMacroCheckExecB( macronameS ) ) PROCWarnCons3( "macro", macronameS, ": could not be executed" ) ENDIF END // library: macro: (Purges a Macro File From Memory) R PurgeMacro(STRING s)* [kn, zoe, fr, 13-10-2000 19:09:32] PROC PROCMacroPurge( STRING macronameS ) // e.g. <F12> PROCMacroPurge( macronameS ) IF FNMathCheckLogicNotB( FNMacroCheckPurgeB( macronameS ) ) PROCWarnCons3( "macro", macronameS, ": could not be found" ) ENDIF END // library: string: get: concat: separator: string: concatenation: concatenate 2 words to 1 word, separated by separator <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcsg.s) [kn, zoe, th, 01-07-1999 01:33:18] STRING PROC FNStringGetConcatSeparatorS( STRING s1, STRING s2, STRING separatorS ) // e.g. PROC Main() // e.g. Message( FNStringGetConcatSeparatorS( "test1", "test2", " " ) ) // gives e.g. "tes1 test2" // e.g. END // e.g. // e.g. <F12> Main() IF FNStringCheckEmptyB( s1 ) RETURN( s2 ) ENDIF IF FNStringCheckEmptyB( s2 ) RETURN( s1 ) ENDIF RETURN( s1 + separatorS + s2 ) // leave this like this. Do not call a function, as this is a primitive function, you will get into a recursive loop, and get stack overflow END // library: string: get: character: symbol: " " <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstssp.s) [kn, zoe, we, 25-10-2000 01:33:39] STRING PROC FNStringGetCharacterSymbolSpaceS() // e.g. PROC Main() // e.g. Message( FNStringGetCharacterSymbolSpaceS() ) // gives " " // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterSymbolCentralS( 32 ) ) END // library: program: run: parallel: windows: find <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=shelwise.s) [kn, ri, fr, 21-05-2004 23:19:18] #IF EDITOR_VERSION >= 0x4200 PROC PROCWindowsShellExecute( INTEGER handleI, STRING actionS, STRING filenameS, STRING parameterS, STRING directoryS, INTEGER windowshowI ) // e.g. PROC Main() // e.g. PROCWindowsShellExecute( 0, "", "iexplore.exe", "http://www.faqts.com", "", _START_MAXIMIZED_ ) // e.g. END // e.g. // e.g. <F12> Main() // e.g. #define SW_HIDE 0 // e.g. #define SW_SHOWNORMAL 1 // e.g. #define SW_NORMAL 1 // e.g. #define SW_SHOWMINIMIZED 2 // e.g. #define SW_SHOWMAXIMIZED 3 // e.g. #define SW_MAXIMIZE 3 // e.g. #define SW_SHOWNOACTIVATE 4 // e.g. #define SW_SHOW 5 // e.g. #define SW_MINIMIZE 6 // e.g. #define SW_SHOWMINNOACTIVE 7 // e.g. #define SW_SHOWNA 8 // e.g. #define SW_RESTORE 9 // e.g. #define SW_SHOWDEFAULT 10 // e.g. #define SW_MAX 10 // e.g. // // e.g. DLL "<shell32.dll>" // e.g. integer proc ShellExecute( // e.g. INTEGER h, // handle to parent window // e.g. STRING op:cstrval, // specifies operation to perform // e.g. STRING file:cstrval,// filename string // e.g. STRING parm:cstrval,// specifies executable-file parameters // e.g. STRING dir:cstrval, // specifies default directory // e.g. INTEGER show) // whether file is shown when opened // e.g. :"ShellExecuteA" // e.g. END // // // flags can be: _START_HIDDEN_, _START_MINIMIZED_, // _START_MAXIMIZED_. If no flags, starts normally. // INTEGER resultI = FNMathGetInitializeNewI() resultI = StartPgm( filenameS, parameterS, directoryS, windowshowI ) PROCWindowsShellExecuteError( resultI, 'PROCWindowsShellExecute()', filenameS ) END #ELSE PROC PROCWindowsShellExecute( INTEGER handleI, STRING actionS, STRING filenameS, STRING parameterS, STRING directoryS, INTEGER windowshowI ) ShellExecute( 0, "open", filenameS, parameterS, directoryS, windowshowI ) END #ENDIF // library: text: save: position: stack: push: store [kn, zoe, fr, 04-06-1999 23:01:00] PROC PROCTextSavePositionStackPush() // e.g. <F12> PROCTextSavePositionStackPush() PushPosition() // returns nothing // pushpopGT = pushpopGT + 1 // for checking purposes on the end of your routines. This must give 0 (as there as as many +1 as -1 in the OK case) END // library: error: warning: give a warning message via 4 strings [kn, ri, su, 29-07-2001 18:28:22] PROC PROCWarnCons4( STRING s1, STRING s2, STRING s3, STRING s4 ) PROCWarn( FNStringGetCons4S( s1, s2, s3, s4 ) ) END // library: string: get: line: number: current (return the current linenumber) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstncm.s) [kn, ni, mo, 02-08-1999 00:46:42] STRING PROC FNStringGetLineNumberCurrentS() // e.g. PROC Main() // e.g. Message( FNStringGetLineNumberCurrentS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetMathIntegerToStringS( FNMathGetProgramLineNumberAbsoluteCurrentI() ) ) END // library: file: line: text: insert: end: goto the end of the given file, insert some text (when newlineB is TRUE, start every inserted line on a new line) [kn, ni, mo, 03-08-1998 13:08:29] PROC PROCFileInsertTextEnd( STRING s, STRING filenameS, INTEGER newlineB ) // e.g. <F12> PROCFileInsertTextEnd( "this is put on the end of the file", "myoutputfile", FNMathCheckGetLogicTrueB() ) PROCTextSavePositionStackPush() IF FNMathCheckLogicNotB( FNFileCheckEditMessageB( filenameS ) ) PROCTextRemovePositionStackPop() RETURN() ENDIF PROCFileGotoEnd() IF ( newlineB ) PROCFileInsertEndPrepare() ENDIF PROCTextInsert( s ) PROCTextRemovePositionStackPop() END // library: math: get: program: line: number: absolute: current <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getfincu.s) [kn, ni, mo, 02-08-1999 00:46:42] INTEGER PROC FNMathGetProgramLineNumberAbsoluteCurrentI() // e.g. PROC Main() // e.g. Message( FNMathGetProgramLineNumberAbsoluteCurrentI() ) // gives e.g. 332 if the cursor is on line 332 in the current file // e.g. END // e.g. // e.g. <F12> Main() | // | // ... // +--------------------------------------------------+| // | || // | || // | || // | || // | |V // |cursor is here on this line |--- <-- CurrLine() // | | // | | // |[end of file]-------------------------------------| // | | // | | // | | // | | // | | // | | // | | // | | // | | // | | // | | // +--------------------------------------------------+ // RETURN( CurrLine() ) // END // library: file: do: return name of current do file [kn, zoe, fr, 20-10-2000 23:34:48] STRING PROC FNStringGetFilenameGlobalErrorS() RETURN( FNStringGetGlobalS( "filenameerrorGS" ) ) END // library: math: check: get: logic: true: wrapper <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalt.s) [kn, ri, su, 22-07-2001 15:43:12] INTEGER PROC FNMathCheckGetLogicTrueB() // e.g. PROC Main() // e.g. Message( FNMathCheckGetLogicTrueB() ) // gives TRUE // e.g. END // e.g. // e.g. <F12> Main() RETURN( TRUE ) END // library: text: remove: position: stack: pop: restore [kn, zoe, fr, 04-06-1999 23:01:00] PROC PROCTextRemovePositionStackPop() // e.g. <F12> PROCTextRemovePositionStackPop() PopPosition() // returns nothing // pushpopGT = pushpopGT - 1 // for checking purposes on the end of your routines. This must give 0 (as there as as many +1 as -1 in the OK case) END // library: macro: (Executes the Requested Macro) O ExecMacro([STRING macroname])* [kn, zoe, we, 16-06-1999 01:06:54] INTEGER PROC FNMacroCheckExecB( STRING macronameS ) RETURN( ExecMacro( macronameS ) ) END // library: error: warning: give a warning message via 3 strings [kn, ri, su, 29-07-2001 18:24:52] PROC PROCWarnCons3( STRING s1, STRING s2, STRING s3 ) PROCWarn( FNStringGetCons3S( s1, s2, s3 ) ) END // library: macro: purge [kn, zoe, fr, 13-10-2000 19:03:50] INTEGER PROC FNMacroCheckPurgeB( STRING macronameS ) RETURN( PurgeMacro( macronameS ) ) END // library: string: get: character: symbol: central [kn, ri, sa, 07-07-2001 22:35:39] STRING PROC FNStringGetCharacterSymbolCentralS( INTEGER I ) RETURN( FNStringGetAsciiToCharacterS( I ) ) END // library: math: get: initialize: new <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getmaine.s) [kn, noot, mo, 09-07-2001 11:59:54] INTEGER PROC FNMathGetInitializeNewI() // e.g. PROC Main() // e.g. Message( FNMathGetInitializeNewI() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNMathGetIntegerZeroI() ) END // library: program: run: parallel: windows: find <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=shelwiee.s) [kn, ri, fr, 21-05-2004 23:21:38] PROC PROCWindowsShellExecuteError( INTEGER resultI, STRING s, STRING filenameS ) // e.g. PROC Main() // e.g. PROCWindowsShellExecuteError( 0, "test", "ddd.ddd" ) // e.g. END // e.g. // e.g. <F12> Main() INTEGER caseI = FNMathGetInitializeNewI() RETURN() CASE caseI WHEN 0 PROCErrorCons3( s, filenameS, ': The operating system is out of memory or resources.' ) WHEN 2 PROCErrorCons3( s, filenameS, ': The specified file was not found.' ) WHEN 3 PROCErrorCons3( s, filenameS, ': The specified path was not found.' ) WHEN 5 PROCErrorCons3( s, filenameS, ': The operating system denied access to the specified file.' ) WHEN 8 PROCErrorCons3( s, filenameS, ': There was not enough memory to complete the operation.' ) WHEN 11 PROCErrorCons3( s, filenameS, ': The .exe file is invalid (non-Win32r .exe or error in .exe image).' ) WHEN 26 PROCErrorCons3( s, filenameS, ': A sharing violation occurred.' ) WHEN 27 PROCErrorCons3( s, filenameS, ': The file name association is incomplete or invalid.' ) WHEN 28 PROCErrorCons3( s, filenameS, ': The DDE transaction could not be completed because the request timed out.' ) WHEN 29 PROCErrorCons3( s, filenameS, ': The DDE transaction failed.' ) WHEN 30 PROCErrorCons3( s, filenameS, ': The DDE transaction could not be completed because other DDE transactions were being processed.' ) WHEN 31 PROCErrorCons3( s, filenameS, ': There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable.' ) WHEN 32 PROCErrorCons3( s, filenameS, ': The specified dynamic-link library was not found.' ) OTHERWISE PROCErrorCons4( s, 'error number =', FNStringGetMathIntegerToStringS( resultI ), 'an error has occurred' ) RETURN() ENDCASE END // library: error: warning: give a warning message [kn, zoe, we, 09-06-1999 22:11:07] PROC PROCWarn( STRING s ) // e.g. <F12> PROCWarn( "you have forgotten to input a value" ) Warn( s ) END // library: string: get: cons4: string: concatenation: 4 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcz.s) [kn, zoe, fr, 17-11-2000 13:54:56] STRING PROC FNStringGetCons4S( STRING s1, STRING s2, STRING s3, STRING s4 ) // e.g. PROC Main() // e.g. Message( FNStringGetCons4S( "a", "b", "c", "d" ) ) // gives e.g. "a b c d" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConsS( FNStringGetCons3S( s1, s2, s3 ), s4 ) ) END // library: string: get: math: get: integer: to: convert an integer to a string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getsttsu.s) [kn, ni, mo, 03-08-1998 00:34:05] / [number to string] STRING PROC FNStringGetMathIntegerToStringS( INTEGER i ) // e.g. PROC Main() // e.g. Message( FNStringGetMathIntegerToStringS( 3 ) ) // gives e.g. "3" // e.g. END // e.g. // e.g. <F12> Main() RETURN( Str( i ) ) END // library: file: edit: edit a file, with test of problems <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checficf.s) [kn, ni, mo, 03-08-1998 13:08:39] INTEGER PROC FNFileCheckEditMessageB( STRING filenameS ) // e.g. PROC Main() // e.g. Message( FNFileCheckEditMessageB( "" ) ) // gives e.g. TRUE when file loaded without problems // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNFileCheckEditCentralMessageB( filenameS, FNMathCheckGetLogicTrueB() ) ) END // library: file: movement: end: goto end of file: moves to the end of the last line of current file <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotofien.s) [kn, ri, su, 28-03-1999 01:08:06] PROC PROCFileGotoEnd() // e.g. PROC Main() // e.g. PROCFileGotoEnd() // e.g. END // e.g. // e.g. <F12> Main() IF FNMathCheckLogicNotB( FNFileCheckGotoEndB() ) // PROCWarn( "cursor was already in end file else error: could no go to end of file" ) ENDIF END // library: file: insert: prepare for the insertion (e.g. of text, of a new file, ...) [kn, zoe, th, 25-01-2001 18:03:46] PROC PROCFileInsertEndPrepare() PROCFileGotoEnd() PROCLineInsertAfter() PROCTextGotoLineBegin() END // library: text: insert: insert text <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=insetein.s) [kn, ni, mo, 10-08-1998 06:26:51] PROC PROCTextInsert( STRING s ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "which text to insert at current position = ", FNStringGetEmptyS() ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. PROCTextInsert( s ) // e.g. END // e.g. // e.g. <F12> Main() IF FNStringCheckEmptyB( s ) // PROCerror( FNStringGetFilenameCurrentS() + ": Attempt made to insert an empty string" ) RETURN() ENDIF IF FNMathCheckLogicNotB( FNTextCheckInsertB( s ) ) PROCerror( FNStringGetCons4S( FNStringGetFilenameCurrentS(), ": Text '", s, "' could not be inserted" ) ) ENDIF END // library: string: global: get: get a global string [kn, zoe, mo, 14-06-1999 20:54:18] STRING PROC FNStringGetGlobalS( STRING stringglobalnameS ) // e.g. <F12> PROCMessage( FNStringGetGlobalS( "dirGS" ) ) // e.g. gives "c:\" // e.g. <F12> PROCMessage( FNStringGetGlobalS( "dir1GS" ) ) // indicates first that this string does not exist, and returns the result '<VARIABLE NOT KNOWN>'. STRING s[255] = FNStringGetInitializeNewStringS() IF FNMathCheckLogicNotB( ExistGlobalVar( stringglobalnameS ) ) PROCWarnCons5( "file", FNStringGetFilenameCurrentS(), ":", stringglobalnameS, ": this string is not known to this macro (suggestion: execute 'initglobal.mac' (or 'i.m') for this macro)" ) RETURN( FNStringGetErrorS() ) ENDIF s = GetGlobalStr( stringglobalnameS ) RETURN( s ) END // library: string: get: cons3: string: concatenation: 3 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcy.s) [kn, zoe, fr, 17-11-2000 13:52:07] STRING PROC FNStringGetCons3S( STRING s1, STRING s2, STRING s3 ) // e.g. PROC Main() // e.g. Message( FNStringGetCons3S( "a", "b", "c" ) ) // gives e.g. "a b c" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConsS( FNStringGetConsS( s1, s2 ), s3 ) ) END // library: string: get: ascii: to: character (given the ASCII value, what is the corresponding character? (Get Single Character Equivalent of an Integer). Syntax: Chr(INTEGER i)*) <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getsttch.s) [kn, zoe, we, 16-06-1999 01:06:51] STRING PROC FNStringGetAsciiToCharacterS( INTEGER asciiI ) // e.g. PROC Main() // e.g. Warn( FNStringGetAsciiToCharacterS( 65 ) ) // gives "A" // e.g. Warn( FNStringGetAsciiToCharacterS( 66 ) ) // gives "B" // e.g. Warn( FNStringGetAsciiToCharacterS( 100 ) ) // gives "d" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( Chr( asciiI ) ) // leave this keyword, otherwise possibly recursive stack overflow // END // library: math: get: integer: zero <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getmaize.s) [kn, ri, we, 06-02-2002 21:12:47] INTEGER PROC FNMathGetIntegerZeroI() // e.g. PROC Main() // e.g. Message( FNMathGetIntegerZeroI() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( 0 ) END // library: error: pass 3 strings [kn, ri, su, 21-04-2002 11:13:23] PROC PROCErrorCons3( STRING s1, STRING s2, STRING s3 ) PROCError( FNStringGetCons3S( s1, s2, s3 ) ) END // library: error: pass 4 strings [kn, ni, tu, 10-12-2002 16:27:55] PROC PROCErrorCons4( STRING s1, STRING s2, STRING s3, STRING s4 ) PROCError( FNStringGetCons4S( s1, s2, s3, s4 ) ) END // library: file: check: edit: message <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=central.s) [kn, ho, mo, 17-04-2006 17:41:21] INTEGER PROC FNFileCheckEditCentralMessageB( STRING filenameS, INTEGER messageB ) // e.g. PROC Main() // e.g. Message( FNFileCheckEditCentralMessageB( "test.dok", FNMathCheckGetLogicFalseB() ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() INTEGER editfileB = FNMathCheckGetLogicFalseB() // STRING s[255] = "" // if FNStringCheckEmptyB( filenameS ) // editfileB = EditFile() // ELSE // editfileB = EditFile( filenameS ) // ENDIF // IF FNMathCheckLogicNotB( editfileB ) // IF messageB // PROCErrorFileNotFound( filenameS ) // ENDIF // ENDIF // s = CurrFileName() PROCMacroRunPurgeParameter( "runprmcn", Format( FNStringGetMachineNameS(), ";", FNStringGetUserNameFirstS(), ";", FNStringGetUserNameLastS(), ";", FNStringGetPortS(), ";", "TSE%3A+File%3A+Load%3A+" + s + "&submit01=Create" ) ) // RETURN( editfileB ) // END // library: file: movement: end: goto end of file: moves to the end of the last line of current file [kn, ri, su, 28-03-1999 01:08:06] INTEGER PROC FNFileCheckGotoEndB() // e.g. <F12> PROCMessage( FNFileCheckGotoEndB() ) RETURN( EndFile() ) END // library: line: insert: inserts 1 line after current line. The cursor is placed on the newly created line. The cursor column does not change <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=inseliaf.s) [kn, ni, mo, 03-08-1998 13:35:30] PROC PROCLineInsertAfter() // e.g. PROC Main() // e.g. PROCLineInsertAfter() // e.g. END // e.g. // e.g. <F12> Main() PROCLineInsertAfterLineGotoBeginTextInsert( FNStringGetEmptyS() ) END // library: text: goto: line: begin // goto begin of line (=column 1 of the current line). If the cursor is already at the beginning of the current line, zero is returned. See also: EndLine() <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotolibe.s) [kn, zoe, th, 17-06-1999 00:12:52] PROC PROCTextGotoLineBegin() // library: line: movement: begin: // e.g. PROC Main() // e.g. PROCTextGotoLineBegin() // e.g. END // e.g. // e.g. <F12> Main() IF FNMathCheckLogicNotB( FNLineCheckGotoBeginB() ) // PROCWarn( "Could not go to the beginning of the current line" ) ENDIF END // library: text: insert: insert text [kn, zoe, tu, 23-11-1999 20:30:45] INTEGER PROC FNTextCheckInsertB( STRING s ) RETURN( FNTextCheckInsertCentralB( s, _INSERT_ ) ) END // library: file: filename: get: current: return current filename (as a string containing the complete path) (Get Full Name of Current Buffer) (nofilenamemacro) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstfcv.s) [kn, ni, sa, 08-08-1998 00:02:37] [FNfilenamecurrent] STRING PROC FNStringGetFilenameCurrentS() // e.g. PROC Main() // e.g. Message( FNStringGetFilenameCurrentS() ) // gives e.g. "c:\wordproc\tse\ddd.ddd" // e.g. END // e.g. // e.g. <F12> Main() RETURN( CurrFilename() ) END // library: string: initialize [kn, ri, mo, 09-07-2001 12:00:07] STRING PROC FNStringGetInitializeNewStringS() RETURN( FNStringGetEmptyS() ) END // library: error: warning: give a warning message via 5 strings [kn, ri, su, 29-07-2001 18:57:23] PROC PROCWarnCons5( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) PROCWarn( FNStringGetCons5S( s1, s2, s3, s4, s5 ) ) END // library: string: get: error <description>general output string to recognize an error (e.g. in another routine). Central routine, only one occurrence of this constant string</description> <version>1.0.0.0.1</version> <version control></version control> (filenamemacro=getstger.s) [kn, ri, sa, 05-12-1998 20:58:17] STRING PROC FNStringGetErrorS() // e.g. PROC Main() // e.g. Message( FNStringGetErrorS() ) // gives e.g. "<ERROR>" // e.g. END // RETURN( "<ERROR>" ) // END // library: error: file: not: found <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=fileernf.s) [kn, ri, we, 28-02-2001 23:02:12] PROC PROCErrorFileNotFound( STRING filenameS ) // e.g. PROC Main() // e.g. PROCErrorFileNotFound( "xsefadafadfasdf.sdfa" ) // e.g. END // e.g. // e.g. <F12> Main() STRING s[255] = FNStringGetInitializeNewStringS() IF FNErrorCheckEscapeB( filenameS ) s = FNStringGetConsS( FNStringGetEscapeS(), "has been pressed" ) ELSE s = FNStringGetCons3S( "file: ", filenameS, "not found / path does not exist" ) ENDIF PROCError( s ) END // library: string: get: machine: name <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstmnc.s) [kn, ri, we, 16-06-2010 22:41:10] STRING PROC FNStringGetMachineNameS() // e.g. PROC Main() // e.g. Message( FNStringGetMachineNameS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetMachineNameS" ) ) // END // library: string: get: user: name: first <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstnfi.s) [kn, ri, we, 16-06-2010 22:40:16] STRING PROC FNStringGetUserNameFirstS() // e.g. PROC Main() // e.g. Message( FNStringGetUserNameFirstS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetUserNameFirstS" ) ) // END // library: string: get: user: name: last <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstnla.s) [kn, ri, we, 16-06-2010 22:40:40] STRING PROC FNStringGetUserNameLastS() // e.g. PROC Main() // e.g. Message( FNStringGetUserNameLastS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetUserNameLastS" ) ) // END // library: string: get: port: name <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstpnc.s) [kn, ri, sa, 24-07-2010 21:52:33] STRING PROC FNStringGetPortS() // e.g. PROC Main() // e.g. Message( FNStringGetPortS() ) // gives e.g. "80" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetPortS" ) ) // END // library: line insert after: insert text at first column (text: insert: after each other) [kn, zoe, we, 28-02-2001 20:24:53] PROC PROCLineInsertAfterLineGotoBeginTextInsert( STRING s ) // variation: PROCLineInsertAfter() PROCLineGotoBeginTextInsert( s ) IF FNMathCheckLogicNotB( FNLineCheckInsertAfterLineGotoBeginTextInsertB( s ) ) // PROCWarn( "line could not be inserted" ) ENDIF END // library: line: check: goto: begin <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checligb.s) [kn, ni, mo, 03-08-1998 13:36:31] INTEGER PROC FNLineCheckGotoBeginB() // version not central // e.g. PROC Main() // e.g. Message( "Goto the beginning of the line = ", FNLineCheckGotoBeginB() ) // e.g. END // e.g. // e.g. <F12> Main() RETURN( BegLine() ) END // library: text: insert: insert text: central [kn, ri, fr, 16-02-2001 22:00:44] INTEGER PROC FNTextCheckInsertCentralB( STRING s, INTEGER optionB ) RETURN( InsertText( s, optionB ) ) END // library: string: get: cons5: string: concatenation: 5 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcb.s) [kn, zoe, fr, 17-11-2000 13:55:03] STRING PROC FNStringGetCons5S( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) // e.g. PROC Main() // e.g. Message( FNStringGetCons5S( "a", "b", "c", "d", "e" ) ) // gives e.g. "a b c d e" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConsS( FNStringGetCons4S( s1, s2, s3, s4 ), s5 ) ) END // library: escape or error [kn, zoe, th, 09-11-2000 23:18:32] INTEGER PROC FNErrorCheckEscapeB( STRING s ) IF FNErrorCheckSB( s ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF IF FNKeyCheckPressEscapeB( s ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF RETURN( FNMathCheckGetLogicFalseB() ) END // library: file: get: ini: default: central <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfiidf.s) [kn, ri, we, 31-12-2003 02:17:48] STRING PROC FNStringGetFileIniDefaultS( STRING searchS ) // e.g. PROC Main() // e.g. Message( FNStringGetFileIniDefaultS( "path4dos" ) ) // gives e.g. "c:\4dos" // e.g. END // e.g. // e.g. <F12> Main() // e.g. // USAGE // // 1. -Choose a filename for your global variables initialization file // // 1. -E.g. default name is here // // dddpath.ini // // 2. -You can set this name in a function in this library, if you // want to change the default name // // 3. -Save this file in the directory // (path chosen to be given by Microsoft Windows environment variable APPDATA) // // C:\Documents and Settings\<your Microsoft Windows login name>\Application Data\ // // 4. -The full path to your initialization file is thus e.g. // // C:\Documents and Settings\Administrator\Application Data\dddpath.ini // // 5. -To keep things as simple as possible, you need to put once // in top of your file the word (which must start at the beginning // of the line). Further no more '[' characters starting at the begin of any line. // // [default] // // 6. -This file contains 0 or more lines of the general format // // <variable name> = <variable value> // // 1. -E.g. // // [default] // // path4dos = c:\4dos // tsevariable1 = test1 // tsevariable2 = test2 // tsevariable3 = test3 // ... // // 2. -Note: you should/could put spaces before and after the '=' sign // (e.g. for backwards compatibility purposes) // // 7. -Using this library, you can then e.g. get the value of your global variable from this file RETURN( FNStringGetFileGetFilenamePathDefaultS( searchS ) ) END // library: line insert after: insert text at first column <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=inseliti.s) [kn, zoe, we, 28-02-2001 20:24:53] INTEGER PROC FNLineCheckInsertAfterLineGotoBeginTextInsertB( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "line insert after: insert text at first column: s = ", "test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNLineCheckInsertAfterLineGotoBeginTextInsertB( s1 ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( AddLine( s ) ) RETURN( FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( s, FNBufferGetBufferIdFileCurrentI() ) ) END // library: error: test if an error occurred, via testing the output // version with testing local variable. Better. [kn, ni, we, 05-08-1998 20:27:34] INTEGER PROC FNErrorCheckSB( STRING s ) // e.g. <F12> PROCMessage( FNErrorCheckSB( "this is an error" ) // version with testing local variable. Better. ) // gives ... RETURN( FNStringCheckEqualB( s, FNStringGetErrorS() ) ) END // library: file: get: filename: path: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfipde.s) [kn, ri, we, 31-12-2003 02:14:28] STRING PROC FNStringGetFileGetFilenamePathDefaultS( STRING searchS ) // e.g. PROC Main() // e.g. Message( FNStringGetFileGetFilenamePathDefaultS( "path4dos" ) ) // gives e.g. "c:\4dos" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileGetFilenamePathS( searchS, FNStringGetFilenameIniDefaultS() ) ) // [kn, ri, mo, 22-05-2006 23:59:52] RETURN( FNStringGetInitializationGlobalS( searchS, FNStringGetSectionSeparatorS(), FNStringGetFilenameIniDefaultS() ) ) END // library: file: check: insert: line: after: line: goto: begin: text: insert: line insert after: insert text at first column (Add Line After Current Line). Syntax: AddLine( [STRING text [, INTEGER bufferid ] ] ). If the optional bufferid is specified, the line is added after the current line in the specified buffer. _ON_CHANGING_FILES_ hooks are not invoked by this command <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checfiti.s) [kn, zoe, we, 28-02-2001 20:24:53] INTEGER PROC FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( STRING s, INTEGER bufferid ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "line insert after: insert text at first column: s = ", "test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "line insert after: insert text at first column: bufferID = ", FNStringGetMathIntegerToStringS( FNBufferGetBufferIdFileCurrentI() ) ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( s1, FNStringGetToIntegerI( s2 ) ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( AddLine( s, bufferid ) ) // s is the string that will be inserted at column 1 of the newly created line. BufferidI is the optional id of the file where the line is to be added. If not passed, the line is added to the current file. END // library: buffer: get: id: current ((Returns the Unique Id of Requested or Current Buffer) O GetBufferId([STRING name])*) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getbuicu.s) [kn, zoe, th, 25-01-2001 11:12:56] INTEGER PROC FNBufferGetBufferIdFileCurrentI() // e.g. PROC Main() // e.g. Message( FNBufferGetBufferIdFileCurrentI() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNBufferGetBufferIdGivenBufferNameI( FNStringGetFilenameCurrentS() ) ) END // library: string: get: initialization: global <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstigl.s) [kn, ri, mo, 22-05-2006 23:44:33] STRING PROC FNStringGetInitializationGlobalS( STRING searchS, STRING sectionS, STRING fileNameS ) // e.g. PROC Main() // e.g. Message( FNStringGetInitializationGlobalS( "path4dos", "default", FNStringGetFilenameIniDefaultS() ) ) // e.g. gives "c:\4dos" // e.g. END // e.g. // e.g. <F12> Main() RETURN( GetProfileStr( sectionS, searchS, FNStringGetEmptyS(), fileNameS ) ) END // library: string: get: section: separator <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstssh.s) [kn, ri, mo, 22-05-2006 23:43:21] STRING PROC FNStringGetSectionSeparatorS() // e.g. PROC Main() // e.g. Message( FNStringGetSectionSeparatorS() ) // gives e.g. "default" // e.g. END // e.g. // e.g. <F12> Main() RETURN( "default" ) // you can not put this in the initialization file, because this actually determines the default section of that file itself. Possibly pass it as a command line parameter END // library: filename: get: filename: ini: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfiide.s) [kn, ri, we, 31-12-2003 02:15:47] STRING PROC FNStringGetFilenameIniDefaultS() // e.g. PROC Main() // e.g. Message( FNStringGetFilenameIniDefaultS() ) // gives e.g. "c:\documents and settings\administrator\application data\dddpath.ini" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( "c:\dddpath.ini" ) RETURN( FNStringGetConcatS( FNStringGetPathUser_DataApplicationCurrentBackslashS(), FNStringGet_FilenameIniDefaultS() ) ) END // library: buffer: get: buffer: id: given: buffer: name (Returns the Unique Id of Requested or Current Buffer) O GetBufferId([STRING name])* <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getbubna.s) [kn, zoe, th, 25-01-2001 11:12:23] INTEGER PROC FNBufferGetBufferIdGivenBufferNameI( STRING bufferNameS ) // e.g. PROC Main() // e.g. Message( FNBufferGetBufferIdGivenBufferNameI( "test" ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( GetBufferId( bufferNameS ) ) END // library: string: get: concat <description>concatenation 2 words tot 1 word</description> <version>1.0.0.0.1</version> (filenamemacro=getstgch.s) [kn, zoe, th, 01-02-2001 19:32:49] STRING PROC FNStringGetConcatS( STRING s1, STRING s2 ) // version with test if string empty // e.g. PROC Main() // e.g. Message( FNStringGetConcatS( "test1", "test2" ) ) // version with test if string empty ) // gives e.g. "test1test2" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConcatSeparatorS( s1, s2, FNStringGetEmptyS() ) ) END // library: string: get: path: user: data: application: current: backslash <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcbe.s) [kn, ri, sa, 21-02-2004 23:01:06] STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashS() // e.g. PROC Main() // e.g. Message( FNStringGetPathUser_DataApplicationCurrentBackslashS() ) // gives e.g. "c:\documents and settings\administrator\application data\" (this is a hidden directory) // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetFilenameEndBackSlashNotEqualInsertEndS( FNStringGetPathUser_DataApplicationCurrentBackslashNotS() ) ) END // library: string: get: filename: ini: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstide.s) [kn, ri, sa, 21-02-2004 22:54:12] STRING PROC FNStringGet_FilenameIniDefaultS() // e.g. PROC Main() // e.g. Message( FNStringGet_FilenameIniDefaultS() ) // gives e.g. "dddpath.ini" // e.g. END // e.g. // e.g. <F12> Main() RETURN( "dddpath.ini" ) // you can not put this in the global initialization file, because this actually determines the name of that file itself. You could overrule this by passing the filename as a parameter on the command line. (if ( parameter is empty ) then ( defaultfilename = dddpath.ini ), else ( defaultfilename = <that command line parameter> ) ) END // library: string: get: filename: end: back: slash: not: equal: insert: end <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstiep.s) [kn, ni, su, 17-08-2003 00:24:04] STRING PROC FNStringGetFilenameEndBackSlashNotEqualInsertEndS( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringGetFilenameEndBackSlashNotEqualInsertEndS( 'c:\temp\ddd' ) ) // gives e.g. a string 'c:\temp\ddd\' (so with always a string with a backslash '\' at the end) // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterEndBackSlashNotEqualInsertEndS( s ) ) END // library: string: get: path: user: data: application: current <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstacu.s) [kn, ri, sa, 21-02-2004 22:50:55] STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashNotS() // e.g. PROC Main() // e.g. Message( FNStringGetPathUser_DataApplicationCurrentBackslashNotS() ) // gives e.g. "c:\documents and settings\administrator\application data" (this is a hidden directory) // e.g. END // e.g. // e.g. <F12> Main() STRING s[255] = FNStringGetEnvironmentS( "APPDATA" ) IF FNStringCheckEnvironmentFoundNotB( s ) PROCWarnCons3( "current user path to application data", s, ": not found" ) s = FNStringGetErrorS() ENDIF RETURN( s ) END // library: string: get: backslash: if last character is not equal to '\', then concatenate a backslash to the end of the given string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstien.s) [kn, ri, sa, 24-02-2001 23:48:15] STRING PROC FNStringGetCharacterEndBackSlashNotEqualInsertEndS( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: get: backslash: if: not equal insert end: string = ", "this is a string without a backslash at end" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNStringGetCharacterEndBackSlashNotEqualInsertEndS( s1 ) ) // gives e.g. "this is a string with a backslash at end\" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterInsertEndIfEqualNotS( s, FNStringGetCharacterSymbolSlashBackwardS() ) ) END // library: environment: string: get (Searches for and Returns a Specified Environment Str) R GetEnvStr(STRING s)* <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgen.s) [kn, ri, th, 25-10-2001 01:44:48] STRING PROC FNStringGetEnvironmentS( STRING s ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInputS( "value: environment variable = ", "windir" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. PROCMessageCons3( s, "=", FNStringGetEnvironmentS( s ) ) // gives e.g. "windir=C:\WINNT", when working on a Windows2000 machine // e.g. END // e.g. // e.g. <F12> Main() STRING valueS[255] = GetEnvStr( s ) IF FNStringCheckEmptyB( valueS ) PROCMessageCons3( "environment variable", s, ": not found" ) valueS = FNStringGetErrorS() ENDIF RETURN( valueS ) END // library: environment: check: found: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checenfn.s) [kn, ri, sa, 27-05-2006 20:20:03] INTEGER PROC FNStringCheckEnvironmentFoundNotB( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringCheckEnvironmentFoundNotB( FNStringGetEmptyS() ) ) // gives TRUE (thus not found) because string empty (or string error string) // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringCheckEqualErrorOrEmptyB( s ) ) END // library: compare if string end is equal, if not so insert that string at the end <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstenp.s) [kn, ri, sa, 24-02-2001 23:06:33] STRING PROC FNStringGetCharacterInsertEndIfEqualNotS( STRING inS, STRING tailS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: insert: insert: string = ", "c:\kee" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "string: insert: insert: frontS = ", "\" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNStringGetCharacterInsertEndIfEqualNotS( s1, s2 ) ) // gives e.g. "c:\kee\" // e.g. END // e.g. // e.g. <F12> Main() // e.g. // <F12> PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c", ":" ) ) // gives "c:" // e.g. // <F12> PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c:", ":" ) ) // gives "c:" // e.g. // <F12> PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c:\kee", FNStringGetCharacterSymbolSlashBackwardS() ) ) // gives "c:\kee\" STRING s[255] = inS IF FNMathCheckLogicNotB( FNStringCheckEqualCharacterLastNB( s, tailS ) ) // s = FNStringGetConcatS( s, tailS ) s = FNStringGetConcatTailS( s, tailS ) ENDIF RETURN( s ) END // library: string: get: character: symbol: "\" <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstsba.s) [kn, ri, su, 29-07-2001 15:41:11] STRING PROC FNStringGetCharacterSymbolSlashBackwardS() // e.g. PROC Main() // e.g. Message( FNStringGetCharacterSymbolSlashBackwardS() ) // gives "\" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterSymbolCentralS( 92 ) ) END // library: message: via 3 strings [kn, ri, su, 29-07-2001 18:24:52] PROC PROCMessageCons3( STRING s1, STRING s2, STRING s3 ) PROCMessage( FNStringGetCons3S( s1, s2, s3 ) ) END // library: environment: check: found: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checenfn.s) [kn, ri, sa, 27-05-2006 20:20:03] INTEGER PROC FNStringCheckEqualErrorOrEmptyB( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringCheckEqualErrorOrEmptyB( FNStringGetEmptyS() ) ) // gives TRUE if string empty or string equals error string // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNMathCheckLogicOrB( FNErrorCheckSB( s ), FNStringCheckEmptyB( s ) ) ) END // library: string: word: equal: last: compare if a given string is equal at the end to another given string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checstln.s) [kn, zoe, we, 29-11-2000 19:08:34] INTEGER PROC FNStringCheckEqualCharacterLastNB( STRING s, STRING tailS ) // version: first parameter s then endS // e.g. PROC Main() // e.g. Message( FNStringCheckEqualCharacterLastNB( "knud", "d" ) ) // gives TRUE // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringCheckEqualB( FNStringGetRightStringLengthEqualS( s, tailS ), tailS ) ) END // library: string: get: concat: tail: suffix <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstctb.s) [kn, ri, su, 02-09-2001 03:08:08] STRING PROC FNStringGetConcatTailS( STRING s, STRING tailS ) // e.g. PROC Main() // e.g. Message( FNStringGetConcatTailS( "Knu", "d" ) ) // gives e.g. "Knud" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConcatS( s, tailS ) ) END // library: message: (Write Specified Expression(s) on Editor Status Line) R Message(expr [, expr2]...)* [kn, zoe, we, 16-06-1999 01:07:07] PROC PROCMessage( STRING s ) Message( s ) END // library: math: check: logic: or: 2 arguments <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalo.s) [kn, ri, tu, 15-05-2001 16:54:17] INTEGER PROC FNMathCheckLogicOrB( INTEGER B1, INTEGER B2 ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "math: check: logic: or: number1 = ", "1" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "math: check: logic: or: number2 = ", "1" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNMathCheckLogicOrB( FNStringGetToIntegerI( s1 ), FNStringGetToIntegerI( s2 ) ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() IF ( B1 ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF // IF ( B2 ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF // RETURN( FNMathCheckGetLogicFalseB() ) END // library: STRING: get: right: string: length: equal <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstler.s) [kn, ni, su, 30-11-2003 23:32:40] STRING PROC FNStringGetRightStringLengthEqualS( STRING s, STRING tailS ) // e.g. PROC Main() // e.g. Message( FNStringGetRightStringLengthEqualS( "Knud van Eeden", "12345" ) ) // gives e.g. "Eeden" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetRightStringS( s, FNStringGetLengthI( tailS ) ) ) END // library: string: get: word: token: last: return a given integer amount of characters from the right of a given string (=RIGHT$ in BASIC) <description></description> <version control></version control> <version>1.0.0.0.4</version> (filenamemacro=stririrs.s) [kn, ri, tu, 13-10-1998 20:05:49] STRING PROC FNStringGetRightStringS( STRING s, INTEGER totalI ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. STRING charactertotalS[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "string: word: token: get: right: string = ", "knud" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. charactertotalS = FNStringGetInputS( "string: word: token: get: right: character total = ", "2" ) // e.g. IF FNKeyCheckPressEscapeB( charactertotalS ) RETURN() ENDIF // e.g. Message( FNStringGetRightStringS( s, FNStringGetToIntegerI( charactertotalS ) ) ) // gives e.g. "kn" // e.g. END // e.g. // e.g. <F12> Main() // // e.g. // <F12> PROCMessage( FNStringGetRightStringS( "knud", 1 ) ) // gives "d" // e.g. // <F12> PROCMessage( FNStringGetRightStringS( "knud", 2 ) ) // gives "ud" // e.g. // <F12> PROCMessage( FNStringGetRightStringS( "best", 3 ) ) // gives "est" // INTEGER lengthI = FNStringGetLengthI( s ) // IF FNMathCheckLogicNotB( ( ( 0 <= totalI ) AND ( totalI <= lengthI ) ) ) // if not between 0 and length( string ), return the whole given string // totalI = lengthI // ENDIF // RETURN( FNStringGetMidStringS( s, 1 + lengthI - totalI, lengthI ) ) // END // library: string: line: length: what is the length <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgle.s) [kn, ri, we, 25-11-1998 20:20:58] INTEGER PROC FNStringGetLengthI( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: line: length: string = ", "this is a test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNStringGetLengthI( s1 ) ) // gives e.g. 14 // e.g. END // e.g. // e.g. <F12> Main() // // e.g. // <F12> Message( FNStringGetLengthI( "knud" ) ) // gives 4 // e.g. // <F12> Message( FNStringGetLengthI( "the" ) ) // gives 3 RETURN( Length( s ) ) END // library: string: get: word: token: middle: return a given integer amount of characters from the a given startposition <description></description> <version control></version control> <version>1.0.0.0.2</version> (=MID$ in BASIC) <version>1.0.0.0.2</version> (filenamemacro=getstmid.s) [kn, ri, tu, 13-10-1998 20:29:00] STRING PROC FNStringGetMidStringS( STRING s, INTEGER beginI, INTEGER totalI ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. STRING positionbeginS[255] = FNStringGetInitializeNewStringS() // e.g. STRING charactertotalS[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "string: get: MIDSTRING: string = ", "testing" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. positionbeginS = FNStringGetInputS( "string: get: MIDSTRING: beginposition = ", "2" ) // e.g. IF FNKeyCheckPressEscapeB( positionbeginS ) RETURN() ENDIF // e.g. charactertotalS = FNStringGetInputS( "string: get: MIDSTRING: character total = ", "3" ) // e.g. IF FNKeyCheckPressEscapeB( charactertotalS ) RETURN() ENDIF // e.g. Message( FNStringGetMidStringS( s, FNStringGetToIntegerI( positionbeginS ), FNStringGetToIntegerI( charactertotalS ) ) ) // e.g. END // e.g. // e.g. <F12> Main() // // Message( FNStringGetMidStringS( "knud", 2, 3 ) ) // gives "nud" // Message( FNStringGetMidStringS( "knud", 3, 2 ) ) // gives "ud" // RETURN( SubStr( s, beginI, totalI ) ) // END
--- cut here: end ---------------------------------------------------- 8. -A SQL query text file is generated which creates the database table (locally, but you could use it also to creating it (manually) at your provider), by piping it to your database client (e.g. mysql.exe) 9. -PHP include database connection files are automatically generated, for the local system, and the remote ftp system, and copied to the current used database connection file 10. -A PHP file which contains this CRUD operations is automatically generated and saved locally in the web server directory 11. -It starts webbrowsers locally, each showing one of the 4 CRUD operations 12. -It uploads also that PHP file and the remote PHP database connection file to your web server directory 13. -In case you change the total amount of columns, you will have to (usually manually) (re)create the existing table in your remote database. If existing table use e.g. the SQL command to add a column ALTER TABLE <your tablename> ADD COLUMN <your columnname> <your column attributes> or to remove a column ALTER TABLE <your tablename> DROP COLUMN <your columnname> or remove the table alltogether (but you loose *all* data in that table) DROP TABLE <your tablename> I will implement this option also in the web page, so that you can do it yourself via PHP 14. -It starts webbrowsers, accessing your remote site, in a similar way, each showing one of the 4 CRUD operations 15. -Tested successfully on Microsoft Windows XP Professional (service pack 2), running TSE 4.x Microsoft Internet Information Server (IIS) CodeGear Delphi for PHP v2.0 (only for purposes of debugging the generated PHP files) MySql v5 Oracle v10.1.0 Firebird v1.5 Interbase v8.5 Sqlite v2 Microsoft SQL server 2000 === Book: see also: --- [book: author: Yank, Kevin - title: Build your own database driven website using PHP & MySQL - publisher: Sitepoint] === Diagram: see also: === File: see also: === File: version: control: see also: === Help: see also: === Image: see also: === Internet: see also: === Podcast: see also: === Record: see also: === Screencast: see also: === Table: see also: === Video: see also: === <version>1.0.0.0.3</version> ----------------------------------------------------------------------

Share |

This web page is created and maintained using the Semware TSE text editor