I am trying to access a table and the fetch returns false. I test the sql and is working. The table has a lots of rows that should been returned. There is not any connection error, I already check it. Please help me
Dim conn as AcOracleConnection 'AcDBConnection
Dim stmt as AcDBStatement
Dim cursor as AcDBCursor
Dim Row as Tablebrowser 'table browse is a class that has the structure need to read the row from the database
Set conn = new OracleConnection
conn.connect()
Dim s as string
s="select * from common.byu_report_q"
if conn.isConnected() then
Set stmt = conn.prepare(s)
end if
dim a as String
if stmt is nothing then
a = conn.getSpecificErrorText()
end if
Set cursor = stmt.allocateCursor()
Cursor.BindColumn(2,"NewReportApp::TableBrowser","Text"
Cursor.BindColumn(1,"NewReportApp::TableBrowser","TextType"
Dim i as Integer
i=0
Do while true
Set Row = new Persistent NewReportApp::TableBrowser
if not cursor.fetch(row) then
a = conn.getSpecificErrorText()
exit do
End if
i=i+1
headers.setAt(i,row)
Loop
Dim conn as AcOracleConnection 'AcDBConnection
Dim stmt as AcDBStatement
Dim cursor as AcDBCursor
Dim Row as Tablebrowser 'table browse is a class that has the structure need to read the row from the database
Set conn = new OracleConnection
conn.connect()
Dim s as string
s="select * from common.byu_report_q"
if conn.isConnected() then
Set stmt = conn.prepare(s)
end if
dim a as String
if stmt is nothing then
a = conn.getSpecificErrorText()
end if
Set cursor = stmt.allocateCursor()
Cursor.BindColumn(2,"NewReportApp::TableBrowser","Text"
Cursor.BindColumn(1,"NewReportApp::TableBrowser","TextType"
Dim i as Integer
i=0
Do while true
Set Row = new Persistent NewReportApp::TableBrowser
if not cursor.fetch(row) then
a = conn.getSpecificErrorText()
exit do
End if
i=i+1
headers.setAt(i,row)
Loop