From The Document Foundation Wiki
< Macros‎ | Base
Jump to navigation Jump to search
This page contains changes which are not marked for translation.
Other languages:
English • ‎italiano


Execute update in current database

Basic code

Sub main()
    doc = ThisComponent
    conn = doc.DataSource.getConnection("", "")

    sql = "UPDATE ""contactos"" SET ""numbers""=TRIM(""numbers"")"
    cursor = conn.prepareStatement(sql)
    result = cursor.executeUpdate()
    MsgBox result
End Sub