| Below is the latest content available from this feed: Re: .NET Provider Unknown SQL Type - 0
Posted by: light.kuragari@gmail.com (MARCO PéREZ) - Wed, 01 Sep 2010 02:39:55 EDT
Hi Jonathan, first of all, thank you for your response, and yes, you're right in your assumption.
I've been developing for a government company that still relies on Informix Dynamic Server 9.4, so i can't take advantage of IBM's new drivers. Last year they said they were planning on upgrading their server, but i don't see that coming anytime soon.
Anyway, I kept testing and found out that with the 3.5 driver i can successfuly call the stored procedure, with it's parameters, as long as I specify that the string parameters ar of IfxType Char instead of the Default Varchar; but there is still one problem.
It turns out the resulting table i get from the stored procedure doesn't have the corresponding column names, they just are "Column 1", "Column 2", etc.
If i execute the query as a Text command with parameters (execute function mystoredproc(?,?)) i get the same result, but if i execute the query without using parameters (execute function mystoredproc('DG',1)) then all behaves correctly and i get properly named columns in my result set (DataSet).
I guess I'm going to have to take the ugly concatenated query approach.
What i find strange is that i can use parameters in a normal query that does not involve a call to a stored procedure.
Well... if anyone knows something, please share your knowledge.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [631]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: .NET Provider Unknown SQL Type - 0
Posted by: jleffler.iiug@gmail.com (Jonathan Leffler) - Wed, 01 Sep 2010 02:11:44 EDT
I assume there is a good reason why you are using a product that is no longer supported (IDS 9.40 has been out of support for a while; 10.00 goes out of support at the end of September 2010.)
2010/8/31 MARCO PéREZ <light.kuragari@gmail.com>
> Hi all, I've been dealing with this problem for several days now, i've > googled > and searched bt nothing. > > I am connecting to an Informix Dynamic Server 9.4 Database, and i'm doing > so > through the .NET Provider that comes in CSDK 3.0 TC3. I know there's the > 3.5 > version, but i'm using v3 because in the docs it says that v3.5 supports > dynamic server 10.0 up, and v3's docs say that it supports from 9.3. > > I want to call a stored procedure that accepts a char(2), and an integer as > parameters, and returns a table consisting of char(2), char(2), char(1) and > char(60). > > This is the code i use to call the stored procedure (after i open my > connection): > > I don't know enough to be able to help. With Informix, type 0 is usually CHAR - using the native type numbers. However, the World of .NET may have other views on the valid type numbers. The .NET provider should handle it. It may be a fixed bug in the more recent providers - but using that probably requires a server upgrade too.
> =======================================================CODE: > > object[] parametros = new object[]{"DG",1}; > > IfxDataAdapter adaptador = new IfxDataAdapter(); > > adaptador.SelectCommand = connection.CreateCommand(); > > adaptador.SelectCommand.CommandText = "mystoredproc"; > > adaptador.SelectCommand.CommandType = CommandType.StoredProcedure; > > //Add parameters > > if (parametros != null) > > { > > foreach (object parameter in parametros) > > { > > IfxParameter dbparam = new IfxParameter(); > > if (dbparam.Value.GetType() == typeof(string)) > > { > > dbparam.IfxType = IfxType.Char; > > } > > adaptador.SelectCommand.Parameters.Add(dbparam); > > } > > } > > try > > { > > adaptador.Fill(mDataSet); > > } > =================================================================== > > 1.- As you can see, i'm forcing the use of IfxType.Char, since the provider > automatically maps the type to varchar, but even if i assign it like this, > it > stays as varchar. > > 2.- I've also done this by assigning the corresponding parameterName to > each > parameter, with the names they were defined in the stored procedure's > parameter definition section. > > 3.- THE PROBLEM comes when executing adaptador.Fill(mDataSet); it throws an > exception that says Unknown SQL Type - 0. > > I've also tried this by first using IfxCommandBuilder.DeriveParameters on > adaptador.SelectCommand, and it populates the parameters (although it adds > an > extra RETURN parameter at the beginning and an extra "Parameter 1" > parameter > at the end, so i removed them) but the same exception is thrown at > adaptador.Fill() > > Could someone please help me with this? I have to finish this project but > have > been days trying different things with no success. > > > > > > >
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.
--0016361e84a8608421048f2c91b2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [630]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
.NET Provider Unknown SQL Type - 0
Posted by: light.kuragari@gmail.com (MARCO PéREZ) - Tue, 31 Aug 2010 18:07:43 EDT
Hi all, I've been dealing with this problem for several days now, i've googled and searched bt nothing.
I am connecting to an Informix Dynamic Server 9.4 Database, and i'm doing so through the .NET Provider that comes in CSDK 3.0 TC3. I know there's the 3.5 version, but i'm using v3 because in the docs it says that v3.5 supports dynamic server 10.0 up, and v3's docs say that it supports from 9.3.
I want to call a stored procedure that accepts a char(2), and an integer as parameters, and returns a table consisting of char(2), char(2), char(1) and char(60).
This is the code i use to call the stored procedure (after i open my connection):
=======================================================CODE:
object[] parametros = new object[]{"DG",1};
IfxDataAdapter adaptador = new IfxDataAdapter();
adaptador.SelectCommand = connection.CreateCommand();
adaptador.SelectCommand.CommandText = "mystoredproc";
adaptador.SelectCommand.CommandType = CommandType.StoredProcedure;
//Add parameters
if (parametros != null)
{
foreach (object parameter in parametros)
{
IfxParameter dbparam = new IfxParameter();
if (dbparam.Value.GetType() == typeof(string))
{
dbparam.IfxType = IfxType.Char;
}
adaptador.SelectCommand.Parameters.Add(dbparam);
}
}
try
{
adaptador.Fill(mDataSet);
} ===================================================================
1.- As you can see, i'm forcing the use of IfxType.Char, since the provider automatically maps the type to varchar, but even if i assign it like this, it stays as varchar.
2.- I've also done this by assigning the corresponding parameterName to each parameter, with the names they were defined in the stored procedure's parameter definition section.
3.- THE PROBLEM comes when executing adaptador.Fill(mDataSet); it throws an exception that says Unknown SQL Type - 0.
I've also tried this by first using IfxCommandBuilder.DeriveParameters on adaptador.SelectCommand, and it populates the parameters (although it adds an extra RETURN parameter at the beginning and an extra "Parameter 1" parameter at the end, so i removed them) but the same exception is thrown at adaptador.Fill()
Could someone please help me with this? I have to finish this project but have been days trying different things with no success.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [629]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: Problem with OpenAdmin Tool
Posted by: domusonline@gmail.com (Fernando Nunes) - Thu, 05 Aug 2010 07:38:07 EDT
Check your name resolution environment on the host where OAT is running. 930 usually means it cannot convert the hostname of your INFORMIXSERVER into an IP address. For testing purposes try to configure your connection using the IP address instead of the hostname.
Regards.
On Thu, Aug 5, 2010 at 11:59 AM, MARCELO CALUORI <mcaluori@hotmail.com>wrote:
> I have an error when I try connect to database with OAT Tool > > SQLSTATE=08004, SQLDriverConnect: -930 [Informix][Informix ODBC > Driver][Informix]Cannot connect to database server (linux001). > > The server its OK. All the environment too. > > I don't know what happens !! > > Anybody know something about this problem ? > > Thank's a lot > > Marcelo > > > > > > >
-- Fernando Nunes Portugal
http://informix-technology.blogspot.com My email works... but I don't check it frequently...
--00163630eab58156b7048d11fbc2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [628]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Problem with OpenAdmin Tool
Posted by: mcaluori@hotmail.com (MARCELO CALUORI) - Thu, 05 Aug 2010 06:59:05 EDT
I have an error when I try connect to database with OAT Tool
SQLSTATE=08004, SQLDriverConnect: -930 [Informix][Informix ODBC Driver][Informix]Cannot connect to database server (linux001).
The server its OK. All the environment too.
I don't know what happens !!
Anybody know something about this problem ?
Thank's a lot
Marcelo
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [627]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: Refreshing updated row fetched by a scroll....
Posted by: art.kagel@gmail.com (Art Kagel) - Wed, 07 Jul 2010 12:56:59 EDT
The only downside to Jonathan's suggestion, which is also true of your original scroll cursor, is that any rows deleted by this session or even by other users will remain in the scroll cursor and, in the case of Jonathan's key-only version, will return an error when you try to fetch the actual data. Similarly rows inserted by this or other sessions will never appear in the scroll cursor's listing unless you refresh it by closing and reopening it. My suggestion is also similarly affected, but since you will be refreshing the array contents more often, and can manually add and delete rows from the array, it's less of an issue. Something to keep in mind though whenever you are working with a more static image of your data than a live non-scroll cursor.
Art
Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
On Wed, Jul 7, 2010 at 12:39 AM, Jonathan Leffler <jleffler.iiug@gmail.com>wrote:
> On Fri, Jul 2, 2010 at 02:24, RAVI PASUPULETI <rpasupul@gmail.com> wrote: > > > I opened a 'SCROLL CURSOR', fetching the rows one by one and displaying > one > > at > > a time on a screen. When I update a row, save it, move to the next row > and > > come back I would like to see the changes made. The fetch is not getting > > the > > updated row but the old information. How can I see the actual current db > > values on the screen ? > > > > Art has given you one answer; here is another... > > The classic way to do this was to keep only the primary key information in > the scroll cursor, and when you fetch a key, you then fetch the current > data > with a separate cursor driven by the primary key. This guarantees the > freshness of all the data unless you are updating the primary key columns > (which is generally, but not always,not a good idea). > > This is essentially what ISQL Perform does behind the scenes - except it > uses ROWID rather than a user-defined primary key. > > -- > Jonathan Leffler #include <disclaimer.h> > Email: jleffler@earthlink.net, jleffler@us.ibm.com > Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ > "Blessed are we who can laugh at ourselves, for we shall never cease to be > amused." > NB: Please do not use this email for correspondence. > I don't necessarily read it every week, even. > > --0050450168c874b91e048ac4bf68 > > > > > > >
--0016364573d041aa05048acf0ee9
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [626]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: informix se update money via jdbc
Posted by: jleffler.iiug@gmail.com (Jonathan Leffler) - Wed, 07 Jul 2010 00:40:01 EDT
On Thu, Jul 1, 2010 at 08:41, JIM MIANI <miani@icanon.com> wrote:
> We've recently upgraded a few sites on standard engine from version > 7.24.UC5 > to 7.25.UC6R1. We use JDBC to interact with the database and we've > encountered > a serious bug. On the later version, any update to a database field of type > Money(16,2) where the value you are trying to assign is between -.50 and > .50 > (non-inclusive), if you are using an UPDATE PreparedStatement and assign > the > value using setBigDecimal or setFloat - the value actually assigned in the > database is zero. The code snippet below can show the problem (I can give > full > source if anyone wants). I've tried the latest JDBC driver from IBM and > still > have the same issue. I've found a workaround - to use setString instead of > setBigDecimal [...] >
Have you reported the problem to IBM Technical Support? If not, please do so.
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.
--002215048e77ff9aee048ac4c219
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [625]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: Refreshing updated row fetched by a scroll....
Posted by: jleffler.iiug@gmail.com (Jonathan Leffler) - Wed, 07 Jul 2010 00:39:01 EDT
On Fri, Jul 2, 2010 at 02:24, RAVI PASUPULETI <rpasupul@gmail.com> wrote:
> I opened a 'SCROLL CURSOR', fetching the rows one by one and displaying one > at > a time on a screen. When I update a row, save it, move to the next row and > come back I would like to see the changes made. The fetch is not getting > the > updated row but the old information. How can I see the actual current db > values on the screen ? >
Art has given you one answer; here is another...
The classic way to do this was to keep only the primary key information in the scroll cursor, and when you fetch a key, you then fetch the current data with a separate cursor driven by the primary key. This guarantees the freshness of all the data unless you are updating the primary key columns (which is generally, but not always,not a good idea).
This is essentially what ISQL Perform does behind the scenes - except it uses ROWID rather than a user-defined primary key.
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.
--0050450168c874b91e048ac4bf68
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [624]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: Refreshing updated row fetched by a scroll....
Posted by: art.kagel@gmail.com (Art Kagel) - Fri, 02 Jul 2010 07:43:08 EDT
That's because a SCROLL CURSOR actually creates a temp table with the query results and returns data from the temp table which has not been updated. The temp table is needed to be able to implement the FETCH FIRST, LAST, NEXT and PREVIOUS features of a SCROLL CURSOR. But you don't need a SCROLL CURSOR to implement this logic, especially since 7.31/9.30 implemented the FIRST and SKIP options to the SELECT statement. Just a bit of programming.
If you want to see updated data on the display, I would fetch a block of data from a non-scrolling CURSOR into an array and display rows from that array instead. Then when the user updates the rows in the array, you will have the updated data to redisplay as the user scrolls around. You can use a sliding window of data where the array holds say 100 rows. As long as the user is scrolling within those 100 rows you are good. If the user wants to scroll outside of the array, say to the 101st row, move the 51st through 100th rows to the beginning of the array and fetch the next 50 from the cursor to the end of the array. If the user later scrolls back past row 50 to row 49 or lower, slide rows 50-100 back up the array and close and reopen the cursor to replace the first 50 rows in the array. You can use FIRST and SKIP to manage the number and subset of rows in the select set that are returned by the cursor. Your data will always be up-to-date because you will either be displaying the modified row from your array or after scrolling around a refetched updated version of the row from the database. Just make sure that your SELECT statement has an ORDER BY clause so that the returned result sets are consistently ordered whenever you close and reopen the cursor. Remember that the SQL standard permits the optimizer to return data in any order it finds it without an ORDER BY clause and the optimizer can change the query plan, especially if there are replaceable parameters in the query, between executions.
I've written many apps like this over the years and it is a very good technique and very easy to implement if you set up the array management data structures properly and modularize the code to slide and populate the array. A colleague dubbed the technique "The Electric Slide" once after I'd written one of the beasties when that dance was popular - way back. ;-)
Art
Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
On Fri, Jul 2, 2010 at 5:24 AM, RAVI PASUPULETI <rpasupul@gmail.com> wrote:
> Hi, > I opened a 'SCROLL CURSOR', fetching the rows one by one and displaying one > at > a time on a screen. When I update a row, save it, move to the next row and > come back I would like to see the changes made. The fetch is not getting > the > updated row but the old information. How can I see the actual current db > values on the screen ? > Thank you, > RKP > > > > > > >
--0016361644c9e4674f048a6616c8
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [623]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Refreshing updated row fetched by a scroll cursor
Posted by: rpasupul@gmail.com (RAVI PASUPULETI) - Fri, 02 Jul 2010 05:24:25 EDT
Hi, I opened a 'SCROLL CURSOR', fetching the rows one by one and displaying one at a time on a screen. When I update a row, save it, move to the next row and come back I would like to see the changes made. The fetch is not getting the updated row but the old information. How can I see the actual current db values on the screen ? Thank you, RKP
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [622]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
informix se update money via jdbc
Posted by: miani@icanon.com (JIM MIANI) - Thu, 01 Jul 2010 11:41:05 EDT
We've recently upgraded a few sites on standard engine from version 7.24.UC5 to 7.25.UC6R1. We use JDBC to interact with the database and we've encountered a serious bug. On the later version, any update to a database field of type Money(16,2) where the value you are trying to assign is between -.50 and .50 (non-inclusive), if you are using an UPDATE PreparedStatement and assign the value using setBigDecimal or setFloat - the value actually assigned in the database is zero. The code snippet below can show the problem (I can give full source if anyone wants). I've tried the latest JDBC driver from IBM and still have the same issue. I've found a workaround - to use setString instead of setBigDecimal - but I am curious if this is a known problem, or if there is any fix out there or a better solution I haven't found.
String sql = "SELECT id_unpaid FROM ad_inv_detl WHERE db_rowid = ?";
PreparedStatement sstmt = con.prepareStatement(sql);
sql = "UPDATE ad_inv_detl SET id_unpaid = ? WHERE db_rowid = ?";
PreparedStatement ustmt = con.prepareStatement(sql);
ustmt.setBigDecimal(1,amt);
ustmt.setInt(2, dbid);
ustmt.executeUpdate();
sstmt.setInt(1, dbid);
ResultSet rs = sstmt.executeQuery();
if(rs.next())
System.out.println("new unpaid amt:" + rs.getString(1));
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [621]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: How to use construct statement with formonly f
Posted by: jleffler.iiug@gmail.com (Jonathan Leffler) - Thu, 01 Jul 2010 02:33:20 EDT
On Thu, Jun 24, 2010 at 05:59, RAVI PASUPULETI <rpasupul@gmail.com> wrote:
> Had the construct and input statement one after the other. Everything is > working as per your logic, except that once we come back to the construct > statement from the INPUT statement in the loop, the values entered for the > Construct are being lost and the screen gets blanked off. Can you help here > for us to be able to retain the values for the construct statement ? >
Art suggested BEFORE FIELD and AFTER FIELD clauses; an alternative is BEFORE CONSTRUCT and AFTER CONSTRUCT. You can use GETFLDBUF() to collect the values in the CONSTRUCT - save them in strings; you then display the saved values in the BEFORE CONSTRUCT to initialize the fields.
Another possible way to do your operation - mixing Y/N values for certain parts with regular CONSTRUCT queries - is to give the columns to which the FORMONLY fields are mapped distinctive names. You can then post-process the string generated by the CONSTRUCT statement - analyze it for what you want. I've used the analysis technique to join different sets of tables depending on where the user entered search queries, for example: there was a core table (about ships), but if the user expressed a condition about a secondary table (about inspections of the ship), then I would write the SELECT statement to join with the inspections table, but I'd leave that table out if there was no such condition.
You could adapt this by looking for the distinctive names, and deciding how to process the condition that the user specified for that column. Remember that the user could write '>A' or 'J:Z' or a number of other conditions into the 'Y/N' field; you would probably want to look for 'magic.column ... and ' where you don't care what the ' ... ' part is, and you'd remove that from the string, but interpret it as meaning 'include something from other tables as if the user typed Y in the field'. You might look for "= 'N'" and leave that as meaning 'N'. It isn't perfect, but it might be easier than wrapping a CONSTRUCT and an INPUT in a loop -- how does the user say "enough is enough - go execute my query"?
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.
--0016369c8ab23c4150048a4da5ce
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [620]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: External Java program execution from Infor....
Posted by: jleffler.iiug@gmail.com (Jonathan Leffler) - Thu, 01 Jul 2010 02:23:12 EDT
On Thu, Jun 24, 2010 at 21:07, TRIDIB BOLAR <tridib.bolar@gmail.com> wrote:
> I am going to design a batch framework where the batch configuration data > should be in the Informix 5 database and the batch scheduler is basically a > Java Quartz program. I am going to trigger the Java program from the > Informix > DB server while it (Informix Server) receives any data from the user end. > > My concern is does the Informix version 5 support the external Java program > execution mechanism, and if yes then do we have to setup the J/Foundation > for > the same? >
Informix OnLine 5.x has no clue what Java is. However, it is possible for OnLine to run arbitrary programs via the SYSTEM statement in SPL (Stored Procedure Language), and there's no reason why the 'arbitrary program' could not be written in Java Quartz. There is no J/Foundation in OnLine. (Remember, OnLine 5.00, the original version, was released in 1991, long before Java was released - that was 1995.)
IDS (Informix Dynamic Server) has support for Java in the Server, aka Krakatoa. It also has a scheduler built in. I'm not clear how much assistance this would be.
> Also is there any other method to implement this type of batch framework, > for > example any user defined Queue like structure in the Informix 5, which can > be > listened by the Java program externally? >
Can Java programs work with MQ? If so, so can IDS.
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.
--0016367d5e94caf321048a4d8002
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [619]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
External Java program execution from Informix 5
Posted by: tridib.bolar@gmail.com (TRIDIB BOLAR) - Fri, 25 Jun 2010 00:07:14 EDT
Hi Team,
I am going to design a batch framework where the batch configuration data should be in the Informix 5 database and the batch scheduler is basically a Java Quartz program. I am going to trigger the Java program from the Informix DB server while it (Informix Server) receives any data from the user end.
My concern is does the Informix version 5 supprots the external Java program execution mechanism, and if yes then do we have to setup the J/Foundation for the same?
Also is there any other method to implement this type of batch framework, for example any user defined Queue like structure in the Informix 5, which can be listened by the Java program externally?
Your response will be a great help for me.
Thank you in advance.
Thanks & Regards Tridib
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [618]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: How to use construct statement with formonly f
Posted by: art.kagel@gmail.com (Art Kagel) - Thu, 24 Jun 2010 09:26:22 EDT
Try to use after field clauses to save the user's inputs and before field to restore it.
Art
On Jun 24, 2010 9:00 AM, "RAVI PASUPULETI" <rpasupul@gmail.com> wrote:
Had the construct and input statement one after the other. Everything is working as per your logic, except that once we come back to the construct statement from the INPUT statement in the loop, the values entered for the Construct are being lost and the screen gets blanked off. Can you help here for us to be able to retain the values for the construct statement ?
--001485e7c968988f690489c683e5
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [617]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: How to use construct statement with formonly f
Posted by: rpasupul@gmail.com (RAVI PASUPULETI) - Thu, 24 Jun 2010 08:59:58 EDT
Had the construct and input statement one after the other. Everything is working as per your logic, except that once we come back to the construct statement from the INPUT statement in the loop, the values entered for the Construct are being lost and the screen gets blanked off. Can you help here for us to be able to retain the values for the construct statement ?
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [616]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: How to use construct statement with formonly f
Posted by: art.kagel@gmail.com (Art Kagel) - Mon, 21 Jun 2010 10:59:23 EDT
Then INPUT on those columns will work just fine. If you are retrieving those Y/N fields as part of a single logical input, simply putting the INPUT statement immediately after the CONSTRUCT on the other columns will make the inputs appear seamless. If you put the two statements into a loop controlled by a variable then you can even make it look like the user can move from the INPUT fields to the CONSTRUCT fields seamlessly, as if all of the fields were part of the same INPUT or CONSTRUCT, until he/she fills in all required fields and presses the ACCEPT key. In the ON ACCEPT logic for both the CONSTRUCT and INPUT you would check for sufficient entries and if everything is OK set the exit condition value into the loop control variable and exit the statement. Protect both the INPUT and CONTRUCT with IF (loop_control_var = 0) THEN.....END IF so exiting one statement with the control value set to one (1) will skip the other statement and exit the loop.
Art
Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
On Mon, Jun 21, 2010 at 10:42 AM, RAVI PASUPULETI <rpasupul@gmail.com>wrote:
> We are actually use a couple of formonly fields to input Y/N based on which > we > would have to build a filter on a particular column in the table on which > the > construct exists. So there are no columns in the table that correspond > directly to the formonly fields. > > > > > > >
--000e0cd5637e99d4f704898b8ce7
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [615]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: How to use construct statement with formonly f
Posted by: iiug@aubit.com (Mike Aubury) - Mon, 21 Jun 2010 10:53:58 EDT
Well - you could do that in Aubit4GL - but not normal 4gl in a single CONSTRUCT..
You can sometimes emulate this with an INPUT followed by a CONSTRUCT, or by post processing the string returned from the CONSTRUCT.
You could also try using some function keys to toggle some DISPLAYs - which would give you that functionality - but wouldn't rely on an actual field for input (you'd still see a 'Y' or a 'N' - you'd just have to DISPLAY it yourself...)
On Monday 21 June 2010 15:42:22 RAVI PASUPULETI wrote: > We are actually use a couple of formonly fields to input Y/N based on which > we would have to build a filter on a particular column in the table on > which the construct exists. So there are no columns in the table that > correspond directly to the formonly fields. > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** > * * * *
-- Mike Aubury
http://www.aubit.com/ Aubit Computing Ltd is registered in England and Wales, Number: 3112827 Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [614]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: How to use construct statement with formonly f
Posted by: rpasupul@gmail.com (RAVI PASUPULETI) - Mon, 21 Jun 2010 10:42:23 EDT
We are actually use a couple of formonly fields to input Y/N based on which we would have to build a filter on a particular column in the table on which the construct exists. So there are no columns in the table that correspond directly to the formonly fields.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [613]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Re: How to use construct statement with formon....
Posted by: iiug@aubit.com (Mike Aubury) - Mon, 21 Jun 2010 09:52:19 EDT
I dont think theres any problem using FORMONLY fields in a CONSTRUCT - as the table/columns can be specified separately from the fields (unless you're doing a BY NAME).
Now - how much use that is - I dont know :-) It really depends on what you want to use those fields for as part of the CONSTRUCT.
FWIW - Aubit4GL has a "filter callback" you can use with a CONSTRUCT to 'adjust' whats actually put into the generated string :
..... CONSTRUCT lv_str ON a,b FROM a,b VIA c_callback ....
function c_callback(lv_tabname, lv_colname, lv_string,lv_dtype, lv_dtypelength) define lv_tabname char(18) define lv_colname char(18) define lv_string char(300) define lv_dtype,lv_dtypelength integer
# you return with no values - the construct will complain with # an error in field... if lv_colname="a" and lv_string="456" then
return end if
# Normally - we'd want to generate the construct portion - # but with maybe different column names # In this callback we want to map 'a' to be 'blah'... # if lv_colname="a" then
# aclfgl_get_construct_element takes 5 parameters
# tablename, column name, search string,
# datatype and datatype length(eg for decimal or character length)
let lv_string=aclfgl_get_construct_element(lv_tabname ,
"blah", lv_string , lv_dtype, lv_dtypelength) else
let lv_string=aclfgl_get_construct_element(lv_tabname ,
lv_colname , lv_string , lv_dtype, lv_dtypelength) end if
return lv_string
end function
You can therefore have fields in the CONSTRUCT which are never passed into the generate string, but that you still have "seen" (maybe storing them in some module level variables for example)...
On Monday 21 June 2010 14:19:54 Art Kagel wrote: > I actually don't remember if CONSTRUCT will work pointed at a FORMONLY > field, but even if it does, I don't think that the WHERE clause filters > built for them would be useful. Do the FORMONLY field names correspond to > database table columns? Are the datatypes the same or compatible with the > table columns you would filter against? I would think that the constructed > filter would name the columns as "formonly.fieldname" which would not > correspond to real columns in any query anyway. > > I would just use INPUT and build the filters myself. Note that even for > integer fields the formonly "construct" fields will have to be CHAR type > unless you only permit the entry of discrete numeric values. In order to > permit the user to enter lists, ranges, inequalities, or wildcards you will > have to make the formonly fields CHAR type. You may also have to parse the > input to determine if you are generating an equality, inequality, IN() > clause, LIKE clause, or MATCHES clause. > > Art > > Art S. Kagel > Advanced DataTools (www.advancedatatools.com) > IIUG Board of Directors (art@iiug.org) > > Disclaimer: Please keep in mind that my own opinions are my own opinions > and do not reflect on my employer, Advanced DataTools, the IIUG, nor any > other organization with which I am associated either explicitly, > implicitly, or by inference. Neither do those opinions reflect those of > other individuals affiliated with any entity with which I am affiliated > nor those of the entities themselves. > > On Mon, Jun 21, 2010 at 1:14 AM, K CHANDRA <chandra.kala00@gmail.com> wrote: > > We have a construct statement on several fields in a table. We want to > > add more fields that are formonly. If there a way to use the construct > > statement > > with few formonly fields along with table fields or do we have go for > > input statement? > > > > Thank you, > > Chandra.K > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** > * * * * > > > > > --000e0cd70dc2b3957604898a28b4 > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** > * * * *
-- Mike Aubury
http://www.aubit.com/ Aubit Computing Ltd is registered in England and Wales, Number: 3112827 Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [612]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
I dont think theres any problem using FORMONLY fields in a CONSTRUCT - as the table/columns can be specified separately from the fields (unless you're doing a BY NAME).
Now - how much use that is - I dont know :-) It really depends on what you want to use those fields for as part of the CONSTRUCT.
FWIW - Aubit4GL has a "filter callback" you can use with a CONSTRUCT to 'adjust' whats actually put into the generated string :
..... CONSTRUCT lv_str ON a,b FROM a,b VIA c_callback ....
function c_callback(lv_tabname, lv_colname, lv_string,lv_dtype, lv_dtypelength) define lv_tabname char(18) define lv_colname char(18) define lv_string char(300) define lv_dtype,lv_dtypelength integer
# you return with no values - the construct will complain with # an error in field... if lv_colname="a" and lv_string="456" then
return end if
# Normally - we'd want to generate the construct portion - # but with maybe different column names # In this callback we want to map 'a' to be 'blah'... # if lv_colname="a" then
# aclfgl_get_construct_element takes 5 parameters
# tablename, column name, search string,
# datatype and datatype length(eg for decimal or character length)
let lv_string=aclfgl_get_construct_element(lv_tabname ,
"blah", lv_string , lv_dtype, lv_dtypelength) else
let lv_string=aclfgl_get_construct_element(lv_tabname ,
lv_colname , lv_string , lv_dtype, lv_dtypelength) end if
return lv_string
end function
You can therefore have fields in the CONSTRUCT which are never passed into the generate string, but that you still have "seen" (maybe storing them in some module level variables for example)...
On Monday 21 June 2010 14:19:54 Art Kagel wrote: > I actually don't remember if CONSTRUCT will work pointed at a FORMONLY > field, but even if it does, I don't think that the WHERE clause filters > built for them would be useful. Do the FORMONLY field names correspond to > database table columns? Are the datatypes the same or compatible with the > table columns you would filter against? I would think that the constructed > filter would name the columns as "formonly.fieldname" which would not > correspond to real columns in any query anyway. > > I would just use INPUT and build the filters myself. Note that even for > integer fields the formonly "construct" fields will have to be CHAR type > unless you only permit the entry of discrete numeric values. In order to > permit the user to enter lists, ranges, inequalities, or wildcards you will > have to make the formonly fields CHAR type. You may also have to parse the > input to determine if you are generating an equality, inequality, IN() > clause, LIKE clause, or MATCHES clause. > > Art > > Art S. Kagel > Advanced DataTools (www.advancedatatools.com) > IIUG Board of Directors (art@iiug.org) > > Disclaimer: Please keep in mind that my own opinions are my own opinions > and do not reflect on my employer, Advanced DataTools, the IIUG, nor any > other organization with which I am associated either explicitly, > implicitly, or by inference. Neither do those opinions reflect those of > other individuals affiliated with any entity with which I am affiliated > nor those of the entities themselves. > > On Mon, Jun 21, 2010 at 1:14 AM, K CHANDRA <chandra.kala00@gmail.com> wrote: > > We have a construct statement on several fields in a table. We want to > > add more fields that are formonly. If there a way to use the construct > > statement > > with few formonly fields along with table fields or do we have go for > > input statement? > > > > Thank you, > > Chandra.K > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** > * * * * > > > > > --000e0cd70dc2b3957604898a28b4 > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** > * * * *
-- Mike Aubury
http://www.aubit.com/ Aubit Computing Ltd is registered in England and Wales, Number: 3112827 Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
To post a response via email (IIUG members only):
1. Address it to development-tools@iiug.org 2. Include the bracketed message number in the subject line: [612]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | | | Subscribe to this feed | | You can subscribe to this RSS feed in a number of ways, including the following: Drag the orange RSS button into your News Reader Drag the URL of the RSS feed into your News Reader Cut and paste the URL of the RSS feed into your News Reader>v | |