Luneshkhot Level: Trainee
 Registered: 18-01-2008 Posts: 1
|
Rdo.rdoColumns("ColumnName")
Hi there people!
I'm working in VB 6, using an RDO control to connect to an Oracle 9i database (ODBC Driver is: Microsoft ODBC driver for oracle).
i am using the following code:
lssql = "select rpad(ipr_symbol, 10, ' ')ipr_symbol,ipr_series from ipo_master where ipr_id = '" & companyid(Counter) & "'"
Set mrssymbol = rdoIPOObj.QueryResults(lssql)
If mrssymbol.EOF <> True And mrssymbol.BOF <> True Then
If IsNull(mrssymbol.rdoColumns("IPR_SYMBOL")) Then
lblErrMsg.Caption = "Symbol not present for the security"
Exit Sub
Else
Iposymbol = mrssymbol.rdoColumns("IPR_SYMBOL")
End If
Problem:
mrssymbol.rdoColumns("IPR_SYMBOL") fetches correct data from DB .So execution goes through mrssymbol.EOF <> True And mrssymbol.BOF <> True and IsNull(mrssymbol.rdoColumns("IPR_SYMBOL")) but after sometime its value becomes null and that too automatically so, mrssymbol.rdoColumns("IPR_SYMBOL") becomes null and i get Runtime error 94 at Iposymbol = mrssymbol.rdoColumns("IPR_SYMBOL") statement. Every time i run this code i get the same problem. The data in the table is static so the value cannot become null.
If I remove rpad from lssql then the problem of mrssymbol.rdoColumns("IPR_SYMBOL") automatically becoming null, doesnt come.
I am sure that this error has something to do with database but i am not able to pin point it.
Any help would be appreciated!
[Edited by Luneshkhot on 18-01-2008 at 12:21 PM GMT]
|