Technical References - [SQLconnect]

Opens and persists a 'named' connection to a SQL server, for the durration of the template.

numero = 276
interpreted = N
texte = [SQLConnect Params]...[/SQLConnect] Generally speaking, the first step when using the SQL contexts is to make a connection to your database server. This is done with the [SQLConnect] context. Example:
[SQLConnect dbType=MySQL&host=192.168.1.1&database=base&uid=sa&pwd=pass&conn_var=conn1]<table><tr><td>Host:</td><td>[SQL_HOST]</td></tr><tr><td>Server Version:</td><td>[SQL_SERVERVER]</td></tr><tr><td>Client Version:</td><td>[SQL_CLIENTVER]</td></tr></table>[/SQLConnect]
ParameterDescription
dbtype(Optional) - Can be one of three reserved values - MYSQL, MSSQL, or ORACLE - depending on the type of RDBMS you wish to connect to.If 'dbType' is not given, WebDNA defaults to MYSQL. For WebDNA 6.0, MYSQL is the only type supported.
host(Required) - Either the IP Address or the host name of the database server you wish to connect to.
port(Optional) - The non-standard/non-default port of the database host you wish to connect to; do not provide a value unless your database administrator has informed you that the you must use a specific port in order to connect to the server.
database(Optional) - The name of the database to which you wish to connect; almost all the time you will want to provide a database name to connect to; if you do not supply the "database" parameter, the engine assumes you wish to connect to the RDBMS as admin in order to execute admin-type tasks, such as creating tables, etc.; please note that in this case you will more than likely only be required to provide admin credentials in order to connect successfully.
uid(Optional) - The username credential you want to use to connect to the SQL server.
pwd(Optional unless uid is used) - The password credential you want to use to connect to the SQL server.
conn_var ( or just 'var')(Required) - the name of the connection variable that will be created on successful connection.
The following tags are available inside a [SQL] context:
TagDescription
[SQL_HOST] The IP Address/host name of the database server.
[SQL_SERVERTYPE] The type of the database server; types returned: MYSQL, MSSQL, or ORACLE.
[SQL_SERVERVER] The SQL database server version number.
[SQL_CLIENTVER]The version number of the client being used to connect to the database server.
[SQL_DBNAME] The name of the database you have connected to, if any
[SQLConnect Params]...[/SQLConnect]

Generally speaking, the first step when using the SQL contexts is to make a connection to your database server. This is done with the [SQLconnect] context.

Example:

[SQLConnect dbType=MySQL&host=192.168.1.1&database=base&uid=sa&pwd=pass&conn_var=conn1]
<table>
<tr><td>Host:</td><td>[SQL_HOST]</td></tr>
<tr><td>Server Version:</td><td>[SQL_SERVERVER]</td></tr>
<tr><td>Client Version:</td><td>[SQL_CLIENTVER]</td></tr>
</table>
[/SQLConnect]


ParameterDescription
dbtype(Optional) - Can be one of three reserved values - MYSQL, MSSQL, or ORACLE - depending on the type of RDBMS you wish to connect to.If 'dbType' is not given, WebDNA defaults to MYSQL. For WebDNA 6.0, MYSQL is the only type supported.
host(Required) - Either the IP Address or the host name of the database server you wish to connect to.
port(Optional) - The non-standard/non-default port of the database host you wish to connect to; do not provide a value unless your database administrator has informed you that the you must use a specific port in order to connect to the server.
database(Optional) - The name of the database to which you wish to connect; almost all the time you will want to provide a database name to connect to; if you do not supply the "database" parameter, the engine assumes you wish to connect to the RDBMS as admin in order to execute admin-type tasks, such as creating tables, etc.; please note that in this case you will more than likely only be required to provide admin credentials in order to connect successfully.
uid(Optional) - The username credential you want to use to connect to the SQL server.
pwd(Optional unless uid is used) - The password credential you want to use to connect to the SQL server.
conn_var ( or just 'var')(Required) - the name of the connection variable that will be created on successful connection.


The following tags are available inside a [SQL] context:

TagDescription
[SQL_HOST] The IP Address/host name of the database server.
[SQL_SERVERTYPE] The type of the database server; types returned: MYSQL, MSSQL, or ORACLE.
[SQL_SERVERVER] The SQL database server version number.
[SQL_CLIENTVER]The version number of the client being used to connect to the database server.
[SQL_DBNAME] The name of the database you have connected to, if any

DOWNLOAD WEBDNA NOW!

Top Articles:

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

F.A.Q

A compilation of some user's questions...

WebDNA Modules

A list of the currently available modules...

WebDNA Libraries

A list of available libraries for WebDNA...

Tips and Tricks

A list of user-submitted tips ...

Related Readings:

[grep]

Replaces text based on a regular expression...

[hideif]

[HideIf Comparison]Hide This HTML[/HideIf]...

[closedatabase]

[CLOSEDATABASE db=FileName]...

[hide]

Prevents WebDNA to return hidden parts of your code to apache (from version 8...

[shell]

[shell] is a way to use the command line with your webserver...

[array]

Array Operation...