FETCH statement using a descriptor

DATABASE

    Sponsored Links

    Next

  • 1. Ingres error -39100
    You haven't provided much information, but have you checked whether you have sufficient disk space to perform the modify? Is the table large? (> 2Gb) and your unlimit set correctly? Jgen Cappel wrote: > Hello, > > what does error number -39100 mean when modifying a table to btree ? > > E_QE0083 Error modifying a table. (Wed Jul 5 15:04:26 2006) > > The table has been freshly created and filled using the NOLOGGING > option in a 2.5 Ingres installation. File generr.h says something > like "other error" about the error number, which is not very helpful. > > The database is inconsistent after the error, but that is expected > behaviour and no problem. > > Thanks for hints, > > Jgen
  • 2. dbms sequences access
    > XXXX@XXXXX.COM wrote: >> Also, I'm increasingly convinced the user is not taking locks on the >> sequence for the transaction lifetime. Err, isn't that a positive feature? The only time it could be a problem is that it makes it possible for a gap in the sequence, where an insert (or similiar) fails.
  • 3. [Info-ingres] Running Ingres within Linux-VServers?
    > > But how can I tell Ingres *not* to bind to 0.0.0.0 after the > installation process? I think you need not worry about binding unless you plan to install ingres into master server. Ingres will bind everything on vserver but it will get only packets for its configured ip addresses. It should be similar to sshd install on master and vservers. Regards Zdenko Rohac. -- XXXX@XXXXX.COM , +421556025136, +421907321359
  • 4. [Info-ingres] Ingres error -39100
    Hello, what does error number -39100 mean when modifying a table to btree ? E_QE0083 Error modifying a table. (Wed Jul 5 15:04:26 2006) The table has been freshly created and filled using the NOLOGGING option in a 2.5 Ingres installation. File generr.h says something like "other error" about the error number, which is not very helpful. The database is inconsistent after the error, but that is expected behaviour and no problem. Thanks for hints, Jgen

FETCH statement using a descriptor

Postby Colin Hay » Tue, 24 Jun 2008 21:55:14 GMT

Having solved my previous problem I am currently creating an SQLDA to use as 
a descriptor when FETCHing data in ESQLC

I'm passing in a User Class object from OpenROAD as a handle, along with a 
SELECT statement and creating an SQLDA based on the data types, lengths, 
nullability of the class attributes, but only for the columns I want to 
SELECT (every column is an attribute of the class)

Using examples in the doco I get a buffer full of data for each FETCH and 
can extract chars, varchars and dates from the buffer (as in the code 
snippet in the Dynamic SQL section of the ESQLC guide) using sqltype and 
sqllen. However I am unable to work out how to convert the results in the 
buffer into the respective integer or float columns

I'm also having trouble getting my program to determine which values are 
null or not

If ANYONE has even done dynamic SQL in C then I could REALLY do with some 
assistance

Regards

Colin


 


Re: FETCH statement using a descriptor

Postby Roy Hann » Tue, 24 Jun 2008 22:18:24 GMT





You don't have to convert anything.  You map the buffer out with suitable 
amounts of space in the appropriate position and the values are deposited 
there in a directly usable form.


The null indicator is returned at the location pointed to by the sqlind in 
the element of sqlvar[] that you are looking at.


It's been a few years but I should be able to dredge up something for you. 
Can you post code?

Roy

-- 
UK IUA 2009 will be held on Tuesday June 9, 2009
Go to  http://www.**--****.com/ 
 to join the mailing list. 



Similar Threads:

1.FMP6 (OSX 10.3.3): fetching data from MySQL using ODBC

I've been googling through comp.databases.filemaker to see if anyone has had
success retrieving data from a MySQL database using ODBC, but I've read far
more problems than solutions.

Is there a consensus here as to what the best ODBC driver is, and whether it
is reliable?  It doesn't have to be fast, just reliable and well-documented
(and hopefully free).

If there simply isn't an adequate way for FMP6 to use ODBC to talk to MySQL,
I'd be comfortable reading the data with an ODBC app in perl or C etc. and
applescripting it into Filemaker.

I obtained "Complete MySQL" from serverlogistics.com, but I've hit some
snags and their forum doesn't appear to be very busy recently, leading me to
wonder if they're out of vogue....

Thanks for any suggestions,
Chap

2.Using a SELECT INTO Statement

Hello,

just a short question concerning the usage of the SELECT-INTO-statement.

In the manual its described that Informix supports this kind of query, but in my case it wont work :-(

I tried this statement:

Select attr into table_2 from table_1 where id = 123


What is wrong?


Regards, Stephan

3.Using offset in select statements

I need to limit the output of a SELECT query for display purposes, and
am looking for some options to "recreate" the "OFFSET" function as used in
PostgreSQL. 

For example, the full select has 100 rows, but in the first
query I only want rows 1-20, then 21-40, etc. What are my options to
achieve this in a SELECT statement with Informix? 

( I am using the Perl DBI and have looked at modules like DBIx::Recordset,
but they don't seem to provide a universal OFFSET function.)

Thank you

-- 
Tielman de Villiers < XXXX@XXXXX.COM >
Perl programmer, lastminute.com plc.
+44 (20) 7802.4393 voice

4.insert statement using default values

Hi,
the following syntax works for mysql:

insert into table_name values () ;

and the following works for sybase 

insert into table_name values ( DEFAULT );

under informix I received a syntax error.

I wonder if there is a way to do it.

What I 've got is:

create table "informix".test3 
  (
    col1 integer,
    col2 char(10)
  );
revoke all on "informix".test3 from "public";

insert into test3 ( col1 ) values ( 1 );
will insert 1 for col1 and null for col2

but 
insert into test3 values ( );

returns syntax error.

Any help would be great,

thanks 
esteban.-

5.Update statement using multiple tables

I have a question, hopefully an easy one, about updating values in a
table using values from another table.  I would like to have a query
do something like this...

update table1
set table1.columna = table2.columna, table1.columnb
where table1.columnc = table2.columnc
and (table1.columna <> table2.columna or table1.columnb <>
table2.columnb)

but when I do this I get:

217: Column (table2) not found in any table in the query (or SLV is
undefined).

I thought that if i put table2 in the update clause (update table1,
table2) it would work, but then I get a syntax error.

I am pretty confident this can be done, and i just don't have the
correct sql, but can't figure it out.

Any help is appreciated.

Thanks,
Jared

6. Using cast in case statement

7. Using a "+" character in an SQL insert statement?

8. [Info-ingres] Error when using 'Case' statement



Return to DATABASE

 

Who is online

Users browsing this forum: No registered users and 99 guest