sybase

Preserve trailing whitespace Sybase

爷,独闯天下 提交于 2019-12-24 17:16:19
问题 I have a big chunk of textual data which I split and write multiple rows of a varchar(255) column of a table. Sometimes, the last character happens to be a space. When I read back this row, the trailing space is chopped and I get only 254 characters. This messes up my data when I append the next row to the end of this one. My code sends the full 255 char (incl space) to the DB API. How can I check that the trailing space is actually written to the table? I am not in a position to rewrite

How to connect to Sybase ASE using JDBC driver and SSL connection

余生长醉 提交于 2019-12-24 13:43:13
问题 I'm trying to establish an SSL connection to a Sybase ASE 15.7 using JDBC driver with no luck. I tried the following options: Using JTDS 1.25 driver (jtds-1.2.5.jar) With the following connection string: jdbc:jtds:sybase://host:port;databaseName=dbname;ssl=request I got Network error IOException: Connection refused Using Jconnect 4 (jconn4.jar) with the following connection string: jdbc:sybase:Tds:host:port/dbname?ENABLE_SSL=true I got java.sql.SQLException: JZ00L: Login failed. Examine the

How do I execute PreparedStatement(select object_id()) in sybase iq?

让人想犯罪 __ 提交于 2019-12-24 12:53:41
问题 We have a small jdbc application that talks to sybase iq database which does: String objectName = "SYS.SYSWEBSERVICE"; //The actual value of objectName does not matter. //It could be any view object in the sys schema PreparedStatement preparedStatement = connection.prepareStatement("SELECT OBJECT_ID(?)"); preparedStatement.setString(1, objectName); preparedStatement.executeQuery(); We are getting this error: java.sql.SQLException: JZ0SA: Prepared Statement: Input parameter not set, index: 0.s

windows下SYBASE 15.5 备份出现连接SYB_BACKUP的问题解决

随声附和 提交于 2019-12-24 10:17:05
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 出现以上问题主要是因为SYBASE的发布包的一个BUG,即发布包添加的备份服务器和数据库中配置的不正确。 1.检查你的interfaces文件,winodws下是INI文件,文件位置在sybase安装目录/ini/sql.ini,假设你的服务器名xxx: [xxx_XP] master=NLWNSCK,xxx,5004 query=NLWNSCK,xxx,5004 [xxx] master=NLWNSCK,xxx,5000 query=NLWNSCK,xxx,5000 [xxx_BS] master=NLWNSCK,192.168.1.2,5001 query=NLWNSCK,192.168.1.2,5001 [xxx_MS] master=NLWNSCK,xxx,5002 query=NLWNSCK,xxx,5002 [ws] master=NLWNSCK,xxx,8183 query=NLWNSCK,xxx,8183 备份服务器,也就是xxx_BS,用IP 地址能解决问题。 来源: oschina 链接: https://my.oschina.net/u/3194172/blog/3146500

How to select specific element in Powerbuilder window using HP UFT

╄→尐↘猪︶ㄣ 提交于 2019-12-24 09:10:12
问题 I am trying to record/automate an application developed in Sybase' Powerbuilder. I am currently using HP UFT v12.54. Using the default recording process, the object spy is only seeing the area on my PB Window, not the specific field/dropdown. In short, I am unable to select a specific object in the window. Please see the following image: I am trying to select the Authorized Signatory field, but instead, UFT does not see the specific element, but the field area Customer Data instead. UFT just

How can I show the zero at the starting of a number in SQL/Sybase?

故事扮演 提交于 2019-12-24 09:10:06
问题 I want to put two totally different numbers like 01234567890 and 1234567890 So I made this code on SQL/Sybase create table DOCTORS( document bigint not null , ); GO Insert into DOCTORS values(CONVERT(INT, '01234567890')) Insert into DOCTORS values(CONVERT(INT, '1234567890'))' But when I do a select , it shows me: document -------- 1234567890 ---------- 1234567890 instead of document -------- 01234567890 ---------- 123456789 回答1: BIGINT values represent a spot on the number line. 1234567890 =

Using Charindex to get data left of a character

社会主义新天地 提交于 2019-12-24 09:07:29
问题 I have a field called subjects and the data looks like this: ALJ Diane Davis - WCF I want my end result to be: ALJ Diane Davis I am trying to get all the data to left of the "-" I am using Advantage SQL which I am new too. The example below using the RIGHT function gets me everything to the right which works if i wanted that, but i dont always know the exact number of characters for the way that i am wanting my data to end up like. Thanks in advance left(appts.subject,charindex('-',appts

Installing DBD::Sybase on OS X with Homebrew fails to find freetds libraries

拜拜、爱过 提交于 2019-12-24 08:28:59
问题 I am installing DBD::Sybase I receive following error, after setting export SYBASE=/usr/local/Cellar/freetds/0.95.80 and download freetds: brew install freetds Error: Configuring DBD-Sybase-1.15 ... Can't find any Sybase libraries in /usr/local/Cellar/freetds/0.95.80/lib or /usr/local/Cellar/freetds/0.95.80/lib64 at Makefile.PL line 155, <IN> line 44 I believe I need to edit the makefile directly. Do I need to edit makefile? And could I use CPANM still. CPANM is under Brew (cellar). /usr

Rounding returned float values from a DB to their 'correct' values

喜夏-厌秋 提交于 2019-12-24 05:07:45
问题 I've got a database column that contains (for some reason lost in the midst of time) float values. So, someone populates a DB table with some small value, say 0.00025, and when I run a report I actually get back 0.000249999999....or somesuch, due to the inability to represent the entered value. Is there any reliable way to take the float value and convert back to what was originally entered? DB is Sybase. 回答1: Is there any reliable way to take the float value and convert back to what was

Error while extracting data from Sybase using OLE DB in SSIS

怎甘沉沦 提交于 2019-12-24 04:44:08
问题 I am having problems extracting data from Sybase using Advantage 11 OLE DB Provider in SSIS (2017). I can connect to the database, see the list of tables, and, when selecting a table as a data source I can see the columns. However, when I click Preview (or run the data flow task), I get this error: The provider cannot derive parameter information from the command. Use SetParameterInfo. (Advantage OLE DB Provider) I am using no parameters, my Data Access mode is set to Table or View (see