Weiss nicht.
diese Zeile:
connectdb2.Metadata = "outtput"
sieht merkwürdig aus. 2 t.
Versuch doch einfach ein Skript aus den Beispielen der Hilfe und pass es auf deine Bedingungen an:
Sub Initialize
Dim src As New LCConnection ("db2")
Dim fldLst As New LCFieldList
Dim fld As LCField
Dim count As Integer
' set the appropriate properties to connect
src.Database = "Gold"
src.Userid = "JDoe"
src.Password = "xyzzy"
src.Connect
' now connected, we can execute a selection statement
If (src. Execute ("SELECT * from customer", fldLst) = 0) Then
Print "No records were fetched."
End
End If
Set fld = fldLst.Lookup ("CONTACTNAME")
Print "the 'contact names' stored in the table are:"
' fetch each record from the result set
While (src.Fetch (fldLst) > 0)
count = count + 1
Print " record #" & Cstr(count) & " = '" & fld.text(0) & "'"
Wend
If (count = 0) Then Print "No records were fetched."
End Sub