Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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 character vector or 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 character vector or 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

| | | |

Introduced in R2007a

Was this topic helpful?