iodbctest.1.in 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. .nh
  2. .TH iodbctest 1 "3 August 2005" "@VERSION@" "@PACKAGE_NAME@"
  3. .SH NAME
  4. iodbctest, iodbctestw \- iODBC Demonstration programs
  5. .SH SYNOPSIS
  6. .B iodbctest
  7. .RB [ \(dqDSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]\(dq ]
  8. .br
  9. .B iodbctestw
  10. .RB [ \(dqDSN=xxxx[;UID=xxxx][;PWD=xxxx][;OPT=value]\(dq ]
  11. .SH DESCRIPTION
  12. The \fBiodbctest\fR program and \fBiodbtestw\fR programs are simple ODBC
  13. sample programs, showing the strength of the ODBC API to connect to any
  14. ODBC enabled database, issue SQL commands and retrieve the query results.
  15. The \fBiodbctest\fR program uses the standard ODBC API calls to connect
  16. using any DSN, but retrieves all results in ASCII mode.
  17. The \fBiodbctestw\fR program uses the ODBC Unicode API calls to connect
  18. using any DSN, and retrieves all results in Unicode mode.
  19. .SH OPTIONS
  20. The \fBiodbctest\fR program uses the SQLDriverConnect function to make
  21. a connection using any available ODBC compliant driver. This allows the
  22. user to override any ODBC connect attribute in the DSN string.
  23. Connect strings should start with either a \fIDSN=xxx\fR or a
  24. \fIDRIVER=xxxx\fR attribute optionally followed by other DSN attributes
  25. separated by a semicolon e.g:
  26. .nf
  27. DSN=ora9;UID=scott;PWD=tiger;DATABASE=ora9u
  28. .fi
  29. Any attributes required for a proper connection that are not entered in
  30. the DSN connect string, must be present in the odbc.ini file.
  31. If the connect string is passed as an argument to the \fBiodbctest\fR
  32. program, the string should be quoted as most shells use the semicolon
  33. as their command separator. If the connect string is entered on the
  34. interactive prompt, no quotes should be used.
  35. After a successful connection has been established, the user is prompted
  36. for a SQL command to be send to the database. A SQL command cannot span
  37. multiple lines.
  38. If the SQL command returns one or more result sets, each result set is
  39. fetched using character buffers and displayed in a table.
  40. Additionally, the \fBiodbctest\fR program understands a few special
  41. commands:
  42. .TP 8
  43. .B qualifiers
  44. .br
  45. Show a list of qualifiers using the SQLTables catalog call.
  46. .TP 8
  47. .B owners
  48. .br
  49. Show a list of owners using the SQLTables catalog call.
  50. .TP 8
  51. .B tables
  52. .br
  53. Show a list of tables using the SQLTables catalog call.
  54. .TP 8
  55. .B types
  56. .br
  57. Show a list of tables types using the SQLTables catalog call.
  58. .TP 8
  59. .B datatypes
  60. .br
  61. Show a list of data types using the SQLGetTypeInfo catalog call.
  62. .TP 8
  63. .B reconnect
  64. .br
  65. Perform a disconnect/reconnect with the information saved during the
  66. first SQLDriverConnect.
  67. .TP 8
  68. .B quit (or exit)
  69. .br
  70. Exit the program and return to the shell.
  71. .SH EXAMPLES
  72. Start the iodbctest program and get a list of DSNs before making a
  73. connection:
  74. .nf
  75. $ iodbctest
  76. OpenLink ODBC Demonstration program
  77. This program shows an interactive SQL processor
  78. Enter ODBC connect string (? shows list): ?
  79. DSN | Driver
  80. -----------------------------------------------------------------
  81. ora9 | OpenLink Generic ODBC Driver
  82. mysql | OpenLink Generic ODBC Driver
  83. mysqllite | OpenLink Lite for MySQL
  84. myodbc | MyODBC Driver
  85. pgsql | OpenLink Generic ODBC Driver
  86. tds | OpenLink Generic ODBC Driver
  87. Enter ODBC connect string (? shows list): DSN=ora9;PWD=tiger
  88. Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so)
  89. SQL>
  90. .fi
  91. Connect to an Oracle 9 instance which has been previously setup in the
  92. odbc.ini file:
  93. .nf
  94. $ iodbctest "DSN=ora9;UID=scott;PWD=tiger"
  95. iODBC Demonstration program
  96. This program shows an interactive SQL processor
  97. Driver: 05.20.0316 OpenLink Generic ODBC Driver (oplodbc.so)
  98. SQL>select * from emp
  99. ID |NAME
  100. -----------------+-------------------------------------------
  101. 1 |Record 1
  102. 2 |Record 2
  103. 2 |Record 3
  104. result set 1 returned 3 rows.
  105. SQL> quit
  106. .fi
  107. .SH COPYRIGHT
  108. Copyright \(co 1996-2021 OpenLink Software
  109. .SH AUTHOR
  110. iODBC Administrator <[email protected]>