Good Morning
I am trying to set autocommit to false, but this fails. Any help is appreciated.
Dim locCon as Object
Sub Main2
openLocal("new_local_base")
makeData
closeDBObject(locCon)
End Sub
Public Sub openLocal(db$)
locCon = getFBConnection(db)
End Sub
Private Function getFBConnection(context$)
Dim DatabaseContext As Object
DatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")
DataSource = DatabaseContext.getByName(context)
getFBConnection= DataSource.getConnection("","")
End Function
Sub makeData
Dim ub As Long
strSQL = "INSERT INTO TABLE1(F1) VALUES(?)"
locCon.setAutoCommit(false)
stmt = locCon.prepareStatement(strSQL)
For ub=0 To basis
stmt.setInt(1,ub)
Next ub
End Sub
private Sub closeDBObject(dbObject As Object)
dbObject.close()
dbObject = Nothing
End Sub