Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Oracle queries

Status
Not open for further replies.

jjmew

Programmer
Aug 20, 2002
34
US
I have this code and every time that i make a fetch it returns me false, I already tried the Sql and it runs perfect. I check for connection error that it is clean.
I am overriding the Start method of the content.

Table browser is a class defined like that
Class TableBrowser Subclass Of AcDataRow

Dim Text As String
Dim TextType As String

Sub BuildBinding( )
End Sub

End Class


------------------Start Method for the Content--------
Sub Start( )
Super::Start( )

Dim conn as AcOracleConnection 'AcDBConnection
Dim stmt as AcDBStatement
Dim cursor as AcDBCursor
Dim Row as Tablebrowser
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
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
exit do
End if
i=i+1
Loop
End Sub
 
Hi,

I'm not absolutely certain of this,
but I think that you SQL statement:
s= "select *"...

should include the 2 fields that your are binding.

s = "Select field1,field2 from common.byu_report_q"

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top