P Penfound Active Member Licensed User Longtime User May 25, 2012 #1 I am trying to get a DB app to function correctly but keep getting a java exception stating that the cursor has to be initialized first. I can't find a property to initialize the cursor can anyone help please? Here is the code where the problem is reported. Sub GetStudy DBSCursor=SQLStudies.ExecQuery(StudySQLText) DBSCursor.Position=i y = DBCursor.RowCount If i <= y Then ID=i lblTitle.text = " " & DBSCursor.GetString("Title") lblResearcher.text = " " & DBSCursor.GetString("Researcher") lblAim.text = " " & DBSCursor.GetString("Aim") lblConclusion.text = " " & DBSCursor.GetString("Conclusion") lblArea.text = " " & DBSCursor.GetString("AreaType") i=DBSCursor.Position+1 DBSCursor.Close End If End Sub the DBSCursor has been dimmed in the Process Globals section as a cursor.
I am trying to get a DB app to function correctly but keep getting a java exception stating that the cursor has to be initialized first. I can't find a property to initialize the cursor can anyone help please? Here is the code where the problem is reported. Sub GetStudy DBSCursor=SQLStudies.ExecQuery(StudySQLText) DBSCursor.Position=i y = DBCursor.RowCount If i <= y Then ID=i lblTitle.text = " " & DBSCursor.GetString("Title") lblResearcher.text = " " & DBSCursor.GetString("Researcher") lblAim.text = " " & DBSCursor.GetString("Aim") lblConclusion.text = " " & DBSCursor.GetString("Conclusion") lblArea.text = " " & DBSCursor.GetString("AreaType") i=DBSCursor.Position+1 DBSCursor.Close End If End Sub the DBSCursor has been dimmed in the Process Globals section as a cursor.
klaus Expert Licensed User Longtime User May 25, 2012 #2 Try to Dim the cursor in the routine. Code: Sub GetStudy Dim DBSCursor As Cursor DBSCursor=SQLStudies.ExecQuery(StudySQLText) Best regards. Upvote 0
Try to Dim the cursor in the routine. Code: Sub GetStudy Dim DBSCursor As Cursor DBSCursor=SQLStudies.ExecQuery(StudySQLText) Best regards.
P Penfound Active Member Licensed User Longtime User May 25, 2012 #3 Thanks Thank you it helped me find my way through that one. Till next time Upvote 0