Solved

How to configure Charset using CT library interface

Posted on 2006-11-07
3
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Invest in your employees with these five simple steps to improve employee engagement and retention.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

732 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