problem in using memo field with Recordset object

Hello,

When I use recordset object to open a database, after executing one command ( it doesn't differ which command relating to database or not ) the value of field becomes NULL. It's very strange. It's code is like this :

set cnn=createobject("adodb.connection")
cnn.open cnnstring

set rs=createobject("adodb.recordset")
rs.activeconnection=cnn

SQLCommand="select * from test"
rs.open SQLcommand

'hear rs("field1") is NULL and after executing one command rs("field1").value also becomes NULL
a=rs("field1") ' this command is valid
b=rs("field1") ' but this command isn't valid anymore

rs.close
cnn.close

It seems like a bug.I saw another thread in this forum like mine but it wasn't answered.

Thank you very much,
Azadeh

Comments

  • : Hello,
    :
    : When I use recordset object to open a database, after executing one command ( it doesn't differ which command relating to database or not ) the value of field becomes NULL. It's very strange. It's code is like this :
    :
    : set cnn=createobject("adodb.connection")
    : cnn.open cnnstring
    :
    : set rs=createobject("adodb.recordset")
    : rs.activeconnection=cnn
    :
    : SQLCommand="select * from test"
    : rs.open SQLcommand
    :
    : 'hear rs("field1") is NULL and after executing one command rs("field1").value also becomes NULL
    : a=rs("field1") ' this command is valid
    : b=rs("field1") ' but this command isn't valid anymore
    :
    : rs.close
    : cnn.close
    :
    : It seems like a bug.I saw another thread in this forum like mine but it wasn't answered.
    :
    : Thank you very much,
    : Azadeh
    :


    here,read this ..
    http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=80


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion