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
Solved

How to configure Charset using CT library interface

Posted on 2006-11-07
3
382 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

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

Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
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…

828 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