und gleich noch eine Frage... Ich bekomme keine Werte in eine Combobox geschrieben? Bei folgendem Script kommt die Fehlermeldung, dass die Typen unverträglich sind:
Dim oDatabase
Dim oView
Dim oRecord
Dim sSQL
Dim oInstaller
MsgBox "01"
Set oDatabase = Session.Database
Set oView = oDatabase.OpenView("SELECT * FROM ComboBox WHERE Property='ANZEIGE'")
Set oInstaller = Session.Installer
Set oRecord = oInstaller.CreateRecord(4)
If Not oRecord Is Nothing Then
'Set the property of the control to which the
oRecord.StringData(1) = "ANZEIGE"
oRecord.IntegerData(2) = 1
oRecord.StringData(3) = "qwewqe"
oRecord.StringData(4) = "dfgdfg"
End If
On Error Resume Next
'Read/Write on to the view
oView.Modify 7,oRecord
MsgBox "03"
On Error Resume Next
Set oView = oDatabase.OpenView(sSQL)
If Err.Number <> 0 Then
MsgBox "Error " & Err.Number & " : " & Err.Description
On Error Goto 0
MsgBox "Error"
End If
MsgBox "04"
oView.Close
Set oView = Nothing
Set oDatabase = Nothing
Set oInstaller = Nothing
Set oRecord = Nothing
Und bei diesem läuft das Script aber es werden keine Daten angezeigt (Height ist auf 100)
Dim oDatabase
Dim oView
Dim sSQL
Set oDatabase = Session.Database
sSQL = "SELECT * FROM ComboBox WHERE Property = 'ANZEIGE'"
MsgBox "01"
On Error Resume Next
Set oView = oDatabase.OpenView(sSQL)
If (Err.Number <> 0) Then
MsgBox "Error " & Err.Number & " : " & Err.Description
End If
MsgBox "02"
'oView.Execute
'Set oRecord = oView.Fetch
'MsgBox oRecord.StringData(4)
sSQL = "INSERT INTO `ComboBox` (`Property`, `Order`, `Value`, `Text`) VALUES ('ANZEIGE', 1123, '5', 'TestText'

MsgBox "03"
On Error Resume Next
Set oView = oDatabase.OpenView(sSQL)
If Err.Number <> 0 Then
MsgBox "Error " & Err.Number & " : " & Err.Description
On Error Goto 0
MsgBox "Error"
End If
MsgBox "04"
oView.Close
Set oView = Nothing
Set oDatabase = Nothing
Danke vorab!