PDA

View Full Version : Excel VBA - retrieve Sybase TEXT data type



lovely_idiot
05-23-2010, 10:34 PM
Hi everyone,
I’m having a problem with TEXT Data Type in Sybase. (TEXT is used to store “REMARKS” which may be very long)
I have this TEST1 table for testing:

create table TEST1 (
DATE datetime,
REMARKS text
)
(1) I am able to insert some string into the “REMARKS” field but not retrieve it using "select"(Please refer to attached).
The button only attempt to display the “REMARKS” and “DATE” in “TEST1” which already has some records.
? Runtime error at the following line: ODBC--Call failed!

MsgBox "Test record: " & rstRtn("REMARKS") & " - " & rstRtn("DATE"), vbInformation + vbOKOnly, "Testing"
Any ideas how to overcome this?
(2) I am able to insert each profile name into a single line into the “REMARKS” filed.
However, retrieving the profile names line by line (to write to different rows in Excel spreadsheet) is going to be tough (Only after (1), is answered and I am able to get rstRtn("REMARKS"), of course :D).
Any ideas?
Thanks for any help :)