Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with reading records from DB2 table
#1
Could someone please help me with this issue. I am trying to read all the data in all the columns of a table and the script leaves out some records, e.g. if I have 100 rows only 95 are read. Is theer a limit as how many records can be read.

Code:
DB2Cn.Open DB2ConnStr Set getDB2Connect = DB2Cn If getDB2Connect.Errors.Count = 0 Then Set rs = DB2Cn.Execute(query,,adExecuteNoRecords) colCount= rs.fields.count ' to retrieve the no. of columns in recordset rows = rs.fields(0).value 'rs.recordcount

Then I am using a for loop to get each row data.

Thanks,
Sqadri
Reply
#2
try using

Do while not rs.EOF

loop

Thanks,
SUpputuri
Reply
#3
Thank your response, sorry I was wrong I am not using for loop but I am using while loop

Code:
'While rs.EOF <> True 'For n=0 To colCount-1 ' If strcomp( rs.fields(n).value, "")>0Then ' Print rs.fields(n).value ' End If 'Next 'Print rs.fields(0).value 'rs.MoveNext 'wend

Thanks,
Sqadri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 2,071 01-05-2020, 10:03 PM
Last Post: Bhuvana
  Reading Value from Java Table arjun.singh 8 25,832 10-11-2017, 02:51 PM
Last Post: sivaji
  Reading data from excel sheet serenediva 1 10,486 03-03-2017, 10:07 AM
Last Post: vinod123
  QTP not reading all properties ishan.mahajan@adp.com 2 2,942 05-04-2016, 10:50 PM
Last Post: supputuri
  DB2 Connect connection with IE 11 SRP 1 3,077 12-18-2015, 12:41 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)