Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2010, 01:52 AM
Registered User
 
Join Date: May 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel VBA - retrieve Sybase TEXT data type

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:
Code:
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!
Code:
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 :)
 
Old May 24th, 2010, 08:49 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

Not sure why the error comes from this code.

Can you check in immediate window the content of RecordSet 'rstRtn' , this might provide you with some hint.

If not can you post some more code for us to understand

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot retrieve string data in CSV and Excel files ajimi VBScript 13 March 19th, 2008 09:59 AM
how to read data from sybase to excel thillaiarasu SQL Language 2 April 20th, 2007 01:34 AM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM
Determining data type from Excel gbuller VB How-To 1 September 1st, 2004 08:57 AM
import data from text file to excel(VBA) topr Excel VBA 2 August 26th, 2004 11:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.