Dim sql As New SNCS.Client

''Connect to specified server and port
'sql.Connect("ServernameOrIP", 11111)

''Connect to specified server with default port (12345)

''Connect to local server with specified port

'Connect to local server with default port
If sql.Connect() Then
    'Authenticate to get write access
    sql.Authenticate("user", "pass")

    'Set public value
    sql.SetValue("My first entry!", "Oh look, a value!")

    'get public value
    MsgBox(sql.GetValue("My first entry!"))

    'Create a new DB (Category)
    Dim MyDB As String = sql.GetDB("My DB!")

    'Set private value
    sql.SetPrivateValue(MyDB, "My first private entry!", "Another Value")

    'Get private value
    MsgBox(sql.GetPrivateValue(MyDB, "My first private entry!"))

    'Show the first DB

    'Shows the first entry + value of "MyDB"
    MsgBox(sql.ListPrivateValues(MyDB).Keys(0).ToString & " = " &

    'Shows the first public entry + value
    MsgBox(sql.ListValues().Keys(0).ToString & " = " &

    'Deletes a public entry
    sql.DelValue("My first entry!")

    'Deletes a private entry
    sql.DelPrivateValue(MyDB, "My first private entry!")

    'Deletes a DB
End If

Last edited Feb 25, 2015 at 2:13 PM by BiedermannS, version 5