CONNECT

ZIM Development Center (DC) for Zim 7

CONNECT

< All Topics

CONNECT

Establishes a connection to Zim Integrated Server or an SQL database.

Syntax

connect to [ “ZIMSERV” | “JDBCSAM” | alias name ] using (database name, SQL server name, userid, password, server name, domain name)

alias nameis an alias of the names ”ZIMSERV” or ”JDBCSAM” as defined in the configuration file “zimalias.zim”.
database nameis the logical database name is either the database name serviced the Zim Server process or the instance name as known by SQL database servers.
SQL server nameis the generic name of the SQL database server like Oracle, MySQL, SQLServer, etc. When connecting to Zim Server, this parameter is ignored.
useridis the login name as known by the server being connected to. It cannot be left blank or $NULL.
passwordis the password associated with the user that is connected to the server.
server nameevaluates to the port number on which the server is listening. This can be a service name from the services file or the physical number of the port on which the server is listening.
domain nameis the domain name, physical address or internet address where the database is located and where the server boss process must already be running.

 

Comments

All parameters are strings or expressions that produce a string.

In the case of a multiple connection to more than one server possessing the same SAM name, an alias name should be defined in the configuration file “zimalias.zim”.

The ”JDBCSAM” name specifies a connection to an SQL server using the JDBC protocol, which extends the range of servers accessed by ZIM to MySQL, PostGres, Access and others that follow the JDBC rules.

Example

For user “JOE” with password “PASSWORD” to connect to a Zim server, enter

connect to ”ZIMSERV” using (“Inventory”, “”, “JOE”, “PASSWORD”, “Joes_Server”, “LinuxAirport”)

To connect to MySQL (or any other SQL database server), you must use the JDBC SAM:

connect to ”JDBCSAM” using (“Sales”, “MySQL”, “TheUser”, “ThePassword”,”5455″, “123.123.123.123”)

If connecting to two servers of the same SAM name at the same time, one of them must be defined as an alias:

connect to ”ZIMSERV” using (“Inventory”, “”, “JOE”, “PASSWORD”, “Joes_Server”, “General”)
connect to ”ZIMSERV2” using (“Sales”, “”, “JOE”, “PASSWORD”, “Joes_Server”, “www.location.com”)

 

 

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?

Leave a Reply

Your email address will not be published. Required fields are marked *

Table of Contents
en_CAEnglish