Hi Community,
this is a very urgent call because i have to migrate a database following week, changing from Win2k3-32bit/ND6.5.x-32bit to Win2k8-86bit/ND8.01-64bit.
Problem: i am reading data using odbc from a text-file. Now changed to ND8 only the FIRST line is read …
This is my text-file (only one column):
START
HEA SAP-HCM 1.2ZE011PATBEW01NNP11I0SAP-ISH 100850020110510021205LAB850 N_L8500 19407493393BEW8500850118721620110510015600K3711 XXXX, XXXXXXXX 00001END
HEA SAP-HCM 1.2ZE011PATBEW01NNP11I0SAP-ISH 100850020110510021205LAB850 N_L8500 19407493393BEW8500850118721620110510015600K3712 YYYY, YYYYYYYY 00001END
HEA SAP-HCM 1.2ZE011PATBEW01NNP11I0SAP-ISH 100850020110510021205LAB850 N_L8500 19407493393BEW8500850118721620110510015600K3713 ZZZZ, ZZZZZZZZ 00001END
This is my Script (shortend, but works - triggered by time) :
Option Public
Uselsx “*LSXODBC”
Sub Initialize
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Set qry.Connection = con
Set result.Query = qry
con.ConnectTo("import")
qry.SQL = "SELECT * FROM import.txt"
result.Execute
Do
Call result.NextRow
tester = result.GetValue(1, tester)
Print "CurrentRow : " & Cstr(result.CurrentRow) & " " & tester
Loop Until result.IsEndOfData
Print "-----> DB-counted Rows : " & result.NumRows & "<-----"
result.Close(DB_CLOSE)
con.Disconnect
Print "Import NEU ist beendet"
End Sub
This is the output (server-log) :
12.05.2011 20:28:05 AMgr: Agent (‘Patienten’ in rkbed_Patienten.nsf’) printing: CurrentRow : 1 HEA SAP-HCM 1.2ZE011PATBEW01NNP11I0SAP-ISH 100850020110510021205LAB850 N_L8500 19407493393BEW8500850118721620110510015600K3711 XXXX, XXXXXXXX 00001END
12.05.2011 20:28:05 AMgr: Agent (‘Patienten’ in ‘rkbed_Patienten.nsf’) printing: CurrentRow : 2
12.05.2011 20:28:05 AMgr: Agent (‘Patienten’ in ‘rkbed_Patienten.nsf’) printing: CurrentRow : 3
12.05.2011 20:28:05 AMgr: Agent (‘Patienten’ in ‘rkbed_Patienten.nsf’) printing: -----> DB-counted Rows : 3<-----
12.05.2011 20:28:05 AMgr: Agent (‘Patienten’ in ‘rkbed_Patienten.nsf’) printing: Import NEU ist beendet
As you can see only line 1 is in the resultset, lines 2 and 3 are EMPTY .
WHY ???
ODBC-Driver : MS Access Text Driver (*.txt, *.csv) for x64
This is the ini-file :
[import.txt]
ColNameHeader=True
Format=TabDelimited
MaxScanRows=100
CharacterSet=ANSI
Col1=START Char Width 255
Thanks for ANY help
best regards
Stephan Reintjes
Kleve / Germany