一、安装ibm_db
ibm_db在线安装,直接运行pip install ibm-db 即可,但是离线安装就相对比较麻烦,除了下载ibm_db包之外还要下载链接db2数据库的驱动包,下面是详细步骤
1.首先下载ibm_db压缩包,进入官网https://pypi.org/project/ibm-db/进行下载(官网还可以下载github开源项目),官网提供的是3.0.1的版本
下载之后解压,得到一个名为ibm_db-3.0.1的文件夹,文件夹内容如下:
2.下载链接db2的odbc驱动,以下是下载地址:
https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip,该下载过程会比较慢,耐心等待!
解压后会得到一个clidriver的文件夹,把该文件夹复制到ibm_db-3.0.1下面。
3.使用WIN+R运行CMD打开命令行界面,进入到命令行界面,进入ibm_db-3.0.1路径下,执行python setup.py install进行安装,具体操作及输出见下方:
C:UsersMI>d: D:>cd D:studypythonsampleibm_db-3.0.1 D:studypythonsampleibm_db-3.0.1>python setup.py install Detected 64-bit Python running install running bdist_egg running egg_info writing ibm_db.egg-infoPKG-INFO writing dependency_links to ibm_db.egg-infodependency_links.txt writing top-level names to ibm_db.egg-info op_level.txt reading manifest file 'ibm_db.egg-infoSOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files found matching 'config.py' writing manifest file 'ibm_db.egg-infoSOURCES.txt' installing library code to builddist.win-amd64egg running install_lib running build_py creating build creating buildlib copying ibm_db_dbi.py -> buildlib copying testfunctions.py -> buildlib copying tests.py -> buildlib copying ibm_db.py -> buildlib creating buildlibcerts copying certs\__init__.py -> buildlibcerts creating buildlibibm_db_dlls copying ibm_db_dlls\__init__.py -> buildlibibm_db_dlls creating buildlib ests copying tests est_000_PrepareDb.py -> buildlib ests copying tests est_001_ConnDb.py -> buildlib ests copying tests est_002_ConnDbUncatalogedConn.py -> buildlib ests copying tests est_003_NumAffectedRows.py -> buildlib ests copying tests est_004_ConnWrongUserPwd.py -> buildlib ests copying tests est_005_ConnBadUserBadPwd.py -> buildlib ests copying tests est_006_ConnPassingOpts.py -> buildlib ests copying tests est_007_pConnPassingOpts.py -> buildlib ests copying tests est_008_ColumnInfo.py -> buildlib ests copying tests est_010_UpdateRowCount.py -> buildlib ests copying tests est_011_DeleteRowCount.py -> buildlib ests copying tests est_012_KeysetDrivenCursorSelect01.py -> buildlib ests copying tests est_013_KeysetDrivenCursorSelect02.py -> buildlib ests copying tests est_014_KeysetDrivenCursorNegativeRow.py -> buildlib ests copying tests est_015_InsertDeleteRowCount_01.py -> buildlib ests copying tests est_016_InsertDeleteRowCount_02.py -> buildlib ests copying tests est_017_selectRowcountPrefetchSTMTOpt.py -> buildlib ests copying tests est_018_selectRowcountPrefetchSetOpt.py -> buildlib ests copying tests est_019_selectRowcountPrefetchPrepOpt.py -> buildlib ests copying tests est_020_RollbackDelete.py -> buildlib ests copying tests est_021_CommitDelete.py -> buildlib ests copying tests est_022_RollbackInsert.py -> buildlib ests copying tests est_023_ColumnPrivileges.py -> buildlib ests copying tests est_024_ForeignKeys.py -> buildlib ests copying tests est_025_PrimaryKeys.py -> buildlib ests copying tests est_030_Result.py -> buildlib ests copying tests est_031_ResultIndexPosition.py -> buildlib ests copying tests est_032_ResultIndexName.py -> buildlib ests copying tests est_033_ResultOutSequenceColumn.py -> buildlib ests copying tests est_034_FetchAssoc.py -> buildlib ests copying tests est_035_FetchRow_01.py -> buildlib ests copying tests est_036_FetchRow_02.py -> buildlib ests copying tests est_037_FetchRowIndexPos.py -> buildlib ests copying tests est_038_FetchRowIndexPosNested_01.py -> buildlib ests copying tests est_039_FetchRowIndexPosNested_02.py -> buildlib ests copying tests est_03a_ResultNonExistCol.py -> buildlib ests copying tests est_040_FetchTuple.py -> buildlib ests copying tests est_041_FetchTupleMany_01.py -> buildlib ests copying tests est_042_FetchTupleMany_02.py -> buildlib ests copying tests est_043_FetchTupleMany_03.py -> buildlib ests copying tests est_044_FetchTupleMany_04.py -> buildlib ests copying tests est_045_FetchTupleBinaryData_01.py -> buildlib ests copying tests est_046_FetchTupleMany_05.py -> buildlib ests copying tests est_047_FetchTupleMany_06.py -> buildlib ests copying tests est_048_FetchTupleBinaryData_02.py -> buildlib ests copying tests est_049_InsertNoneParam.py -> buildlib ests copying tests est_050_AutocommitStatus.py -> buildlib ests copying tests est_051_SetAutocommit_01.py -> buildlib ests copying tests est_052_SetAutocommit_02.py -> buildlib ests copying tests est_053_AttrThruConn.py -> buildlib ests copying tests est_054_CursorType.py -> buildlib ests copying tests est_060_Tables_01.py -> buildlib ests copying tests est_061_Tables_02.py -> buildlib ests copying tests est_062_Tables_03.py -> buildlib ests copying tests est_063_Tables_04.py -> buildlib ests copying tests est_064_Tables_05.py -> buildlib ests copying tests est_065_FilterTableName.py -> buildlib ests copying tests est_066_TableObjects.py -> buildlib ests copying tests est_070_Close.py -> buildlib ests copying tests est_071_CloseSuccess.py -> buildlib ests copying tests est_080_ConnWrongDbAlias.py -> buildlib ests copying tests est_081_ConnWrongUser.py -> buildlib ests copying tests est_082_ConnWrongPwd.py -> buildlib ests copying tests est_090_ConnmsgWrongDbAlias.py -> buildlib ests copying tests est_091_ConnmsgWrongUser.py -> buildlib ests copying tests est_092_ConnmsgWrongPwd.py -> buildlib ests copying tests est_100_SelectDeleteInsertFieldCount.py -> buildlib ests copying tests est_101_InsertDeleteFieldCount.py -> buildlib ests copying tests est_102_NumFieldsSelect_01.py -> buildlib ests copying tests est_103_NumFieldsSelect_02.py -> buildlib ests copying tests est_110_FieldNum.py -> buildlib ests copying tests est_111_FieldNumAddCol.py -> buildlib ests copying tests est_112_FieldNumDiffCaseColNames.py -> buildlib ests copying tests est_113_DateTest.py -> buildlib ests copying tests est_114_NumericTest_01.py -> buildlib ests copying tests est_115_NumericTest_02.py -> buildlib ests copying tests est_116_ConnActive.py -> buildlib ests copying tests est_120_FieldName.py -> buildlib ests copying tests est_121_FieldNameAddCol.py -> buildlib ests copying tests est_122_FieldNameDiffCaseColNames.py -> buildlib ests copying tests est_123_FieldNamePos_01.py -> buildlib ests copying tests est_124_FieldNamePos_02.py -> buildlib ests copying tests est_125_FieldNamePos_03.py -> buildlib ests copying tests est_130_PrepExecuteSelectStmt.py -> buildlib ests copying tests est_131_PrepareExecuteSelectStatementParams.py -> buildlib ests copying tests est_132_ExecuteStatementArrayMultipleParams.py -> buildlib ests copying tests est_133_ExecuteLongInputParams.py -> buildlib ests copying tests est_140_BindParamSelectStmt.py -> buildlib ests copying tests est_141_BindParamSelectStmtMultipleParams_01.py -> buildlib ests copying tests est_142_BindParamSelectStmtMultipleParams_02.py -> buildlib ests copying tests est_143_BindParamInsertStmtNoneParam.py -> buildlib ests copying tests est_144_BindParamInsertStmtPARAM_FILE.py -> buildlib ests copying tests est_145_BindRetrieveNoneEmptyString.py -> buildlib ests copying tests est_146_CallSPINAndOUTParams.py -> buildlib ests copying tests est_147_PrepareWithWrongType.py -> buildlib ests copying tests est_148_CallSPDiffBindPattern_01.py -> buildlib ests copying tests est_150_FetchAssocSelect_01.py -> buildlib ests copying tests est_151_FetchAssocSelect_02.py -> buildlib ests copying tests est_152_FetchAssocSelect_03.py -> buildlib ests copying tests est_153_FetchAssocSelect_04.py -> buildlib ests copying tests est_154_AllFetches.py -> buildlib ests copying tests est_155_FetchAssocSelect_05.py -> buildlib ests copying tests est_156_FetchAssocNestedSelects_01.py -> buildlib ests copying tests est_157a_FetchAssocWithoutScrollableCursorErr.py -> buildlib ests copying tests est_157b_FetchAssocScrollableCursor_02.py -> buildlib ests copying tests est_157_FetchAssocScrollableCursor_01.py -> buildlib ests copying tests est_158_FetchAssocNestedSelects_02.py -> buildlib ests copying tests est_159a_FetchAssocSeveralRows_02.py -> buildlib ests copying tests est_159_FetchAssocSeveralRows_01.py -> buildlib ests copying tests est_160_FetchBoth.py -> buildlib ests copying tests est_161_FetchBothNestedSelects_01.py -> buildlib ests copying tests est_162_FetchBothNestedSelects_02.py -> buildlib ests copying tests est_180_StmtErrMsg.py -> buildlib ests copying tests est_190_ColumnsTable_01.py -> buildlib ests copying tests est_191_ColumnsTable_02.py -> buildlib ests copying tests est_195_InsertRetrieveXMLData_01.py -> buildlib ests copying tests est_196_InsertRetrieveXMLData_02.py -> buildlib ests copying tests est_197_StatisticsIndexes.py -> buildlib ests copying tests est_200_MultipleRsltsetsUniformColDefs.py -> buildlib ests copying tests est_201_MultipleRsltsetsDiffColDefs.py -> buildlib ests copying tests est_210_FieldDisplaySize_01.py -> buildlib ests copying tests est_211_FieldDisplaySize_02.py -> buildlib ests copying tests est_212_FieldDisplaySize_03.py -> buildlib ests copying tests est_213_FieldDisplaySize_04.py -> buildlib ests copying tests est_220_PersistentConn.py -> buildlib ests copying tests est_221_100PersistentConns.py -> buildlib ests copying tests est_230_FieldTypePos.py -> buildlib ests copying tests est_231_FieldTypeName.py -> buildlib ests copying tests est_232_FieldTypePosName.py -> buildlib ests copying tests est_240_FieldWidthPosName_01.py -> buildlib ests copying tests est_241_FieldWidthPosName_02.py -> buildlib ests copying tests est_250_FreeResult_01.py -> buildlib ests copying tests est_251_FreeResult_02.py -> buildlib ests copying tests est_260_FetchTupleMany_07.py -> buildlib ests copying tests est_261_FetchObjectAccess.py -> buildlib ests copying tests est_264_InsertRetrieveBIGINTTypeColumn.py -> buildlib ests copying tests est_265_NoAffectedRows.py -> buildlib ests copying tests est_300_ServerInfo.py -> buildlib ests copying tests est_310_ClientInfo.py -> buildlib ests copying tests est_311_InsertSelectDeleteNumLiterals.py -> buildlib ests copying tests est_52949_TestSPIntVarcharXml.py -> buildlib ests copying tests est_6528_ScopingProblemBindParam.py -> buildlib ests copying tests est_6561_InsertNULLValues.py -> buildlib ests copying tests est_6755_ExtraNULLChar_ResultCLOBCol.py -> buildlib ests copying tests est_6792_FieldTypeRetStrDatetimeTimestamp.py -> buildlib ests copying tests est_createdbNX.py -> buildlib ests copying tests est_createDropDB.py -> buildlib ests copying tests est_cursortype.py -> buildlib ests copying tests est_decfloat.py -> buildlib ests copying tests est_decimal.py -> buildlib ests copying tests est_execute_many.py -> buildlib ests copying tests est_InsertRetrieveDateTimeTypeColumn.py -> buildlib ests copying tests est_recreateDB.py -> buildlib ests copying tests est_setgetOption.py -> buildlib ests copying tests est_trusted_context_connect.py -> buildlib ests copying tests est_trusted_context_pconnect.py -> buildlib ests copying tests est_warn.py -> buildlib ests copying tests\__init__.py -> buildlib ests copying certsibm_certs.pem -> buildlibcerts copying ibm_db_dllsibm_db.dll -> buildlibibm_db_dlls copying testspic1.jpg -> buildlib ests copying testsspook.png -> buildlib ests Fixing buildlibibm_db_dbi.py buildlib estfunctions.py buildlib ests.py buildlibibm_db.py buildlibcerts\__init__.py buildlibibm_db_dlls\__init__.py buildlib ests est_000_PrepareDb.py buildlib ests est_001_ConnDb.py buildlib ests est_002_ConnDbUncatalogedConn.py buildlib ests est_003_NumAffectedRows.py buildlib ests est_004_ConnWrongUserPwd.py buildlib ests est_005_ConnBadUserBadPwd.py buildlib ests est_006_ConnPassingOpts.py buildlib ests est_007_pConnPassingOpts.py buildlib ests est_008_ColumnInfo.py buildlib ests est_010_UpdateRowCount.py buildlib ests est_011_DeleteRowCount.py buildlib ests est_012_KeysetDrivenCursorSelect01.py buildlib ests est_013_KeysetDrivenCursorSelect02.py buildlib ests est_014_KeysetDrivenCursorNegativeRow.py buildlib ests est_015_InsertDeleteRowCount_01.py buildlib ests est_016_InsertDeleteRowCount_02.py buildlib ests est_017_selectRowcountPrefetchSTMTOpt.py buildlib ests est_018_selectRowcountPrefetchSetOpt.py buildlib ests est_019_selectRowcountPrefetchPrepOpt.py buildlib ests est_020_RollbackDelete.py buildlib ests est_021_CommitDelete.py buildlib ests est_022_RollbackInsert.py buildlib ests est_023_ColumnPrivileges.py buildlib ests est_024_ForeignKeys.py buildlib ests est_025_PrimaryKeys.py buildlib ests est_030_Result.py buildlib ests est_031_ResultIndexPosition.py buildlib ests est_032_ResultIndexName.py buildlib ests est_033_ResultOutSequenceColumn.py buildlib ests est_034_FetchAssoc.py buildlib ests est_035_FetchRow_01.py buildlib ests est_036_FetchRow_02.py buildlib ests est_037_FetchRowIndexPos.py buildlib ests est_038_FetchRowIndexPosNested_01.py buildlib ests est_039_FetchRowIndexPosNested_02.py buildlib ests est_03a_ResultNonExistCol.py buildlib ests est_040_FetchTuple.py buildlib ests est_041_FetchTupleMany_01.py buildlib ests est_042_FetchTupleMany_02.py buildlib ests est_043_FetchTupleMany_03.py buildlib ests est_044_FetchTupleMany_04.py buildlib ests est_045_FetchTupleBinaryData_01.py buildlib ests est_046_FetchTupleMany_05.py buildlib ests est_047_FetchTupleMany_06.py buildlib ests est_048_FetchTupleBinaryData_02.py buildlib ests est_049_InsertNoneParam.py buildlib ests est_050_AutocommitStatus.py buildlib ests est_051_SetAutocommit_01.py buildlib ests est_052_SetAutocommit_02.py buildlib ests est_053_AttrThruConn.py buildlib ests est_054_CursorType.py buildlib ests est_060_Tables_01.py buildlib ests est_061_Tables_02.py buildlib ests est_062_Tables_03.py buildlib ests est_063_Tables_04.py buildlib ests est_064_Tables_05.py buildlib ests est_065_FilterTableName.py buildlib ests est_066_TableObjects.py buildlib ests est_070_Close.py buildlib ests est_071_CloseSuccess.py buildlib ests est_080_ConnWrongDbAlias.py buildlib ests est_081_ConnWrongUser.py buildlib ests est_082_ConnWrongPwd.py buildlib ests est_090_ConnmsgWrongDbAlias.py buildlib ests est_091_ConnmsgWrongUser.py buildlib ests est_092_ConnmsgWrongPwd.py buildlib ests est_100_SelectDeleteInsertFieldCount.py buildlib ests est_101_InsertDeleteFieldCount.py buildlib ests est_102_NumFieldsSelect_01.py buildlib ests est_103_NumFieldsSelect_02.py buildlib ests est_110_FieldNum.py buildlib ests est_111_FieldNumAddCol.py buildlib ests est_112_FieldNumDiffCaseColNames.py buildlib ests est_113_DateTest.py buildlib ests est_114_NumericTest_01.py buildlib ests est_115_NumericTest_02.py buildlib ests est_116_ConnActive.py buildlib ests est_120_FieldName.py buildlib ests est_121_FieldNameAddCol.py buildlib ests est_122_FieldNameDiffCaseColNames.py buildlib ests est_123_FieldNamePos_01.py buildlib ests est_124_FieldNamePos_02.py buildlib ests est_125_FieldNamePos_03.py buildlib ests est_130_PrepExecuteSelectStmt.py buildlib ests est_131_PrepareExecuteSelectStatementParams.py buildlib ests est_132_ExecuteStatementArrayMultipleParams.py buildlib ests est_133_ExecuteLongInputParams.py buildlib ests est_140_BindParamSelectStmt.py buildlib ests est_141_BindParamSelectStmtMultipleParams_01.py buildlib ests est_142_BindParamSelectStmtMultipleParams_02.py buildlib ests est_143_BindParamInsertStmtNoneParam.py buildlib ests est_144_BindParamInsertStmtPARAM_FILE.py buildlib ests est_145_BindRetrieveNoneEmptyString.py buildlib ests est_146_CallSPINAndOUTParams.py buildlib ests est_147_PrepareWithWrongType.py buildlib ests est_148_CallSPDiffBindPattern_01.py buildlib ests est_150_FetchAssocSelect_01.py buildlib ests est_151_FetchAssocSelect_02.py buildlib ests est_152_FetchAssocSelect_03.py buildlib ests est_153_FetchAssocSelect_04.py buildlib ests est_154_AllFetches.py buildlib ests est_155_FetchAssocSelect_05.py buildlib ests est_156_FetchAssocNestedSelects_01.py buildlib ests est_157a_FetchAssocWithoutScrollableCursorErr.py buildlib ests est_157b_FetchAssocScrollableCursor_02.py buildlib ests est_157_FetchAssocScrollableCursor_01.py buildlib ests est_158_FetchAssocNestedSelects_02.py buildlib ests est_159a_FetchAssocSeveralRows_02.py buildlib ests est_159_FetchAssocSeveralRows_01.py buildlib ests est_160_FetchBoth.py buildlib ests est_161_FetchBothNestedSelects_01.py buildlib ests est_162_FetchBothNestedSelects_02.py buildlib ests est_180_StmtErrMsg.py buildlib ests est_190_ColumnsTable_01.py buildlib ests est_191_ColumnsTable_02.py buildlib ests est_195_InsertRetrieveXMLData_01.py buildlib ests est_196_InsertRetrieveXMLData_02.py buildlib ests est_197_StatisticsIndexes.py buildlib ests est_200_MultipleRsltsetsUniformColDefs.py buildlib ests est_201_MultipleRsltsetsDiffColDefs.py buildlib ests est_210_FieldDisplaySize_01.py buildlib ests est_211_FieldDisplaySize_02.py buildlib ests est_212_FieldDisplaySize_03.py buildlib ests est_213_FieldDisplaySize_04.py buildlib ests est_220_PersistentConn.py buildlib ests est_221_100PersistentConns.py buildlib ests est_230_FieldTypePos.py buildlib ests est_231_FieldTypeName.py buildlib ests est_232_FieldTypePosName.py buildlib ests est_240_FieldWidthPosName_01.py buildlib ests est_241_FieldWidthPosName_02.py buildlib ests est_250_FreeResult_01.py buildlib ests est_251_FreeResult_02.py buildlib ests est_260_FetchTupleMany_07.py buildlib ests est_261_FetchObjectAccess.py buildlib ests est_264_InsertRetrieveBIGINTTypeColumn.py buildlib ests est_265_NoAffectedRows.py buildlib ests est_300_ServerInfo.py buildlib ests est_310_ClientInfo.py buildlib ests est_311_InsertSelectDeleteNumLiterals.py buildlib ests est_52949_TestSPIntVarcharXml.py buildlib ests est_6528_ScopingProblemBindParam.py buildlib ests est_6561_InsertNULLValues.py buildlib ests est_6755_ExtraNULLChar_ResultCLOBCol.py buildlib ests est_6792_FieldTypeRetStrDatetimeTimestamp.py buildlib ests est_createdbNX.py buildlib ests est_createDropDB.py buildlib ests est_cursortype.py buildlib ests est_decfloat.py buildlib ests est_decimal.py buildlib ests est_execute_many.py buildlib ests est_InsertRetrieveDateTimeTypeColumn.py buildlib ests est_recreateDB.py buildlib ests est_setgetOption.py buildlib ests est_trusted_context_connect.py buildlib ests est_trusted_context_pconnect.py buildlib ests est_warn.py buildlib ests\__init__.py Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma Fixing buildlibibm_db_dbi.py buildlib estfunctions.py buildlib ests.py buildlibibm_db.py buildlibcerts\__init__.py buildlibibm_db_dlls\__init__.py buildlib ests est_000_PrepareDb.py buildlib ests est_001_ConnDb.py buildlib ests est_002_ConnDbUncatalogedConn.py buildlib ests est_003_NumAffectedRows.py buildlib ests est_004_ConnWrongUserPwd.py buildlib ests est_005_ConnBadUserBadPwd.py buildlib ests est_006_ConnPassingOpts.py buildlib ests est_007_pConnPassingOpts.py buildlib ests est_008_ColumnInfo.py buildlib ests est_010_UpdateRowCount.py buildlib ests est_011_DeleteRowCount.py buildlib ests est_012_KeysetDrivenCursorSelect01.py buildlib ests est_013_KeysetDrivenCursorSelect02.py buildlib ests est_014_KeysetDrivenCursorNegativeRow.py buildlib ests est_015_InsertDeleteRowCount_01.py buildlib ests est_016_InsertDeleteRowCount_02.py buildlib ests est_017_selectRowcountPrefetchSTMTOpt.py buildlib ests est_018_selectRowcountPrefetchSetOpt.py buildlib ests est_019_selectRowcountPrefetchPrepOpt.py buildlib ests est_020_RollbackDelete.py buildlib ests est_021_CommitDelete.py buildlib ests est_022_RollbackInsert.py buildlib ests est_023_ColumnPrivileges.py buildlib ests est_024_ForeignKeys.py buildlib ests est_025_PrimaryKeys.py buildlib ests est_030_Result.py buildlib ests est_031_ResultIndexPosition.py buildlib ests est_032_ResultIndexName.py buildlib ests est_033_ResultOutSequenceColumn.py buildlib ests est_034_FetchAssoc.py buildlib ests est_035_FetchRow_01.py buildlib ests est_036_FetchRow_02.py buildlib ests est_037_FetchRowIndexPos.py buildlib ests est_038_FetchRowIndexPosNested_01.py buildlib ests est_039_FetchRowIndexPosNested_02.py buildlib ests est_03a_ResultNonExistCol.py buildlib ests est_040_FetchTuple.py buildlib ests est_041_FetchTupleMany_01.py buildlib ests est_042_FetchTupleMany_02.py buildlib ests est_043_FetchTupleMany_03.py buildlib ests est_044_FetchTupleMany_04.py buildlib ests est_045_FetchTupleBinaryData_01.py buildlib ests est_046_FetchTupleMany_05.py buildlib ests est_047_FetchTupleMany_06.py buildlib ests est_048_FetchTupleBinaryData_02.py buildlib ests est_049_InsertNoneParam.py buildlib ests est_050_AutocommitStatus.py buildlib ests est_051_SetAutocommit_01.py buildlib ests est_052_SetAutocommit_02.py buildlib ests est_053_AttrThruConn.py buildlib ests est_054_CursorType.py buildlib ests est_060_Tables_01.py buildlib ests est_061_Tables_02.py buildlib ests est_062_Tables_03.py buildlib ests est_063_Tables_04.py buildlib ests est_064_Tables_05.py buildlib ests est_065_FilterTableName.py buildlib ests est_066_TableObjects.py buildlib ests est_070_Close.py buildlib ests est_071_CloseSuccess.py buildlib ests est_080_ConnWrongDbAlias.py buildlib ests est_081_ConnWrongUser.py buildlib ests est_082_ConnWrongPwd.py buildlib ests est_090_ConnmsgWrongDbAlias.py buildlib ests est_091_ConnmsgWrongUser.py buildlib ests est_092_ConnmsgWrongPwd.py buildlib ests est_100_SelectDeleteInsertFieldCount.py buildlib ests est_101_InsertDeleteFieldCount.py buildlib ests est_102_NumFieldsSelect_01.py buildlib ests est_103_NumFieldsSelect_02.py buildlib ests est_110_FieldNum.py buildlib ests est_111_FieldNumAddCol.py buildlib ests est_112_FieldNumDiffCaseColNames.py buildlib ests est_113_DateTest.py buildlib ests est_114_NumericTest_01.py buildlib ests est_115_NumericTest_02.py buildlib ests est_116_ConnActive.py buildlib ests est_120_FieldName.py buildlib ests est_121_FieldNameAddCol.py buildlib ests est_122_FieldNameDiffCaseColNames.py buildlib ests est_123_FieldNamePos_01.py buildlib ests est_124_FieldNamePos_02.py buildlib ests est_125_FieldNamePos_03.py buildlib ests est_130_PrepExecuteSelectStmt.py buildlib ests est_131_PrepareExecuteSelectStatementParams.py buildlib ests est_132_ExecuteStatementArrayMultipleParams.py buildlib ests est_133_ExecuteLongInputParams.py buildlib ests est_140_BindParamSelectStmt.py buildlib ests est_141_BindParamSelectStmtMultipleParams_01.py buildlib ests est_142_BindParamSelectStmtMultipleParams_02.py buildlib ests est_143_BindParamInsertStmtNoneParam.py buildlib ests est_144_BindParamInsertStmtPARAM_FILE.py buildlib ests est_145_BindRetrieveNoneEmptyString.py buildlib ests est_146_CallSPINAndOUTParams.py buildlib ests est_147_PrepareWithWrongType.py buildlib ests est_148_CallSPDiffBindPattern_01.py buildlib ests est_150_FetchAssocSelect_01.py buildlib ests est_151_FetchAssocSelect_02.py buildlib ests est_152_FetchAssocSelect_03.py buildlib ests est_153_FetchAssocSelect_04.py buildlib ests est_154_AllFetches.py buildlib ests est_155_FetchAssocSelect_05.py buildlib ests est_156_FetchAssocNestedSelects_01.py buildlib ests est_157a_FetchAssocWithoutScrollableCursorErr.py buildlib ests est_157b_FetchAssocScrollableCursor_02.py buildlib ests est_157_FetchAssocScrollableCursor_01.py buildlib ests est_158_FetchAssocNestedSelects_02.py buildlib ests est_159a_FetchAssocSeveralRows_02.py buildlib ests est_159_FetchAssocSeveralRows_01.py buildlib ests est_160_FetchBoth.py buildlib ests est_161_FetchBothNestedSelects_01.py buildlib ests est_162_FetchBothNestedSelects_02.py buildlib ests est_180_StmtErrMsg.py buildlib ests est_190_ColumnsTable_01.py buildlib ests est_191_ColumnsTable_02.py buildlib ests est_195_InsertRetrieveXMLData_01.py buildlib ests est_196_InsertRetrieveXMLData_02.py buildlib ests est_197_StatisticsIndexes.py buildlib ests est_200_MultipleRsltsetsUniformColDefs.py buildlib ests est_201_MultipleRsltsetsDiffColDefs.py buildlib ests est_210_FieldDisplaySize_01.py buildlib ests est_211_FieldDisplaySize_02.py buildlib ests est_212_FieldDisplaySize_03.py buildlib ests est_213_FieldDisplaySize_04.py buildlib ests est_220_PersistentConn.py buildlib ests est_221_100PersistentConns.py buildlib ests est_230_FieldTypePos.py buildlib ests est_231_FieldTypeName.py buildlib ests est_232_FieldTypePosName.py buildlib ests est_240_FieldWidthPosName_01.py buildlib ests est_241_FieldWidthPosName_02.py buildlib ests est_250_FreeResult_01.py buildlib ests est_251_FreeResult_02.py buildlib ests est_260_FetchTupleMany_07.py buildlib ests est_261_FetchObjectAccess.py buildlib ests est_264_InsertRetrieveBIGINTTypeColumn.py buildlib ests est_265_NoAffectedRows.py buildlib ests est_300_ServerInfo.py buildlib ests est_310_ClientInfo.py buildlib ests est_311_InsertSelectDeleteNumLiterals.py buildlib ests est_52949_TestSPIntVarcharXml.py buildlib ests est_6528_ScopingProblemBindParam.py buildlib ests est_6561_InsertNULLValues.py buildlib ests est_6755_ExtraNULLChar_ResultCLOBCol.py buildlib ests est_6792_FieldTypeRetStrDatetimeTimestamp.py buildlib ests est_createdbNX.py buildlib ests est_createDropDB.py buildlib ests est_cursortype.py buildlib ests est_decfloat.py buildlib ests est_decimal.py buildlib ests est_execute_many.py buildlib ests est_InsertRetrieveDateTimeTypeColumn.py buildlib ests est_recreateDB.py buildlib ests est_setgetOption.py buildlib ests est_trusted_context_connect.py buildlib ests est_trusted_context_pconnect.py buildlib ests est_warn.py buildlib ests\__init__.py Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma creating builddist.win-amd64 creating builddist.win-amd64egg creating builddist.win-amd64eggcerts copying buildlibcertsibm_certs.pem -> builddist.win-amd64eggcerts copying buildlibcerts\__init__.py -> builddist.win-amd64eggcerts copying buildlibibm_db.py -> builddist.win-amd64egg copying buildlibibm_db_dbi.py -> builddist.win-amd64egg creating builddist.win-amd64eggibm_db_dlls copying buildlibibm_db_dllsibm_db.dll -> builddist.win-amd64eggibm_db_dlls copying buildlibibm_db_dlls\__init__.py -> builddist.win-amd64eggibm_db_dlls copying buildlib estfunctions.py -> builddist.win-amd64egg creating builddist.win-amd64egg ests copying buildlib estspic1.jpg -> builddist.win-amd64egg ests copying buildlib estsspook.png -> builddist.win-amd64egg ests copying buildlib ests est_000_PrepareDb.py -> builddist.win-amd64egg ests copying buildlib ests est_001_ConnDb.py -> builddist.win-amd64egg ests copying buildlib ests est_002_ConnDbUncatalogedConn.py -> builddist.win-amd64egg ests copying buildlib ests est_003_NumAffectedRows.py -> builddist.win-amd64egg ests copying buildlib ests est_004_ConnWrongUserPwd.py -> builddist.win-amd64egg ests copying buildlib ests est_005_ConnBadUserBadPwd.py -> builddist.win-amd64egg ests copying buildlib ests est_006_ConnPassingOpts.py -> builddist.win-amd64egg ests copying buildlib ests est_007_pConnPassingOpts.py -> builddist.win-amd64egg ests copying buildlib ests est_008_ColumnInfo.py -> builddist.win-amd64egg ests copying buildlib ests est_010_UpdateRowCount.py -> builddist.win-amd64egg ests copying buildlib ests est_011_DeleteRowCount.py -> builddist.win-amd64egg ests copying buildlib ests est_012_KeysetDrivenCursorSelect01.py -> builddist.win-amd64egg ests copying buildlib ests est_013_KeysetDrivenCursorSelect02.py -> builddist.win-amd64egg ests copying buildlib ests est_014_KeysetDrivenCursorNegativeRow.py -> builddist.win-amd64egg ests copying buildlib ests est_015_InsertDeleteRowCount_01.py -> builddist.win-amd64egg ests copying buildlib ests est_016_InsertDeleteRowCount_02.py -> builddist.win-amd64egg ests copying buildlib ests est_017_selectRowcountPrefetchSTMTOpt.py -> builddist.win-amd64egg ests copying buildlib ests est_018_selectRowcountPrefetchSetOpt.py -> builddist.win-amd64egg ests copying buildlib ests est_019_selectRowcountPrefetchPrepOpt.py -> builddist.win-amd64egg ests copying buildlib ests est_020_RollbackDelete.py -> builddist.win-amd64egg ests copying buildlib ests est_021_CommitDelete.py -> builddist.win-amd64egg ests copying buildlib ests est_022_RollbackInsert.py -> builddist.win-amd64egg ests copying buildlib ests est_023_ColumnPrivileges.py -> builddist.win-amd64egg ests copying buildlib ests est_024_ForeignKeys.py -> builddist.win-amd64egg ests copying buildlib ests est_025_PrimaryKeys.py -> builddist.win-amd64egg ests copying buildlib ests est_030_Result.py -> builddist.win-amd64egg ests copying buildlib ests est_031_ResultIndexPosition.py -> builddist.win-amd64egg ests copying buildlib ests est_032_ResultIndexName.py -> builddist.win-amd64egg ests copying buildlib ests est_033_ResultOutSequenceColumn.py -> builddist.win-amd64egg ests copying buildlib ests est_034_FetchAssoc.py -> builddist.win-amd64egg ests copying buildlib ests est_035_FetchRow_01.py -> builddist.win-amd64egg ests copying buildlib ests est_036_FetchRow_02.py -> builddist.win-amd64egg ests copying buildlib ests est_037_FetchRowIndexPos.py -> builddist.win-amd64egg ests copying buildlib ests est_038_FetchRowIndexPosNested_01.py -> builddist.win-amd64egg ests copying buildlib ests est_039_FetchRowIndexPosNested_02.py -> builddist.win-amd64egg ests copying buildlib ests est_03a_ResultNonExistCol.py -> builddist.win-amd64egg ests copying buildlib ests est_040_FetchTuple.py -> builddist.win-amd64egg ests copying buildlib ests est_041_FetchTupleMany_01.py -> builddist.win-amd64egg ests copying buildlib ests est_042_FetchTupleMany_02.py -> builddist.win-amd64egg ests copying buildlib ests est_043_FetchTupleMany_03.py -> builddist.win-amd64egg ests copying buildlib ests est_044_FetchTupleMany_04.py -> builddist.win-amd64egg ests copying buildlib ests est_045_FetchTupleBinaryData_01.py -> builddist.win-amd64egg ests copying buildlib ests est_046_FetchTupleMany_05.py -> builddist.win-amd64egg ests copying buildlib ests est_047_FetchTupleMany_06.py -> builddist.win-amd64egg ests copying buildlib ests est_048_FetchTupleBinaryData_02.py -> builddist.win-amd64egg ests copying buildlib ests est_049_InsertNoneParam.py -> builddist.win-amd64egg ests copying buildlib ests est_050_AutocommitStatus.py -> builddist.win-amd64egg ests copying buildlib ests est_051_SetAutocommit_01.py -> builddist.win-amd64egg ests copying buildlib ests est_052_SetAutocommit_02.py -> builddist.win-amd64egg ests copying buildlib ests est_053_AttrThruConn.py -> builddist.win-amd64egg ests copying buildlib ests est_054_CursorType.py -> builddist.win-amd64egg ests copying buildlib ests est_060_Tables_01.py -> builddist.win-amd64egg ests copying buildlib ests est_061_Tables_02.py -> builddist.win-amd64egg ests copying buildlib ests est_062_Tables_03.py -> builddist.win-amd64egg ests copying buildlib ests est_063_Tables_04.py -> builddist.win-amd64egg ests copying buildlib ests est_064_Tables_05.py -> builddist.win-amd64egg ests copying buildlib ests est_065_FilterTableName.py -> builddist.win-amd64egg ests copying buildlib ests est_066_TableObjects.py -> builddist.win-amd64egg ests copying buildlib ests est_070_Close.py -> builddist.win-amd64egg ests copying buildlib ests est_071_CloseSuccess.py -> builddist.win-amd64egg ests copying buildlib ests est_080_ConnWrongDbAlias.py -> builddist.win-amd64egg ests copying buildlib ests est_081_ConnWrongUser.py -> builddist.win-amd64egg ests copying buildlib ests est_082_ConnWrongPwd.py -> builddist.win-amd64egg ests copying buildlib ests est_090_ConnmsgWrongDbAlias.py -> builddist.win-amd64egg ests copying buildlib ests est_091_ConnmsgWrongUser.py -> builddist.win-amd64egg ests copying buildlib ests est_092_ConnmsgWrongPwd.py -> builddist.win-amd64egg ests copying buildlib ests est_100_SelectDeleteInsertFieldCount.py -> builddist.win-amd64egg ests copying buildlib ests est_101_InsertDeleteFieldCount.py -> builddist.win-amd64egg ests copying buildlib ests est_102_NumFieldsSelect_01.py -> builddist.win-amd64egg ests copying buildlib ests est_103_NumFieldsSelect_02.py -> builddist.win-amd64egg ests copying buildlib ests est_110_FieldNum.py -> builddist.win-amd64egg ests copying buildlib ests est_111_FieldNumAddCol.py -> builddist.win-amd64egg ests copying buildlib ests est_112_FieldNumDiffCaseColNames.py -> builddist.win-amd64egg ests copying buildlib ests est_113_DateTest.py -> builddist.win-amd64egg ests copying buildlib ests est_114_NumericTest_01.py -> builddist.win-amd64egg ests copying buildlib ests est_115_NumericTest_02.py -> builddist.win-amd64egg ests copying buildlib ests est_116_ConnActive.py -> builddist.win-amd64egg ests copying buildlib ests est_120_FieldName.py -> builddist.win-amd64egg ests copying buildlib ests est_121_FieldNameAddCol.py -> builddist.win-amd64egg ests copying buildlib ests est_122_FieldNameDiffCaseColNames.py -> builddist.win-amd64egg ests copying buildlib ests est_123_FieldNamePos_01.py -> builddist.win-amd64egg ests copying buildlib ests est_124_FieldNamePos_02.py -> builddist.win-amd64egg ests copying buildlib ests est_125_FieldNamePos_03.py -> builddist.win-amd64egg ests copying buildlib ests est_130_PrepExecuteSelectStmt.py -> builddist.win-amd64egg ests copying buildlib ests est_131_PrepareExecuteSelectStatementParams.py -> builddist.win-amd64egg ests copying buildlib ests est_132_ExecuteStatementArrayMultipleParams.py -> builddist.win-amd64egg ests copying buildlib ests est_133_ExecuteLongInputParams.py -> builddist.win-amd64egg ests copying buildlib ests est_140_BindParamSelectStmt.py -> builddist.win-amd64egg ests copying buildlib ests est_141_BindParamSelectStmtMultipleParams_01.py -> builddist.win-amd64egg ests copying buildlib ests est_142_BindParamSelectStmtMultipleParams_02.py -> builddist.win-amd64egg ests copying buildlib ests est_143_BindParamInsertStmtNoneParam.py -> builddist.win-amd64egg ests copying buildlib ests est_144_BindParamInsertStmtPARAM_FILE.py -> builddist.win-amd64egg ests copying buildlib ests est_145_BindRetrieveNoneEmptyString.py -> builddist.win-amd64egg ests copying buildlib ests est_146_CallSPINAndOUTParams.py -> builddist.win-amd64egg ests copying buildlib ests est_147_PrepareWithWrongType.py -> builddist.win-amd64egg ests copying buildlib ests est_148_CallSPDiffBindPattern_01.py -> builddist.win-amd64egg ests copying buildlib ests est_150_FetchAssocSelect_01.py -> builddist.win-amd64egg ests copying buildlib ests est_151_FetchAssocSelect_02.py -> builddist.win-amd64egg ests copying buildlib ests est_152_FetchAssocSelect_03.py -> builddist.win-amd64egg ests copying buildlib ests est_153_FetchAssocSelect_04.py -> builddist.win-amd64egg ests copying buildlib ests est_154_AllFetches.py -> builddist.win-amd64egg ests copying buildlib ests est_155_FetchAssocSelect_05.py -> builddist.win-amd64egg ests copying buildlib ests est_156_FetchAssocNestedSelects_01.py -> builddist.win-amd64egg ests copying buildlib ests est_157a_FetchAssocWithoutScrollableCursorErr.py -> builddist.win-amd64egg ests copying buildlib ests est_157b_FetchAssocScrollableCursor_02.py -> builddist.win-amd64egg ests copying buildlib ests est_157_FetchAssocScrollableCursor_01.py -> builddist.win-amd64egg ests copying buildlib ests est_158_FetchAssocNestedSelects_02.py -> builddist.win-amd64egg ests copying buildlib ests est_159a_FetchAssocSeveralRows_02.py -> builddist.win-amd64egg ests copying buildlib ests est_159_FetchAssocSeveralRows_01.py -> builddist.win-amd64egg ests copying buildlib ests est_160_FetchBoth.py -> builddist.win-amd64egg ests copying buildlib ests est_161_FetchBothNestedSelects_01.py -> builddist.win-amd64egg ests copying buildlib ests est_162_FetchBothNestedSelects_02.py -> builddist.win-amd64egg ests copying buildlib ests est_180_StmtErrMsg.py -> builddist.win-amd64egg ests copying buildlib ests est_190_ColumnsTable_01.py -> builddist.win-amd64egg ests copying buildlib ests est_191_ColumnsTable_02.py -> builddist.win-amd64egg ests copying buildlib ests est_195_InsertRetrieveXMLData_01.py -> builddist.win-amd64egg ests copying buildlib ests est_196_InsertRetrieveXMLData_02.py -> builddist.win-amd64egg ests copying buildlib ests est_197_StatisticsIndexes.py -> builddist.win-amd64egg ests copying buildlib ests est_200_MultipleRsltsetsUniformColDefs.py -> builddist.win-amd64egg ests copying buildlib ests est_201_MultipleRsltsetsDiffColDefs.py -> builddist.win-amd64egg ests copying buildlib ests est_210_FieldDisplaySize_01.py -> builddist.win-amd64egg ests copying buildlib ests est_211_FieldDisplaySize_02.py -> builddist.win-amd64egg ests copying buildlib ests est_212_FieldDisplaySize_03.py -> builddist.win-amd64egg ests copying buildlib ests est_213_FieldDisplaySize_04.py -> builddist.win-amd64egg ests copying buildlib ests est_220_PersistentConn.py -> builddist.win-amd64egg ests copying buildlib ests est_221_100PersistentConns.py -> builddist.win-amd64egg ests copying buildlib ests est_230_FieldTypePos.py -> builddist.win-amd64egg ests copying buildlib ests est_231_FieldTypeName.py -> builddist.win-amd64egg ests copying buildlib ests est_232_FieldTypePosName.py -> builddist.win-amd64egg ests copying buildlib ests est_240_FieldWidthPosName_01.py -> builddist.win-amd64egg ests copying buildlib ests est_241_FieldWidthPosName_02.py -> builddist.win-amd64egg ests copying buildlib ests est_250_FreeResult_01.py -> builddist.win-amd64egg ests copying buildlib ests est_251_FreeResult_02.py -> builddist.win-amd64egg ests copying buildlib ests est_260_FetchTupleMany_07.py -> builddist.win-amd64egg ests copying buildlib ests est_261_FetchObjectAccess.py -> builddist.win-amd64egg ests copying buildlib ests est_264_InsertRetrieveBIGINTTypeColumn.py -> builddist.win-amd64egg ests copying buildlib ests est_265_NoAffectedRows.py -> builddist.win-amd64egg ests copying buildlib ests est_300_ServerInfo.py -> builddist.win-amd64egg ests copying buildlib ests est_310_ClientInfo.py -> builddist.win-amd64egg ests copying buildlib ests est_311_InsertSelectDeleteNumLiterals.py -> builddist.win-amd64egg ests copying buildlib ests est_52949_TestSPIntVarcharXml.py -> builddist.win-amd64egg ests copying buildlib ests est_6528_ScopingProblemBindParam.py -> builddist.win-amd64egg ests copying buildlib ests est_6561_InsertNULLValues.py -> builddist.win-amd64egg ests copying buildlib ests est_6755_ExtraNULLChar_ResultCLOBCol.py -> builddist.win-amd64egg ests copying buildlib ests est_6792_FieldTypeRetStrDatetimeTimestamp.py -> builddist.win-amd64egg ests copying buildlib ests est_createdbNX.py -> builddist.win-amd64egg ests copying buildlib ests est_createDropDB.py -> builddist.win-amd64egg ests copying buildlib ests est_cursortype.py -> builddist.win-amd64egg ests copying buildlib ests est_decfloat.py -> builddist.win-amd64egg ests copying buildlib ests est_decimal.py -> builddist.win-amd64egg ests copying buildlib ests est_execute_many.py -> builddist.win-amd64egg ests copying buildlib ests est_InsertRetrieveDateTimeTypeColumn.py -> builddist.win-amd64egg ests copying buildlib ests est_recreateDB.py -> builddist.win-amd64egg ests copying buildlib ests est_setgetOption.py -> builddist.win-amd64egg ests copying buildlib ests est_trusted_context_connect.py -> builddist.win-amd64egg ests copying buildlib ests est_trusted_context_pconnect.py -> builddist.win-amd64egg ests copying buildlib ests est_warn.py -> builddist.win-amd64egg ests copying buildlib ests\__init__.py -> builddist.win-amd64egg ests copying buildlib ests.py -> builddist.win-amd64egg byte-compiling builddist.win-amd64eggcerts\__init__.py to __init__.cpython-37.pyc byte-compiling builddist.win-amd64eggibm_db.py to ibm_db.cpython-37.pyc byte-compiling builddist.win-amd64eggibm_db_dbi.py to ibm_db_dbi.cpython-37.pyc byte-compiling builddist.win-amd64eggibm_db_dlls\__init__.py to __init__.cpython-37.pyc byte-compiling builddist.win-amd64egg estfunctions.py to testfunctions.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_000_PrepareDb.py to test_000_PrepareDb.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_001_ConnDb.py to test_001_ConnDb.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_002_ConnDbUncatalogedConn.py to test_002_ConnDbUncatalogedConn.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_003_NumAffectedRows.py to test_003_NumAffectedRows.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_004_ConnWrongUserPwd.py to test_004_ConnWrongUserPwd.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_005_ConnBadUserBadPwd.py to test_005_ConnBadUserBadPwd.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_006_ConnPassingOpts.py to test_006_ConnPassingOpts.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_007_pConnPassingOpts.py to test_007_pConnPassingOpts.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_008_ColumnInfo.py to test_008_ColumnInfo.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_010_UpdateRowCount.py to test_010_UpdateRowCount.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_011_DeleteRowCount.py to test_011_DeleteRowCount.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_012_KeysetDrivenCursorSelect01.py to test_012_KeysetDrivenCursorSelect01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_013_KeysetDrivenCursorSelect02.py to test_013_KeysetDrivenCursorSelect02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_014_KeysetDrivenCursorNegativeRow.py to test_014_KeysetDrivenCursorNegativeRow.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_015_InsertDeleteRowCount_01.py to test_015_InsertDeleteRowCount_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_016_InsertDeleteRowCount_02.py to test_016_InsertDeleteRowCount_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_017_selectRowcountPrefetchSTMTOpt.py to test_017_selectRowcountPrefetchSTMTOpt.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_018_selectRowcountPrefetchSetOpt.py to test_018_selectRowcountPrefetchSetOpt.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_019_selectRowcountPrefetchPrepOpt.py to test_019_selectRowcountPrefetchPrepOpt.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_020_RollbackDelete.py to test_020_RollbackDelete.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_021_CommitDelete.py to test_021_CommitDelete.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_022_RollbackInsert.py to test_022_RollbackInsert.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_023_ColumnPrivileges.py to test_023_ColumnPrivileges.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_024_ForeignKeys.py to test_024_ForeignKeys.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_025_PrimaryKeys.py to test_025_PrimaryKeys.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_030_Result.py to test_030_Result.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_031_ResultIndexPosition.py to test_031_ResultIndexPosition.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_032_ResultIndexName.py to test_032_ResultIndexName.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_033_ResultOutSequenceColumn.py to test_033_ResultOutSequenceColumn.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_034_FetchAssoc.py to test_034_FetchAssoc.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_035_FetchRow_01.py to test_035_FetchRow_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_036_FetchRow_02.py to test_036_FetchRow_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_037_FetchRowIndexPos.py to test_037_FetchRowIndexPos.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_038_FetchRowIndexPosNested_01.py to test_038_FetchRowIndexPosNested_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_039_FetchRowIndexPosNested_02.py to test_039_FetchRowIndexPosNested_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_03a_ResultNonExistCol.py to test_03a_ResultNonExistCol.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_040_FetchTuple.py to test_040_FetchTuple.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_041_FetchTupleMany_01.py to test_041_FetchTupleMany_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_042_FetchTupleMany_02.py to test_042_FetchTupleMany_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_043_FetchTupleMany_03.py to test_043_FetchTupleMany_03.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_044_FetchTupleMany_04.py to test_044_FetchTupleMany_04.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_045_FetchTupleBinaryData_01.py to test_045_FetchTupleBinaryData_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_046_FetchTupleMany_05.py to test_046_FetchTupleMany_05.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_047_FetchTupleMany_06.py to test_047_FetchTupleMany_06.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_048_FetchTupleBinaryData_02.py to test_048_FetchTupleBinaryData_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_049_InsertNoneParam.py to test_049_InsertNoneParam.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_050_AutocommitStatus.py to test_050_AutocommitStatus.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_051_SetAutocommit_01.py to test_051_SetAutocommit_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_052_SetAutocommit_02.py to test_052_SetAutocommit_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_053_AttrThruConn.py to test_053_AttrThruConn.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_054_CursorType.py to test_054_CursorType.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_060_Tables_01.py to test_060_Tables_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_061_Tables_02.py to test_061_Tables_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_062_Tables_03.py to test_062_Tables_03.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_063_Tables_04.py to test_063_Tables_04.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_064_Tables_05.py to test_064_Tables_05.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_065_FilterTableName.py to test_065_FilterTableName.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_066_TableObjects.py to test_066_TableObjects.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_070_Close.py to test_070_Close.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_071_CloseSuccess.py to test_071_CloseSuccess.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_080_ConnWrongDbAlias.py to test_080_ConnWrongDbAlias.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_081_ConnWrongUser.py to test_081_ConnWrongUser.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_082_ConnWrongPwd.py to test_082_ConnWrongPwd.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_090_ConnmsgWrongDbAlias.py to test_090_ConnmsgWrongDbAlias.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_091_ConnmsgWrongUser.py to test_091_ConnmsgWrongUser.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_092_ConnmsgWrongPwd.py to test_092_ConnmsgWrongPwd.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_100_SelectDeleteInsertFieldCount.py to test_100_SelectDeleteInsertFieldCount.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_101_InsertDeleteFieldCount.py to test_101_InsertDeleteFieldCount.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_102_NumFieldsSelect_01.py to test_102_NumFieldsSelect_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_103_NumFieldsSelect_02.py to test_103_NumFieldsSelect_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_110_FieldNum.py to test_110_FieldNum.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_111_FieldNumAddCol.py to test_111_FieldNumAddCol.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_112_FieldNumDiffCaseColNames.py to test_112_FieldNumDiffCaseColNames.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_113_DateTest.py to test_113_DateTest.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_114_NumericTest_01.py to test_114_NumericTest_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_115_NumericTest_02.py to test_115_NumericTest_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_116_ConnActive.py to test_116_ConnActive.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_120_FieldName.py to test_120_FieldName.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_121_FieldNameAddCol.py to test_121_FieldNameAddCol.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_122_FieldNameDiffCaseColNames.py to test_122_FieldNameDiffCaseColNames.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_123_FieldNamePos_01.py to test_123_FieldNamePos_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_124_FieldNamePos_02.py to test_124_FieldNamePos_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_125_FieldNamePos_03.py to test_125_FieldNamePos_03.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_130_PrepExecuteSelectStmt.py to test_130_PrepExecuteSelectStmt.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_131_PrepareExecuteSelectStatementParams.py to test_131_PrepareExecuteSelectStatementParams.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_132_ExecuteStatementArrayMultipleParams.py to test_132_ExecuteStatementArrayMultipleParams.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_133_ExecuteLongInputParams.py to test_133_ExecuteLongInputParams.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_140_BindParamSelectStmt.py to test_140_BindParamSelectStmt.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_141_BindParamSelectStmtMultipleParams_01.py to test_141_BindParamSelectStmtMultipleParams_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_142_BindParamSelectStmtMultipleParams_02.py to test_142_BindParamSelectStmtMultipleParams_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_143_BindParamInsertStmtNoneParam.py to test_143_BindParamInsertStmtNoneParam.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_144_BindParamInsertStmtPARAM_FILE.py to test_144_BindParamInsertStmtPARAM_FILE.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_145_BindRetrieveNoneEmptyString.py to test_145_BindRetrieveNoneEmptyString.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_146_CallSPINAndOUTParams.py to test_146_CallSPINAndOUTParams.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_147_PrepareWithWrongType.py to test_147_PrepareWithWrongType.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_148_CallSPDiffBindPattern_01.py to test_148_CallSPDiffBindPattern_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_150_FetchAssocSelect_01.py to test_150_FetchAssocSelect_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_151_FetchAssocSelect_02.py to test_151_FetchAssocSelect_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_152_FetchAssocSelect_03.py to test_152_FetchAssocSelect_03.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_153_FetchAssocSelect_04.py to test_153_FetchAssocSelect_04.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_154_AllFetches.py to test_154_AllFetches.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_155_FetchAssocSelect_05.py to test_155_FetchAssocSelect_05.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_156_FetchAssocNestedSelects_01.py to test_156_FetchAssocNestedSelects_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_157a_FetchAssocWithoutScrollableCursorErr.py to test_157a_FetchAssocWithoutScrollableCursorErr.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_157b_FetchAssocScrollableCursor_02.py to test_157b_FetchAssocScrollableCursor_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_157_FetchAssocScrollableCursor_01.py to test_157_FetchAssocScrollableCursor_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_158_FetchAssocNestedSelects_02.py to test_158_FetchAssocNestedSelects_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_159a_FetchAssocSeveralRows_02.py to test_159a_FetchAssocSeveralRows_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_159_FetchAssocSeveralRows_01.py to test_159_FetchAssocSeveralRows_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_160_FetchBoth.py to test_160_FetchBoth.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_161_FetchBothNestedSelects_01.py to test_161_FetchBothNestedSelects_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_162_FetchBothNestedSelects_02.py to test_162_FetchBothNestedSelects_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_180_StmtErrMsg.py to test_180_StmtErrMsg.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_190_ColumnsTable_01.py to test_190_ColumnsTable_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_191_ColumnsTable_02.py to test_191_ColumnsTable_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_195_InsertRetrieveXMLData_01.py to test_195_InsertRetrieveXMLData_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_196_InsertRetrieveXMLData_02.py to test_196_InsertRetrieveXMLData_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_197_StatisticsIndexes.py to test_197_StatisticsIndexes.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_200_MultipleRsltsetsUniformColDefs.py to test_200_MultipleRsltsetsUniformColDefs.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_201_MultipleRsltsetsDiffColDefs.py to test_201_MultipleRsltsetsDiffColDefs.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_210_FieldDisplaySize_01.py to test_210_FieldDisplaySize_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_211_FieldDisplaySize_02.py to test_211_FieldDisplaySize_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_212_FieldDisplaySize_03.py to test_212_FieldDisplaySize_03.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_213_FieldDisplaySize_04.py to test_213_FieldDisplaySize_04.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_220_PersistentConn.py to test_220_PersistentConn.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_221_100PersistentConns.py to test_221_100PersistentConns.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_230_FieldTypePos.py to test_230_FieldTypePos.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_231_FieldTypeName.py to test_231_FieldTypeName.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_232_FieldTypePosName.py to test_232_FieldTypePosName.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_240_FieldWidthPosName_01.py to test_240_FieldWidthPosName_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_241_FieldWidthPosName_02.py to test_241_FieldWidthPosName_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_250_FreeResult_01.py to test_250_FreeResult_01.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_251_FreeResult_02.py to test_251_FreeResult_02.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_260_FetchTupleMany_07.py to test_260_FetchTupleMany_07.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_261_FetchObjectAccess.py to test_261_FetchObjectAccess.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_264_InsertRetrieveBIGINTTypeColumn.py to test_264_InsertRetrieveBIGINTTypeColumn.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_265_NoAffectedRows.py to test_265_NoAffectedRows.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_300_ServerInfo.py to test_300_ServerInfo.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_310_ClientInfo.py to test_310_ClientInfo.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_311_InsertSelectDeleteNumLiterals.py to test_311_InsertSelectDeleteNumLiterals.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_52949_TestSPIntVarcharXml.py to test_52949_TestSPIntVarcharXml.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_6528_ScopingProblemBindParam.py to test_6528_ScopingProblemBindParam.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_6561_InsertNULLValues.py to test_6561_InsertNULLValues.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_6755_ExtraNULLChar_ResultCLOBCol.py to test_6755_ExtraNULLChar_ResultCLOBCol.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_6792_FieldTypeRetStrDatetimeTimestamp.py to test_6792_FieldTypeRetStrDatetimeTimestamp.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_createdbNX.py to test_createdbNX.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_createDropDB.py to test_createDropDB.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_cursortype.py to test_cursortype.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_decfloat.py to test_decfloat.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_decimal.py to test_decimal.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_execute_many.py to test_execute_many.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_InsertRetrieveDateTimeTypeColumn.py to test_InsertRetrieveDateTimeTypeColumn.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_recreateDB.py to test_recreateDB.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_setgetOption.py to test_setgetOption.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_trusted_context_connect.py to test_trusted_context_connect.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_trusted_context_pconnect.py to test_trusted_context_pconnect.cpython-37.pyc byte-compiling builddist.win-amd64egg ests est_warn.py to test_warn.cpython-37.pyc byte-compiling builddist.win-amd64egg ests\__init__.py to __init__.cpython-37.pyc byte-compiling builddist.win-amd64egg ests.py to tests.cpython-37.pyc installing package data to builddist.win-amd64egg running install_data copying README.md -> builddist.win-amd64egg copying CHANGES -> builddist.win-amd64egg copying LICENSE -> builddist.win-amd64egg copying config.py.sample -> builddist.win-amd64egg creating builddist.win-amd64eggEGG-INFO copying ibm_db.egg-infoPKG-INFO -> builddist.win-amd64eggEGG-INFO copying ibm_db.egg-infoSOURCES.txt -> builddist.win-amd64eggEGG-INFO copying ibm_db.egg-infodependency_links.txt -> builddist.win-amd64eggEGG-INFO copying ibm_db.egg-info op_level.txt -> builddist.win-amd64eggEGG-INFO writing builddist.win-amd64eggEGG-INFO ative_libs.txt zip_safe flag not set; analyzing archive contents... __pycache__.ibm_db.cpython-37: module references __file__ __pycache__.testfunctions.cpython-37: module MAY be using inspect.stack tests.__pycache__.test_000_PrepareDb.cpython-37: module references __file__ tests.__pycache__.test_144_BindParamInsertStmtPARAM_FILE.cpython-37: module references __file__ creating dist creating 'distibm_db-3.0.1-py3.7.egg' and adding 'builddist.win-amd64egg' to it removing 'builddist.win-amd64egg' (and everything under it) Processing ibm_db-3.0.1-py3.7.egg creating d:appdataanaconda3libsite-packagesibm_db-3.0.1-py3.7.egg Extracting ibm_db-3.0.1-py3.7.egg to d:appdataanaconda3libsite-packages Adding ibm-db 3.0.1 to easy-install.pth file Installed d:appdataanaconda3libsite-packagesibm_db-3.0.1-py3.7.egg Processing dependencies for ibm-db==3.0.1 Finished processing dependencies for ibm-db==3.0.1 **************************************** You are downloading a package which includes the Python module for IBM DB2/Informix. The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the python module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in D:AppDataanaconda3Libsite-packagesclidriver or D:AppDataanaconda3Libsite-packagesibm_db-3.0.1-py3.7.eggclidriver. Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device. **************************************** D:studypythonsampleibm_db-3.0.1>
二、使用ibm_db模块
1.查询数据使用方法:
#!/usr/bin/python # -*-encoding:utf-8-*- import ibm_db import logging dbinfo = ("DATABASE=DBNAME:HOSTNAME=192.168.1.1:PORT=50000:PROTOCOL=TCPIP:UID=username:PWD=password") #数据库信息 sql = "select * from table;" class db2Cfg(): #创建获取数据库信息的类 def __init__(self,dbinfo): self.conn_info = dbinfo # def getInfo(self,sql): try: conn = ibm_db.connect(self.conn_info,"","") #连接数据库 except: logging.error("connect failed") else: sql_exec = sql logging.info(sql_exec) try: stmt = ibm_db.exec_immediate(conn,sql_exec) #执行sql result = ibm_db.fetch_both(stmt) #将sql返回的第一行数据存入result,result是一个二维数组 result_list = [] #定义列表存放所有结果 while result: ###循环获取sql返回的所有数据### result_list.append([result[0],result[1]]) #sql返回多少个字段,就按照列表索引进行获取,本例中是假设返回两个字段 result = ibm_db.fetch_both(stmt) except Exception as err: print("stmt faild,%s"% repr(err)) finally: if ibm_db.active(conn): ibm_db.close(conn) logging.info("database closed success") (sql_info) = db2Cfg(dbinfo).getInfo(sql) #调用方法获取最终结果
2.插入数据使用方法,在插入数据时,由于python是强类型的语言,所以即使是数字也需要把列表处理为字符串的形式,以下用法给出了向数据库内插入数据的用法,这里考虑到数据量大的情况,为了提升效率,对数据进行了分片处理,每次插入200条数据,详细代码如下:
def ins_data(ins_data_list): ###可以对数据进行处理,取决于实际需求### dbinfo = "DATABASE=DBNAME:HOSTNAME=192.168.1.1:PORT=50000:PROTOCOL=TCPIP:UID=username:PWD=password" try: conn = ibm_db.connect(dbinfo,'','') #连接数据库 except: print("connect faild,%s "% ibm_db.conn_errormesg()) else: del_sql = "delete from table;" try: stmt = ibm_db.exec_immediate(conn,del_sql) except: print(ibm_db.stmt_errormsg()) else: max_value = 200 #设定每次最多插入200条数据 x=len(ins_data_list)//max_value + 1 #按照每次200条对数据进行分片,不足200按实际条数算 #这里默认数据是单维数组,如果是二维数组的化需要进行降维处理 #假设是二维数组,进行降维处理 # ins_data_list_2 = [] # for y in ins_data_list: # ins_data_list_2.append(str(y).replace('[','').replace(']','')) for i in range: value_string ='),('.join(ins_data_list[max_value*(i):max_value*(i+1)]) #拼接值串,对值进行分片处理 sql_string="insert into table values (" + value_string + ")" #拼接插入语句 try: stmt =ibm_db.exec_immediate(conn,sql_string) #执行插入语句 except: print(ibm_db.stmt_errormsg()) finally: if ibm_db.active(conn): ibm_db.close(conn)
以上,就是关于ibm_db模块的安装及简单使用,仅以记录作为学习分享。