Hi Leute.
Ich hab ein Test-Script mit LSX LC, das mir Daten über ODBC saugen soll.
Das Script liefert eine Fehlermeldung:
[Err-no: 12303] [Error: A fixed-length stream requires a non-zero length, Connector 'odbc2', Method -Execute-
In der Designer Hilfe ist sogar ein Eintrag dazu, aber ich werde nicht schlau daraus!!
&H300F, 12303, LCFAIL_FIXED_LENGTH, A fixed-length stream requires a non-zero length.
When requesting a fixed-length stream (with the stream flag LCSTREAMF_FIXED), a maximum length property with a non-zero value must be provided via LCStream.Create.
Hat jemand eine Ahnung, wo ich weitersuchen könnte oder schon Erfahrung mit LSX LC und ODBC?
alex
Das Script sieht so aus:
Sub Initialize
Dim src As New LCConnection ("odbc2")
Dim fldLst As New LCFieldList
Dim fld As LCField
Dim count As Integer
Dim qry As String
' set the appropriate properties to connect
src.Server = "sem"
src.Userid = "lan_usr"
src.Password = "lan_pw"
src.Connect
' now connected, we can execute a selection statement
If (src.Execute("SELECT * FROM PARTNER001", fldLst) = 0) Then
Print "No records were fetched. 1"
Exit Sub
End If
Set fld = fldLst.Lookup ("NAME")
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 #fileNum%, "No records were fetched. 2"
Exit Sub
End Sub