Hello
I made some changes with new code:
Option Explicit
public locCon As object
Sub Main1
Dim stmt as Object
Dim strSQL As String
Dim Vals as Variant
strSQL = "execute block (name varchar(5)[25] = ?) as declare I INTEGER; Begin I= 0; WHILE (I<26) DO INSERT INTO TABLE1(NAME) VALUES(:name[:I]); I=I+1; End End"
Vals = Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
openLocal("reportage")
set stmt =locCon.prepareStatement(strSQL)
stmt.setBlob(1,Vals)
stmt.executeUpdate()
stmt.Close
stmt =Nothing
End Sub
Private Sub openLocal(context$)
getFBConnection(context)
End Sub
Private Sub getFBConnection(context$)
Dim DatabaseContext As Object
DatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")
DataSource = DatabaseContext.getByName(context)
locCon= DataSource.getConnection("","")
End Sub
So when it reaches the line:
stmt.setArray(1,Vals)
I get the error message:
BASIC runtime error.
An exception occurred
Type: com.sun.star.sdbc.SQLException
Message: firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -104
*Token unknown - line 1, column 31
*[
caused by
'isc_dsql_prepare'
I would appreciate any help offered.
Thank you