[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Long Varchar Field Driving Me Batty in C#!

Posted on 2006-04-17
4
Medium Priority
?
590 Views
Last Modified: 2010-05-18

I’m trying to retrieve a Long Varchar column from a Sybase Adaptive Server Anywhere 9 database in a C# client application using the .NET OleDB libraries.

I’ve tried both OleDBDataReader and OleDBDataAdapter.  I don’t get an error when executing the query, but when attempting to retrieve the Long Varchar field, I get a length of zero from the DB using OleDBDataReader.GetChars, and when attempting to cast into a string, I end up with the empty string.

If I shorten the data in the field to 20 or 30 characters, it works.  But at some threshold, the data is too big and I can’t retrieve the data.  The data I’m trying to retrieve is around 10,000 characters.

Any ideas?
0
Comment
Question by:PegasusAloft
2 Comments
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 100 total points
ID: 16477163
Double-check your driver versions. Older versions may not support more recent additions like large character types. I've seen numerics beyond a certain size truncated in earlier versions of the ASE drivers, for instance.
0
 
LVL 29

Assisted Solution

by:leonstryker
leonstryker earned 100 total points
ID: 16481734
Take a look here for your connections string and it will point you the ASE ADO.NET guide as well:

http://www.carlprothman.net/Default.aspx?tabid=86#AseClientManagedProvider

Leon
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Exchange administrators are always vigilant about Exchange crashes and disasters that are possible any time. It is quite essential to identify the symptoms of a possible Exchange issue and be prepared with a proper recovery plan. There are multiple…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question