vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, Executing a stored proc on a sybase database via perl that contains double quotes in one or two of the parameters. Ideally, I would like to preserve these double quotes in the database but am getting the following error: DBD::Sybase::st execute failed: Server message number=2402 severity=16 state=2 line=8 server=DAFFYtext=Error converting client characters into server's character set. Some character(s) could not be converted. Would be highly grateful if someone could help me out Thanks, Matt |
| |||
| On Wed, 24 Aug 2005 10:39:41 -0700, Matthew.Blyth wrote: > Hi, > > Executing a stored proc on a sybase database via perl that contains > double quotes in one or two of the parameters. Ideally, I would like to > preserve these double quotes in the database but am getting the > following error: > > DBD::Sybase::st execute failed: Server message number=2402 severity=16 > state=2 line=8 server=DAFFYtext=Error converting client characters into > server's character set. Some character(s) could not be converted. > > Would be highly grateful if someone could help me out > > Thanks, > > Matt Error 2402 Severity 16 Error message text Error converting client characters into server's character set. Some character(s) could not be converted. Explanation This error occurs during insertion of data (insert or bcp) when Adaptive Server fails to convert a character to the required character set. Error 2402 usually occurs for one of the following reasons: * The character exists in the client character set but it does not exist in the Adaptive Server character set. * The character exists in both the client and the Adaptive Server character set, but is represented by a different number of bytes in the client character set than in the Adaptive Server character set. This error occurs during normal processing and it prevents query execution. Action The following options are available for recovering from Error 2402. Change Your Data Modify the incoming data so that it contains characters recognizable by Adaptive Server. Turn Off Character Set Conversion If the error occurs while you are using isql, bcp, or defncopy, you can use the -J (UNIX and PC) or /clientcharset (OpenVMS) command-line option with no character set name to set the client's character set to NULL. If you use this command-line option without specifying a character set name, no conversion takes place and no error message is sent. As a result, some characters sent by the client to the Adaptive Server may not be interpreted correctly by the Adaptive Server and vice versa. (If only 7-bit characters are being handled, no incorrect interpretation will take place.) Otherwise, you can turn off conversion so that characters are sent and received unchanged with the following command: 1> set char_convert off 2> go Turn Off Character Set Conversion Error Reporting You can turn off the printing of error messages with the following command: 1> set char_convert on with no_error 2> go Bytes which cannot be converted are replaced with an ASCII question mark ("?"). Additional information Refer to "Converting Character Sets Between Adaptive Server and Clients" in the System Administration Guide for details about character set conversion. Versions in which this error is raised All versions |
| ||||
| On Wed, 24 Aug 2005 10:39:41 -0700, Matthew.Blyth wrote: > Hi, > > Executing a stored proc on a sybase database via perl that contains double > quotes in one or two of the parameters. Ideally, I would like to preserve > these double quotes in the database but am getting the following error: > > DBD::Sybase::st execute failed: Server message number=2402 severity=16 > state=2 line=8 server=DAFFYtext=Error converting client characters into > server's character set. Some character(s) could not be converted. To expand on what Joop said - the issue may be that your variables/SQL contain the special MS quotes that are known to the default charset used under windows, but aren't understood under iso1 or whatever charset the server runs in... Michael -- Michael Peppler [TeamSybase] mpeppler@peppler.org - http://www.peppler.org/ Sybase DBA/Developer Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html |