Quantcast

Documentation Center

  • Trial Software
  • Product Updates

kx

Connect to Kx Systems, Inc. kdb+ databases

Syntax

k = kx(ip,p)
k = kx(ip,p,id)

Arguments

ip

IP address for the connection to the Kx Systems®, Inc. kdb+ database.

p

Port for the Kx Systems, Inc. kdb+ database connection.

id

The username:password string for the Kx Systems, Inc. kdb+ database connection.

Description

k = kx(ip,p) connects to the Kx Systems, Inc. kdb+ database given the IP address ip and port number p.

k = kx(ip,p,id) connects to the Kx Systems, Inc. kdb+ database given the IP address ip, port number p, and username:password string id.

Before you connect to the database, add The Kx Systems, Inc. file jdbc.jar to the MATLAB® javaclasspath using the javaaddpath command. The following example adds jdbc.jar to the MATLAB javaclasspath c:\q\java:

javaaddpath c:\q\java\jdbc.jar

    Note:   In earlier versions of the Kx Systems, Inc. kdb+ database, this jar file was named kx.jar. If you are running an earlier version of the database, substitute kx.jar for jdbc.jar in these instructions to add this file to the MATLAB javaclasspath.

Examples

Run the following command from a DOS prompt to specify the port number 5001:

q tradedata.q -p 5001 

Connect to a Kx Systems, Inc. server using IP address LOCALHOST and port number 5001:

k = kx('LOCALHOST',5001) 
handle: [1x1 c]
        ipaddress: 'localhost'
        port: 5001

See Also

| | | |

Was this topic helpful?