Difference between revisions of "RU/kb/00000210"
From Wiki
Jump to navigationJump to searchLine 21: | Line 21: | ||
<section begin=signature/> | <section begin=signature/> | ||
− | {{SignYear| | + | {{SignYear|Sancho|А. Е. Харламенков|2010}} |
<section end=signature/> | <section end=signature/> | ||
{{RUkbBaseBottom}} | {{RUkbBaseBottom}} |
Latest revision as of 16:07, 27 August 2011
Запросы OpenOffice.org Base можно использовать для вставки данных.
Например:
' Подключаемся к базе данных
DatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")
DataSource = DatabaseContext.getByName("Имя базы данных")
' С пустым именем и паролем
Connection = DataSource.GetConnection("", "")
Statement = Connection.createStatement()
Statement.executeUpdate("Insert into ""Имя таблицы""(""Поле1"",""Поле2"",......) Values ('Значение1','Значение2',......)")