×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ODBC, adLongVarChar not returning

ODBC, adLongVarChar not returning

ODBC, adLongVarChar not returning

(OP)
ODBC, adLongVarChar not returning


Hi,

I'm trying to use VBA with the Remedy ODBC driver to download some
data.  Most of it works fine until I get to a field of type
adLongVarChar.  I use the GetChunk method to return data from it
(since the value propery is always null), but this returns empty most
of the time and only occasionally returns the correct data.

Would anyone here be able to help me?

My code is below.

Thanks,

---------------

Function get_adLongVarChar(sql As String, Conn As ADODB.Connection) As
String

    On Error Resume Next

    Dim RS As ADODB.Recordset
    
    Set RS = New ADODB.Recordset
        
    RS.Open sql, Conn
        
    get_adLongVarChar = RS(0)
  
    RS.Close
    Set RS = Nothing

End Function

Sub test()

    Dim sql As String
    Dim v0
    
    Dim Conn As ADODB.Connection
    Set Conn = New ADODB.Connection
    
    Conn.Open "DSN=RemedyODBC"
    
    sql = "SELECT " & _
        " problem_details " & _
        " FROM Global_Problem_Management " & _
        " WHERE ticket_id='123456'" & _
        " ORDER BY Create_Date DESC" '
       
    v0 = get_adLongVarChar(sql, Conn)
        
    MsgBox v0
    
    Conn.Close
    Set Conn = Nothing

End Sub

RE: ODBC, adLongVarChar not returning

Bakelita, Have you found a sollution to this yet?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close