|
-
Jul 21st, 2004, 04:46 PM
#1
Thread Starter
Hyperactive Member
why don't I get the data from database?
Dim arParams(1) As OracleClient.OracleParameter
Dim iAuthor As Integer
Dim drresults As OracleClient.OracleDataReader
Dim m_DBNull As Object
iAuthor = 200
arParams(0) = New OracleClient.OracleParameter("P_CURSOR", OracleClient.OracleType.Cursor, 2000, ParameterDirection.Output, True, 0, 0, "", DataRowVersion.Default, m_DBNull)
arParams(1) = New OracleClient.OracleParameter("SUBJECTIDIN", OracleType.Int32, 0, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Default, m_DBNull)
arParams(1).Value = iAuthor
drresults = OracleHelper.ExecuteReader(sConnectionString, CommandType.StoredProcedure, "SEARCH_LISTBYSUBJECT", arParams)
Do While drresults.Read
rchTextbox.Text = rchTextbox.Text + CType(drresults.GetValue(0), String)
Loop
though there is data in the table, the data reader doesn't get populated.
oracle stored proc:
PROCEDURE "SEARCH_LISTBYAUTHOR" (
P_CURSOR OUT NILE_TYPES.NILE_CURSOR,
AUTHOR VARCHAR2
)
AS
LIKEAUTHOR VARCHAR2(100);
BEGIN
LIKEAUTHOR:= AUTHOR || '%';
OPEN P_CURSOR FOR
SELECT BOOKID, BOOKTITLE, AUTHOR, PRICE, RETAIL
FROM PRODUCTS
WHERE AUTHOR = AUTHOR
AND ROWNUM <= 100;
END SEARCH_LISTBYAUTHOR;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|