Macros/Base/ba002

From The Document Foundation Wiki
< Macros‎ | Base
Jump to navigation Jump to search
This page is a translated version of the page Macros/Base/ba002 and the translation is 100% complete.
Other languages:
English • ‎italiano

Descrizione

Esegue un aggiornamento nel database corrente

Codice in Basic

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

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