Solved

How to configure Charset using CT library interface

Posted on 2006-11-07
3
379 Views
Last Modified: 2008-02-01
Hi,

We have two different applications that interact with Sybase, one is using the DB library and the other one is using the CT library.

In the DB library when you define the connection there is  function DBSETLCHARSET that allows you to define the CHARSET to be used in the session, we are looking for the equivalent call in the CT Library.

Any ideas?
0
Comment
Question by:Edy1988
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
Jan_Franek earned 100 total points
ID: 17890965
You are probably looking for cs_locale function (usually used with cs_loc_alloc and cs_loc_drop functions and CS_LOCALE structure).

For more info see Client-Library™/C Programmer’s Guide
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ocs_12.5.1.clcprgde/html/clcprgde/title.htm&toc=/com.sybase.help.ocs_12.5.1/toc.xml
0
 

Author Comment

by:Edy1988
ID: 17929863
Hi,

Sorry for the late response, are you sure the CS_LOCALE is the charset defined when you create new Sybase server? (I'm just asking)?

Thanks
Eyal
0
 
LVL 14

Expert Comment

by:Jan_Franek
ID: 17929889
Did I say that CS_LOCALE is charset ? I don't think so.

Did you look at that Programmer's Guide ?

A CS_LOCALE, or locale structure, can be used to specify localization information at the context, connection, command structure, or data element levels.
A CS_LOCALE structure specifies:
    *      A language, character set, and collating sequence
    *      How to represent dates, times, numeric, and monetary values in character format
An application can call the CS-Library routines cs_loc_alloc, cs_locale, and cs_loc_drop to allocate, set values for, and drop a CS_LOCALE structure.

For more information, see the “International Support” topics page in the Open Client Client-Library/C Reference Manual.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

One of the biggest threats in the cyber realm pertains to advanced persistent threats (APTs). This paper is a compare and contrast of Russian and Chinese APT's.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

785 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