informix

Connect to informix database windows form application

こ雲淡風輕ζ 提交于 2019-12-11 08:44:16
问题 I am trying to figure out how to connect to an IBM informix database. I have been doing some research and have found some threads from 5 years ago but those examples are not working. I have installed the latest SDK from IBM for informix. I have included the IBM.Data.Informix.dll to my references in my project. I have included the using IBM.Data.Informix; I am just adding a button and on click testing the conenction. I always get this debug error "SQL0035N The file "C:\Users\Adam\documents

Informix procedure — how to return an empty table?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 08:38:57
问题 I need to create an Informix procedure to return a table with rows if I found some value and an empty table if no value found. I know how to return a table with rows, but I don't know how to return the empty table; can anyone help? CREATE row type AType ( id VARCHAR(255), name VARCHAR(255) ); CREATE PROCEDURE getmeasurement (p_date DATETIME YEAR TO SECOND) RETURNING MULTISET(AType NOT NULL); DEFINE AType_TABLE MULTISET (AType NOT NULL); DEFINE v_id VARCHAR(255); DEFINE v_name VARCHAR(255); ..

SE: 'bcheck -y' anomaly

做~自己de王妃 提交于 2019-12-11 08:17:04
问题 ISQL-SE 4.10.DD6 (DOS 6.22): My app has the following SQL script (CODE REVIEW) which my users exec at end of business day to reorg the transaction table: DATABASE dbfiles; UNLOAD TO "U:\UNL\ACTIVES.UNL" SELECT * FROM transaction WHERE trx_type IN ("E","I","C","P") ORDER BY trx_cust_fullname, trx_last_pymt; UNLOAD TO "U:\UNL\INACTIVES.UNL" SELECT * FROM transaction WHERE trx_type IN ("F","R","T","X","V") ORDER BY trx_cust_fullname, trx_last_pymt DESC; DROP TABLE transaction; CREATE TABLE

How to use transactions in Informix CSDK and OIC++

时光总嘲笑我的痴心妄想 提交于 2019-12-11 08:07:18
问题 I'd need some advice how to handle transactions with Informix CSDK and OIC++. conn is a open connection object. Select works find. The database here is setup with logging — as I found out while update stmt on its own does nothing. Here's what I tried: conn.SetTransaction( ITConnection::BEGIN ); qtext = "UPDATE transit_kunde_s SET erledigt='Y' WHERE transitkunde='"+ts+"'"; cout << qtext << endl; code = query_up.ExecForStatus(qtext.c_str()); cout << "code " << code << endl; conn.SetTransaction(

How to convert SQL from old Informix-style to ANSI-style?

喜夏-厌秋 提交于 2019-12-11 08:06:40
问题 I have some queries written in Informix-style SQL. Specifically, this query selects the items in a customer's order. (I've simplified the table structure somewhat, though I kept the part that is problematic.) SELECT ordi.line_no, ordi.item_code, ordi.desc, ordi.price, shpi.location, shpi.status, shpi.ship_code, box.box_no, box.tracking_no, shpc.ship_co, mfr.mfr_name, sum(shpi.ship_qty), sum(shpi.net_cost) FROM order_items ordi, ship_items shpi, OUTER ship_boxes box, shipping_companies shpc,

SQL query error with ODBC connection in R using Informix driver

喜夏-厌秋 提交于 2019-12-11 08:04:49
问题 With functionality from the RODBC package, I have successfully created an ODBC but receive error messages when I try to query the database. I am using the INFORMIX 3.31 32 bit driver (version 3.31.00.10287). channel <- odbcConnect("exampleDSN") unclass(channel) [1] 3 attr(,"connection.string") [1] "DSN=exampleDSN;UID=user;PWD=****;DB=exampleDB;HOST=exampleHOST;SRVR=exampleSRVR;SERV=exampleSERV;PRO=onsoctcp ... (more parameters)" attr(,"handle_ptr") <pointer: 0x0264c098> attr(,"case") [1]

Reading date only with PL/SQL from datetime field , from informix database

孤人 提交于 2019-12-11 08:00:14
问题 I am having problem reading only the date with PL/SQL. The field that i want to read is datetime and its name is last_updated. I am doing comparation between oracle and informix databases and thats why i am using pl/sql. I have a query that looks and must work and its like this: select to_date("last_updated", 'dd/mm/YYYY') from "smetka"@informix This query is returning results, and it dont gives any error, but the format of the date is like this 30.06. 0 014 and must be 30.06. 2 014 回答1: You

Informix trigger to change inserted values

我的未来我决定 提交于 2019-12-11 07:17:44
问题 I would like to change a couple of column values before they get inserted. I am using Informix as database. I have a table consisting of 3 columns: Name (NVARCHAR), Type (INT), Plan (NVARCHAR). Every time a new record is inserted, I would like to check the Name value before inserting it. If the Name starts with an F, I would like to set the Type value to 1 and the Plan Name to "Test" In short, what I want the trigger to do is: For every new insertion, first check if Name value starts with F.

Update referencing another table

前提是你 提交于 2019-12-11 06:55:04
问题 I have a statement that needs writing (with generic names for stuff, since this is for work) to update a column 'updCol' in table 'tUpd'. tUpd also has a column 'linkCol' which is present in another table tOther. tOther has another column 'idCol'. My problem is to update the updCol value of rows in tUpd which correspond via linkCol to rows with a given idCol value. One solution I think should work is the following; update tUpd set updCol = XXX where exists ( select idCol from tOther where

IBM Informix-SQL syntax error, basic query from Microsoft BIDS to Cisco UCCX database

落花浮王杯 提交于 2019-12-11 06:26:22
问题 I'm running the below query against an IBM Informix database and getting an ERROR 42000: A syntax error has occurred . The FROM and WHERE clauses run fine in other queries, so I'm looking at the SELECT and GROUP BY portions. Any ideas what's wrong with the syntax? SELECT COUNT(DISTINCT "informix".agentconnectiondetail.sessionid) AS calls_abandoned, DAY("informix".agentconnectiondetail.startdatetime) AS Expr2 FROM "informix".agentconnectiondetail, "informix".contactqueuedetail, "informix"