borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Find record, multiple result) New Topic New Poll Post Reply
AndreaVB Forum : Database : Rdo.rdoColumns("ColumnName")
Poster Message
Luneshkhot
Level: Trainee

Registered: 18-01-2008
Posts: 1

icon 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]

18-01-2008 at 07:11 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : Rdo.rdoColumns("ColumnName")
Next Topic (Find record, multiple result) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder