发布网友 发布时间:2022-04-09 07:58
共6个回答
懂视网 时间:2022-04-09 12:19
以下代码段使用了 SQLError,并返回代码:
/* Declare required variables */ SQLHDBC dbc; SQLHSTMT stmt; SQLRETURN retcode; UCHAR errmsg[100]; /* Code omitted here */ retcode = SQLAllocHandle(SQL_HANDLE_STMT, dbc, &stmt ); if( retcode == SQL_ERROR ){ SQLError( env, dbc, SQL_NULL_HSTMT, NULL, NULL, errmsg, sizeof(errmsg), NULL ); /* Assume that print_error is defined */ print_error( "Allocation failed", errmsg ); return; } /* Delete items for order 2015 */ retcode = SQLExecDirect( stmt, "DELETE FROM SalesOrderItems WHERE ID=2015", SQL_NTS ); if( retcode == SQL_ERROR ) { SQLError( env, dbc, stmt, NULL, NULL, errmsg, sizeof(errmsg), NULL ); /* Assume that print_error is defined */ print_error( "Failed to delete items", errmsg ); return; } |
以下代码段使用了 SQLGetDiagRec,并返回代码:
/* Declare required variables */ SQLHDBC dbc; SQLHSTMT stmt; SQLRETURN retcode; SQLSMALLINT errmsglen; SQLINTEGER errnative; UCHAR errmsg[255]; UCHAR errstate[5]; /* Code omitted here */ retcode = SQLAllocHandle(SQL_HANDLE_STMT, dbc, &stmt ); if( retcode == SQL_ERROR ){ SQLGetDiagRec(SQL_HANDLE_DBC, dbc, 1, errstate, &errnative, errmsg, sizeof(errmsg), &errmsglen); /* Assume that print_error is defined */ print_error( "Allocation failed", errstate, errnative, errmsg ); return; } /* Delete items for order 2015 */ retcode = SQLExecDirect( stmt, "DELETE FROM SalesOrderItems WHERE ID=2015", SQL_NTS ); if( retcode == SQL_ERROR ) { SQLGetDiagRec(SQL_HANDLE_STMT, stmt, recnum, errstate, &errnative, errmsg, sizeof(errmsg), &errmsglen); /* Assume that print_error is defined */ print_error("Failed to delete items", errstate, errnative, errmsg ); return; } |
ODBC错误处理
标签:
热心网友 时间:2022-04-09 09:27
win7 64位安装OFFICE2003安装中出现错误1919,这是因为在安装office2003的时候没有关闭计算机上的杀毒软件导致的,具体的修复方法如下:
1、首先,在计算机上找到下载的office2003压缩包,然后将其解压:
2、然后在解压出来的文件夹中可以找到一个一键安装程序,点击它:
3、然后点击下一步:
4、提示关闭计算机上的杀毒安全软件,点击是,然后关闭安全软件:
5、最后,office2003就会开始自动安装了,安装完成之后点击完成结束:
热心网友 时间:2022-04-09 10:45
原因:ODEC值没有注册。
1、点击开始,点击运行,输入notepad,点击确定;
2、打开记事本输入
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\dBASE Files]
"Driver"="C:\\Windows\\system32\\odbcjt32.dll"
"DriverId"=dword:00000215
"SafeTransactions"=dword:00000000
"UID"=""
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\dBASE Files\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\dBASE Files\Engines\Xbase]
"ImplicitCommitSync"=""
"Threads"=dword:00000003
"UserCommitSync"="Yes"
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Excel Files]
"Driver"="C:\\Windows\\system32\\odbcjt32.dll"
"DriverId"=dword:00000316
"SafeTransactions"=dword:00000000
"UID"=""
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Excel Files\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Excel Files\Engines\Excel]
"ImplicitCommitSync"=""
"Threads"=dword:00000003
"UserCommitSync"="Yes"
"FirstRowHasNames"=hex:01
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\MS Access Database]
"Driver"="C:\\Windows\\system32\\odbcjt32.dll"
"DriverId"=dword:00000019
"SafeTransactions"=dword:00000000
"UID"=""
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\MS Access Database\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\MS Access Database\Engines\Jet]
"ImplicitCommitSync"=""
"Threads"=dword:00000003
"UserCommitSync"="Yes"
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources]
"Visio Database Samples"="Microsoft Access Driver (*.MDB)"
"MS Access Database"="Microsoft Access Driver (*.mdb)"
"Excel Files"="Microsoft Excel Driver (*.xls)"
"dBASE Files"="Microsoft dBase Driver (*.dbf)"
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Visio Database Samples]
"SafeTransactions"=dword:00000000
"DefaultDir"="\"\""
"DBQ"="C:\\PROGRA~1\\MIF5BA~1\\Visio11\\2052\\DBSAMPLE.MDB"
"DriverId"=dword:00000019
"Driver"="C:\\Windows\\system32\\\\odbcjt32.dll"
"UID"=""
"ReadOnly"=hex:00
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Visio Database Samples\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Visio Database Samples\Engines\Jet]
"Threads"=dword:00000003
"UserCommitSync"="Yes"
"ImplicitCommitSync"=""
3、按ctrl+s保存,输入文件名1.reg,保存类型选择所有文件,点击保存;
4、双击1.reg,点击确定添加到注册表,重启即可。
热心网友 时间:2022-04-09 12:20
解决方法如下:
1、点击开始,点击运行,输入notepad,点击确定;
2、打开记事本输入
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\dBASE Files]
"Driver"="C:\\Windows\\system32\\odbcjt32.dll"
"DriverId"=dword:00000215
"SafeTransactions"=dword:00000000
"UID"=""
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\dBASE Files\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\dBASE Files\Engines\Xbase]
"ImplicitCommitSync"=""
"Threads"=dword:00000003
"UserCommitSync"="Yes"
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Excel Files]
"Driver"="C:\\Windows\\system32\\odbcjt32.dll"
"DriverId"=dword:00000316
"SafeTransactions"=dword:00000000
"UID"=""
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Excel Files\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Excel Files\Engines\Excel]
"ImplicitCommitSync"=""
"Threads"=dword:00000003
"UserCommitSync"="Yes"
"FirstRowHasNames"=hex:01
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\MS Access Database]
"Driver"="C:\\Windows\\system32\\odbcjt32.dll"
"DriverId"=dword:00000019
"SafeTransactions"=dword:00000000
"UID"=""
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\MS Access Database\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\MS Access Database\Engines\Jet]
"ImplicitCommitSync"=""
"Threads"=dword:00000003
"UserCommitSync"="Yes"
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources]
"Visio Database Samples"="Microsoft Access Driver (*.MDB)"
"MS Access Database"="Microsoft Access Driver (*.mdb)"
"Excel Files"="Microsoft Excel Driver (*.xls)"
"dBASE Files"="Microsoft dBase Driver (*.dbf)"
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Visio Database Samples]
"SafeTransactions"=dword:00000000
"DefaultDir"="\"\""
"DBQ"="C:\\PROGRA~1\\MIF5BA~1\\Visio11\\2052\\DBSAMPLE.MDB"
"DriverId"=dword:00000019
"Driver"="C:\\Windows\\system32\\\\odbcjt32.dll"
"UID"=""
"ReadOnly"=hex:00
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Visio Database Samples\Engines]
[HKEY_CURRENT_USER\Software\Wow6432Node\ODBC\ODBC.INI\Visio Database Samples\Engines\Jet]
"Threads"=dword:00000003
"UserCommitSync"="Yes"
"ImplicitCommitSync"=""
3、按ctrl+s保存,输入文件名1.reg,保存类型选择所有文件,点击保存;
4、双击1.reg,点击确定添加到注册表,重启即可。
热心网友 时间:2022-04-09 14:11
先运行压缩包里的2003的卸载补丁!
另外你要安装完整版的2003!精简版的一般很少能在64位系统上运行!
热心网友 时间:2022-04-09 16:19
建议换一个OFFICE版本