- Page 1: IBM Informix Developer’s Handbook
- Page 5 and 6: Contents Notices . . . . . . . . .
- Page 7 and 8: 5.6.2 Connectivity errors . . . . .
- Page 9 and 10: 11.2.3 Rails adapters . . . . . . .
- Page 11 and 12: Notices This information was develo
- Page 13 and 14: Preface IBM® Informix® is a low-a
- Page 15 and 16: Acknowledgements Thanks to the foll
- Page 17 and 18: 1 Chapter 1. Introduction to IBM In
- Page 19 and 20: Informix Developer Edition The Info
- Page 21 and 22: Table 1-1 Informix licensed version
- Page 23 and 24: are functioning only as a backup se
- Page 25 and 26: 1.2 Informix tools for developers T
- Page 27 and 28: ODBC with the IBM Informix ODBC Dri
- Page 29 and 30: IBM Informix JDBC Driver, Version 3
- Page 31 and 32: 1.2.3 4GL 1.2.4 Ruby on Rails IBM I
- Page 33 and 34: 1.2.7 PHP on Informix ► Includes
- Page 35 and 36: If you need a secured authenticatio
- Page 37 and 38: Consider using buffered logging onl
- Page 39 and 40: Available There is an Informix solu
- Page 41 and 42: Chapter 2. Setting up an Informix d
- Page 43 and 44: 2. Create the installation .ini fil
- Page 45 and 46: { EXEC SQL CONNECT TO 'stores_demo@
- Page 47 and 48: Windows systems Use the setnet32 ut
- Page 49 and 50: On a Windows system, you can enable
- Page 51 and 52: ► IBM Informix JDBC Driver is Jav
- Page 53 and 54:
► The finderr utility on UNIX sys
- Page 55 and 56:
3. Specify the directory where you
- Page 57 and 58:
6. The installer presents the summa
- Page 59 and 60:
To uninstall your existing products
- Page 61 and 62:
Java, ODBC/CLI, PHP, and Ruby on Ra
- Page 63 and 64:
Consider the following information
- Page 65 and 66:
4. The IBM data server driver copy
- Page 67 and 68:
6. When the installation completes,
- Page 69 and 70:
3. On Mac OS X, set the DYLD_LIBRAR
- Page 71 and 72:
3. Specify the installation directo
- Page 73 and 74:
Chapter 3. Working with the ODBC dr
- Page 75 and 76:
The following directory is the defa
- Page 77 and 78:
Figure 3-3 shows the Informix ODBC
- Page 79 and 80:
Note: The code set value for the Cl
- Page 81 and 82:
For more information about each one
- Page 83 and 84:
For more information about the sqlh
- Page 85 and 86:
This file contains three sections:
- Page 87 and 88:
Figure 3-7 shows the Drivers tab of
- Page 89 and 90:
Table 3-8 lists the minimum require
- Page 91 and 92:
With the IBM Data Server Driver for
- Page 93 and 94:
Example 3-6 A test_connect.c sample
- Page 95 and 96:
3.3.2 Type mapping You can use the
- Page 97 and 98:
Informix SQL Informix ODBC driver I
- Page 99 and 100:
#include #include #include #endi
- Page 101 and 102:
Example 3-12 Output of SQLDirectExe
- Page 103 and 104:
Using parameters In most of the cas
- Page 105 and 106:
Calling SQL routines In this sectio
- Page 107 and 108:
You can switch to manual-commit by
- Page 109 and 110:
INSERT INTO orders(order_num,order_
- Page 111 and 112:
} SQLFreeHandle(SQL_HANDLE_STMT,hst
- Page 113 and 114:
Client functions to access smart la
- Page 115 and 116:
6. Write the data into the object u
- Page 117 and 118:
c=SQLBindParameter (hstmt, 2, SQL_P
- Page 119 and 120:
SQLCHAR*lo_data; SQLLENlo_data_vals
- Page 121 and 122:
#ifdef WIN32 #include #include #i
- Page 123 and 124:
Creating a complex data type Exampl
- Page 125 and 126:
SQLFreeStmt (hstmt, SQL_RESET_PARAM
- Page 127 and 128:
* Bind the row handle with the resu
- Page 129 and 130:
{ fprintf (stdout, "Please specify
- Page 131 and 132:
SQLHENV henv; SQLHSTMT hstmt; SQLRE
- Page 133 and 134:
3.3.6 Troubleshooting In this secti
- Page 135 and 136:
... SWORD 5 SQLULEN 0 SWORD 0 PTR
- Page 137 and 138:
SQ_EOT C->S (90) Time: 2010-06-22 1
- Page 139 and 140:
EXCSAT RQSDSS (ASCII) (EBCDIC) 0 1
- Page 141 and 142:
Chapter 4. Working with ESQL/C This
- Page 143 and 144:
If the esql command does not encoun
- Page 145 and 146:
3. Link the object code into one or
- Page 147 and 148:
following esql command passes the -
- Page 149 and 150:
These overhead tasks can incur runt
- Page 151 and 152:
Example 4-4 demonstrates how to exe
- Page 153 and 154:
Example 4-5 shows how to use dynami
- Page 155 and 156:
Anthony Higgins Raymond Vector Geor
- Page 157 and 158:
int n1; char c1[20]; EXEC SQL END D
- Page 159 and 160:
large objects are the BLOB and CLOB
- Page 161 and 162:
EXEC SQL fetch ifxcursor; if (sqlca
- Page 163 and 164:
mint main(int argc, char **argv) {
- Page 165 and 166:
For more information about ESQL/C E
- Page 167 and 168:
► Compile and linking errors If t
- Page 169 and 170:
Chapter 5. Working with the JDBC dr
- Page 171 and 172:
You can download the Informix JDBC
- Page 173 and 174:
5.2 Setup and configuration 5.2.1 C
- Page 175 and 176:
Example 5-5 SimpleConnection.java i
- Page 177 and 178:
Example 5-7 shows the changes to th
- Page 179 and 180:
5.4 Performing database operations
- Page 181 and 182:
Parameter Description STMT_CACHE En
- Page 183 and 184:
You can use these Informix specific
- Page 185 and 186:
} C:\work> C:\work>java delete AZ D
- Page 187 and 188:
dbRes = pstmt.getResultSet(); while
- Page 189 and 190:
Run a user-defined routine The Call
- Page 191 and 192:
5.5.1 Batch inserts or updates and
- Page 193 and 194:
5.5.2 BIGSERIAL data type IBM Infor
- Page 195 and 196:
You can manipulate smart large obje
- Page 197 and 198:
Example 5-22 demonstrates how to re
- Page 199 and 200:
Preparing the Informix server for S
- Page 201 and 202:
} } ds.setPassword("password"); ds.
- Page 203 and 204:
5.6.3 Syntax errors 5.7 Tracing The
- Page 205 and 206:
Chapter 6. IBM Informix with Hibern
- Page 207 and 208:
6.1.2 Hibernate concepts The Hibern
- Page 209 and 210:
Example 6-1 shows the contents of t
- Page 211 and 212:
CLASSPATH CLASSPATH is an environme
- Page 213 and 214:
Note: You can find a patch that add
- Page 215 and 216:
► Create the HibernateUtil helper
- Page 217 and 218:
The name of the class is State. It
- Page 219 and 220:
static { try { // Creates the Sessi
- Page 221 and 222:
Example 6-13 shows the schema of th
- Page 223 and 224:
Example 6-15 shows how to compile a
- Page 225 and 226:
C:\work>java update 1 AZ ARIZONA ne
- Page 227 and 228:
C:\work>java delete 2 Object delete
- Page 229 and 230:
When using annotations, the Hiberna
- Page 231 and 232:
Chapter 7. Working with IBM Informi
- Page 233 and 234:
Provider is selected by default in
- Page 235 and 236:
c:\work>connect.vbs "Data Source=st
- Page 237 and 238:
7.3.2 Connecting to database In thi
- Page 239 and 240:
Informix SQL Informix OLE DB Provid
- Page 241 and 242:
Informix OLE DB Provider supports a
- Page 243 and 244:
int main() { HRESULT hr = S_OK; IDB
- Page 245 and 246:
Rowset A rowset is a set of rows, a
- Page 247 and 248:
InitProperties[3].dwPropertyID = DB
- Page 249 and 250:
Example 7-7 demonstrates how to ret
- Page 251 and 252:
Example 7-9 illustrates how to use
- Page 253 and 254:
pErrorInfoRec->GetSource(&bstrSourc
- Page 255 and 256:
Comparing this example with Example
- Page 257 and 258:
Example 7-17 demonstrates how to us
- Page 259 and 260:
Figure 7-1 shows the New Linked Ser
- Page 261 and 262:
The last SQL statement in the scrip
- Page 263 and 264:
On 64-bit version of Windows operat
- Page 265 and 266:
A44: 53C Enter Clsfact::QueryInterf
- Page 267 and 268:
UNKNOWN 1 SQ_DESCRIBE 1 0.000000 0.
- Page 269 and 270:
Chapter 8. Working with .NET data p
- Page 271 and 272:
The installation process registers
- Page 273 and 274:
Console.WriteLine(String.Format("Da
- Page 275 and 276:
Elapsed: 0.171875 Step 5: Calling G
- Page 277 and 278:
Data Server Provider for .NET conne
- Page 279 and 280:
Informix .NET type mapping Table 8-
- Page 281 and 282:
Table 8-7 lists the public method o
- Page 283 and 284:
Example 8-8 demonstrates how to run
- Page 285 and 286:
} } } conn.Close(); Example 8-11 sh
- Page 287 and 288:
} } Example 8-13 shows the output o
- Page 289 and 290:
Example 8-15 shows how to use IfxPa
- Page 291 and 292:
} } trans.Rollback(); conn.Close();
- Page 293 and 294:
Property Type Description Flags Int
- Page 295 and 296:
try { conn = new IfxConnection("Ser
- Page 297 and 298:
Console.WriteLine(vclobBuff); // Cl
- Page 299 and 300:
IfxDateTime The IfxDateTime class r
- Page 301 and 302:
To access a DATETIME column in the
- Page 303 and 304:
IfxDecimal An IfxDecimal object rep
- Page 305 and 306:
An application uses the GetIfxDecim
- Page 307 and 308:
Error Reason Solution Unhandled Exc
- Page 309 and 310:
The level of tracing is determine b
- Page 311 and 312:
Chapter 9. Working with PHP PHP is
- Page 313 and 314:
9.2 Setup and configuration 9.2.1 I
- Page 315 and 316:
9.2.2 Verifying the PDO_INFORMIX se
- Page 317 and 318:
You can use the same script to test
- Page 319 and 320:
► The web server spawns more than
- Page 321 and 322:
Static SQL statements Example 9-6 s
- Page 323 and 324:
$dbc->query($statement); $error=$db
- Page 325 and 326:
printf(" prepare insert2 failed wit
- Page 327 and 328:
The PHP script in Example 9-12 show
- Page 329 and 330:
Collection data types The collectio
- Page 331 and 332:
More advanced than the BLOB data ty
- Page 333 and 334:
$stmt= $dbc->prepare("INSERT INTO c
- Page 335 and 336:
printf(" prepare update blob column
- Page 337 and 338:
Deleted 1 records C:\work> The appl
- Page 339 and 340:
The IBM_DB2 extension can use the c
- Page 341 and 342:
Fatal error: Uncaught exception 'PD
- Page 343 and 344:
that do not exist or the database c
- Page 345 and 346:
Chapter 10. User-defined routines I
- Page 347 and 348:
10.1.1 Considerations for UDRs A UD
- Page 349 and 350:
The following terms are used in thi
- Page 351 and 352:
A quick review of the data type hie
- Page 353 and 354:
operations. It has the advantage th
- Page 355 and 356:
SELECT COUNT(ship_date) INTO mrows
- Page 357 and 358:
For ordinary UDR with IBM Informix
- Page 359 and 360:
5. With the .jar file in storage an
- Page 361 and 362:
5. Add the updated .jar file into s
- Page 363 and 364:
} } } ---- MailClient.java --- 3. C
- Page 365 and 366:
DataBlade APIs provide the interfac
- Page 367 and 368:
mi_integer contains(MI_LO_HANDLE* l
- Page 369 and 370:
10.3.1 Configuration IBM Informix h
- Page 371 and 372:
With the release of 11.50.XC4, IBM
- Page 373 and 374:
10.3.2 IBM Informix provided DataBl
- Page 375 and 376:
IBM Informix DataBlade module name
- Page 377 and 378:
Chapter 11. Working with Ruby on Ra
- Page 379 and 380:
11.1.1 Architecture of Ruby on Rail
- Page 381 and 382:
You can use the Ruby gem utility to
- Page 383 and 384:
Example 11-2 demonstrates how to lo
- Page 385 and 386:
11.2.3 Rails adapters Data types Th
- Page 387 and 388:
When using versions of Rails older
- Page 389 and 390:
database: stores7 pool: 5 timeout:
- Page 391 and 392:
type 0 scale 0 length 2 xid 0 nulla
- Page 393 and 394:
Selecting data from the database Wh
- Page 395 and 396:
For examples and a full description
- Page 397 and 398:
Executing an SQL statement Example
- Page 399 and 400:
Using smart large objects The Data
- Page 401 and 402:
ship_charge, paid_date) AS SELECT *
- Page 403 and 404:
11.4.4 Creating the Rails model and
- Page 405 and 406:
11.4.5 Starting the Rails web serve
- Page 407 and 408:
Figure 11-3 shows the Listing Order
- Page 409 and 410:
11.5.3 Creating model, control, and
- Page 411 and 412:
Example 11-37 uses the Informix dbs
- Page 413 and 414:
We add one phone entry to our direc
- Page 415 and 416:
Chapter 12. Informix 4GL Web Servic
- Page 417 and 418:
IBM provides the following options
- Page 419 and 420:
12.2.2 Environment The utilities fo
- Page 421 and 422:
such as the location of the 4GL sou
- Page 423 and 424:
| | | | | | | | | | | | +----------
- Page 425 and 426:
12.3.4 I4GL Web Services process Fi
- Page 427 and 428:
12.4.2 Host and application details
- Page 429 and 430:
3. Add specific details for the web
- Page 431 and 432:
Input and output variables Next, yo
- Page 433 and 434:
Example 12-14 shows the Generate fo
- Page 435 and 436:
Generating Wrapper code .... The wr
- Page 437 and 438:
After a successful deployment, the
- Page 439 and 440:
Getting a list of available Web Ser
- Page 441 and 442:
} call.setTargetEndpointAddress( ne
- Page 443 and 444:
WSDL_PATH = /work/publish/local.wsd
- Page 445 and 446:
12.6 Troubleshooting In this sectio
- Page 447 and 448:
Executing: c4gl -keep --shared -o /
- Page 449 and 450:
Figure 12-4 shows the WSDL informat
- Page 451 and 452:
Database trace IBM Informix 4GL use
- Page 453 and 454:
Chapter 13. Application development
- Page 455 and 456:
An IBM Informix instance can have s
- Page 457 and 458:
When the task is finished (end of s
- Page 459 and 460:
prevents any other program from dro
- Page 461 and 462:
statements, depending upon the isol
- Page 463 and 464:
To avoid this situation, set the DE
- Page 465 and 466:
Use Repeatable Read isolation for t
- Page 467 and 468:
When using a logged database, file
- Page 469 and 470:
For information about creating a us
- Page 471 and 472:
The specified value can be ROW, whi
- Page 473 and 474:
Value Database Server Action An int
- Page 475 and 476:
transactions. If your system is sta
- Page 477 and 478:
After Version 9.4, LTXHWM and LTXEH
- Page 479 and 480:
optional session ID. The output con
- Page 481 and 482:
- X=transaction cleanup - Y=conditi
- Page 483 and 484:
A Appendix A. Parameters in the onc
- Page 485 and 486:
B Appendix B. Accommodating distrib
- Page 487 and 488:
In addition to the TP/XA library, a
- Page 489 and 490:
#define xa_close(info,rmid, flags)\
- Page 491 and 492:
} if (arc != 5) { printf("Error: In
- Page 493 and 494:
Enter Choice: q Q Calling xa_close.
- Page 495 and 496:
Related publications We consider th
- Page 497 and 498:
Index Symbols .4cf extension 418 .e
- Page 499 and 500:
distributed transaction 20, 93, 447
- Page 501 and 502:
L library file 126 licensing metric
- Page 503 and 504:
scalability 6, 330 scalable data wa
- Page 505 and 506:
deploy 405 force 405 generate 405 h
- Page 507:
(1.0” spine) 0.875”1.498” 460