Help needed urgently: Why does my Script only read Line 1 from a text-file?

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

Subject: Problem located - it’s a Notes “bug”

This problem was driving me mad - now IBM aswered my ticket-call.

It’s a problem using the combination x64 : ND 8.0.2 and Win2k8

This combination isn’t supported by IBM, so you can’t setup ND8.0.x with win2k8 !!!

This only works proper using a version >=ND8.5

Stephan

Subject: Could it be this line?

tester = result.GetValue(1, tester)you’re assigning tester to tester, maybe that is screwing things up?

Subject: No …

it fails also, if i write

tester=result.getValue(1)

or

tester=result.getValue(“START”)

or

print result.getValue(1)

thks for reply

Stephan

Subject: And what do you see when you step through the code in debug mode?

Subject: unfortunally RemoteDebugging doesn’t run on the server

Subject: Aren’t you able to run that fragment of code locally and step through it?

Subject: no, because …

the local client-user can’t access the text-file/odbc.

Yesterday I pumped the data from the txt-file into a MS-Access-Database and used a different ODBC-Driver.

And, I can’t believe it - the same Error occurs. Might there be a BUG in ND8x64 ???

I started a PMR at IBM - hope they’ll find a clue

Stephan Reintjes

Subject: Couldn’t you simply use Input?

  • I realize this doesn’t address the unsupported configuration issue, but it looks like you’re simply reading a text file one line at a time and processing the data. LotusScript can do that without ODBC, and will probably do it a heck of a lot faster.

  • Unless I’m missing that “Import” is remote. Then never mind!

Hope this helps…