informix

IBM Informix driver for NodeJS - Setting environment variables on MacOS

烂漫一生 提交于 2019-12-11 04:27:14
问题 This is a follow on to my original question I am trying to set up IBM's Informix driver for use with NodeJS on MacOS. After viewing the Readme file for the Informix NPM library, I am a little confused as to what the environment variables are and whether I need to apply them all? I managed to track down the install location for the SDK files: Applications/IBM/informix and then added this to the ~/.bash_profile file as so: export INFORMIXDIR=/Applications/IBM/informix export PATH=$PATH:

Informix: How to pass, use and execute multiple values in a single parameter to a stored procedure

和自甴很熟 提交于 2019-12-11 04:24:10
问题 How I Can pass multiple values in a single parameter to a stored procedure in Informix ?. This is a frequent question but I have seen noyhing about informix. I found a post, but it is not working for me, should be the version of the DB or am I missing something? I'm trying this to perform a WHERE X IN (SELECT Y FROM TABLE(PARAM)) Edit: This is an example of what Im trying to do. CREATE PROCEDURE test_hector ( C LIST( SET (CHAR(10) NOT NULL ) NOT NULL) ) RETURNING CHAR(10) AS C, CHAR(10) AS

Informix subqueries with FIRST option

雨燕双飞 提交于 2019-12-11 04:05:38
问题 What is the best way of transcribing the following Transact-SQL code to Informix Dynamic Server (IDS) 9.40: Objective: I need the first 50 orders with their respective order lines select * from (select top 50 * from orders) a inner join lines b on a.idOrder = b.idOrder My problem is with the subselect because Informix does not allow the FIRST option in the subselect. Any simple idea?. 回答1: The official answer would be 'Please upgrade from IDS 9.40 since it is no longer supported by IBM'. That

How to remove all tags and get the pure text?

隐身守侯 提交于 2019-12-11 03:32:56
问题 I had to store the user input text in my database with HTML and CSS formats. The case is: RadEditor ,The user copy the text from MSWord to this editor then i store this text in the database with that format . then when retrieve the data in the report or some label some tags appear wrapping the text !! I use regular expression to remove all the formats but in vain it succeeds sometimes and not all the time . private static Regex oClearHtmlScript = new Regex(@"<(.|\n)*?>", RegexOptions.Compiled

Informix defining an INTERVAL with a parameter

邮差的信 提交于 2019-12-11 03:21:31
问题 I am doing the following in Informix to delete rows more than 20 seconds old. delete from sometable where someDateColumn < (current - interval (20) second to second); However, I want to make the interval configurable in a stored procedure, but I can't do CREATE PROCEDURE i_hate_informix (prm_timeframe int) DELETE sometable WHERE someDateColumn < (current - interval (prm_timeframe) second to second); END PROCEDURE; 回答1: I found the answer myself. Interval can not be defined dynamically with a

INSERT SELECT not working

风流意气都作罢 提交于 2019-12-11 03:18:52
问题 Using Informix 11.7, I'm trying to execute a INSERT SELECT query with jdbc positional parameters in the select statement like this : INSERT INTO table1(id, code, label) SELECT ?, ?, ? FROM table2 WHERE ... Parameters are set like this : stmt.setString(1, "auniqueid"); stmt.setString(2, "code"); stmt.setString(3, "coollabel"); I get the following error : Exception in thread "main" java.sql.SQLException: A syntax error has occurred. When positional parmeters "?" are placed elsewhere it works

Informix (C#): How do I properly set/unset a blob field?

别说谁变了你拦得住时间么 提交于 2019-12-11 03:03:17
问题 IBM Informix SDK: Statement: Update mytable set myblobcolumn = ? where myid = 1; using (IfxConnection conn = GetIfxConnection()) using (IfxCommand cmd = new IfxCommand(updateSql, conn)) { var param = new IfxParameter("myblobcolumn", IfxType.Blob) { IsNullable = true }; cmd.Parameters.Add(param).Value = DBNull.Value cmd.ExecuteNonQuery(); //ERROR [HY000] [Informix .NET provider][Informix]Illegal attempt to use Text/Byte host variable. } If I update it with another IfxBlob object it works fine,

C#: How do I get the ID number of the last row inserted using Informix

你。 提交于 2019-12-11 02:27:47
问题 I am using the Informix.NET driver (C#) to insert a row into a database table. This works fine, except I have no idea how to get the ID of the last inserted row: Insert Command: //Sample Query: "INSERT INTO names (id, name) values (0, 'John Smith');" public static void Insert(String query) { try { using (IFX::IfxConnection connection = ConnectionManager.GetConnection()) { connection.Open(); using (IFX::IfxCommand command = new IFX::IfxCommand(query, connection)) command.ExecuteNonQuery(); if

Installing Informix Client SDK on Raspberry pi

会有一股神秘感。 提交于 2019-12-11 02:15:53
问题 I wanted my raspberry pi to connect to an Informix database thru Python. I tried installing the InformixDB module for python but I get an error as NameError: name 'arch_' is not defined But this is caused because I didn't have an Informix Client SDK installed on the pi which does the underlying work of connecting to the DB and the module is just a wrapper. I searched the IBM downloads but couldn't find the package for ARM architecture. I've also tried the following links but to no good. https