e6c21ee479
Access2Base library can be run to access a database defined in any form stored in any AOO/LibO document. Now CurrentDb method may be associated with a form object, not only with the root class.The OpenDatabase method allows any AOO/LibO document to get access to tables stored in any database. RunSQL, OpenSQL, database functions have been extended to be run from a database object, not only as a command. The CopyObject (new) action copies query definitions and/or table definitions and data. Creation of table and fields without SQL with the CreateTableDef, CreateField and Append methods. The Description property of a TableDef is writable. New GetHiddenAttribute and SetHiddenAttribute actions hide or show any AOO/LibO or Base object. SelectObject scope has been extended accordingly. Addition of the SelStart, SelLength and SelText properties for text controls. Change-Id: I163f3bcb0f63dc346e1bd23729356ebe556c6592 Reviewed-on: https://gerrit.libreoffice.org/9303 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
33 lines
No EOL
1.1 KiB
XML
33 lines
No EOL
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test" script:language="StarBasic">Option Explicit
|
|
'Option Compatible
|
|
|
|
Sub Main
|
|
'Application._RootInit()
|
|
_A2B_.CalledSub = ""
|
|
Application.SysCmd(acSysCmdRemoveMeter)
|
|
Dim a as variant, b as variant, c as variant, d as variant, i as integer, s as string,f as variant, h as variant, j as long, k as integer, l as integer, sFile As String
|
|
Dim lTime1 as Long, lTime2 as Long
|
|
lTime1=getsystemticks()
|
|
' TraceConsole()
|
|
_ErrorHandler(False)
|
|
traceconsole()
|
|
exit sub
|
|
CurrentDb().CloseAllrecordsets()
|
|
Set a = CurrentDb().TableDefs("Alltypes")
|
|
Set b = a.OpenRecordset( , , dbreadOnly)
|
|
Dim vVar() As Variant
|
|
Set vVar = b.GetRows(1000)
|
|
b.mClose()
|
|
DebugPrint UBound(vVar, 1), UBound(vVar, 2)
|
|
For i = 0 To UBound(vVar, 2)
|
|
For j = 0 To UBound(vVar, 1)
|
|
DebugPrint i, j, vVar(j, i)
|
|
Next j
|
|
Next i
|
|
lTime2=getsystemticks
|
|
debugprint lTime2 - lTime1
|
|
exit sub
|
|
End Sub
|
|
</script:module> |