翻译3 TORQUE/TENSION CERTIFICATION *** Coatings covered in this standard can be utilized on parts that contain threads used for fastening and therefore must meet the following requirements specified in this section to assure assembly consistency. Fasteners utilize this coating system to control torque/tension. All applications that have a machine thread (e.g. M8 x 1.25 bolts) require laboratory testing to validate friction or torque/tension performance. APAC and LATAM must follow either Section 3.1 or 3.2, depending upon equipment availability.
时间: 2023-06-25 09:04:44 浏览: 68
扭矩/张力认证 *** 本标准涵盖的涂层可用于含有用于紧固的螺纹的零件上,因此必须满足本节规定的以下要求,以确保装配一致性。紧固件利用此涂层系统来控制扭矩/张力。所有具有机械螺纹(例如 M8 x 1.25 螺栓)的应用程序都需要进行实验室测试,以验证摩擦或扭矩/张力性能。APAC和LATAM必须根据设备可用性遵循3.1或3.2节。
相关问题
pRecordset->Open("SELECT * FROM test_torque", _variant_t(), ADODB::adOpenStatic, ADODB::adLockOptimistic, ADODB::adCmdText);中ADODB报错应该如何正确修改
如果你的代码中使用了 `ADODB` 命名空间中的枚举值(如 `adOpenStatic`、`adLockOptimistic`、`adCmdText`),但是没有正确地引入该命名空间,就会出现类似于“未定义的标识符”等编译错误。
为了解决这个问题,你需要在代码开头添加 `using namespace ADODB;`,或者在使用 `ADODB` 命名空间中的成员时显式地加上命名空间限定符 `ADODB::`。修改后的代码如下:
```cpp
#include <iostream>
#include <comdef.h>
#import "C:\Program Files\Common Files\System\ado\msado15.dll" \
no_namespace rename("EOF", "adoEOF")
using namespace std;
using namespace ADODB; // 添加 ADODB 命名空间
int main()
{
// 创建 _Recordset 对象
_RecordsetPtr pRecordset = nullptr;
pRecordset.CreateInstance(__uuidof(Recordset));
// 打开数据库连接
try {
_bstr_t bstrConn("Provider=SQLOLEDB;Data Source=(local);Initial Catalog=myDatabase;Integrated Security=SSPI;");
pRecordset->Open("SELECT * FROM test_torque", _variant_t(), adOpenStatic, adLockOptimistic, adCmdText); // 使用 ADODB 命名空间中的枚举值
// ...
}
catch (_com_error& e) {
cerr << "Error: " << e.ErrorMessage() << endl;
}
return 0;
}
```
这样就能正确地使用 `ADODB` 命名空间中的枚举值了。
源代码为m_pRecordset.Open("SELECT * FROM test_torque");出现如下: error C2039: “Open”: 不是“_com_ptr_t<_IIID>”的成员 如何修改至正确
这个错误提示是因为在 `_com_ptr_t` 对象中没有找到名为 `Open` 的成员函数。这很可能是因为你没有正确地引入 ADO 相关的头文件和命名空间。
为了解决这个问题,首先请确保你已经正确地引入了 ADO 相关的头文件和命名空间:
```cpp
#import "C:\Program Files\Common Files\System\ado\msado15.dll" \
no_namespace rename("EOF", "adoEOF")
```
然后,你需要将 `_com_ptr_t` 对象转换为 `ADODB::_RecordsetPtr` 类型,才能调用其 `Open` 成员函数。修改代码如下:
```cpp
ADODB::_RecordsetPtr pRecordset = nullptr;
pRecordset.CreateInstance(__uuidof(ADODB::Recordset));
pRecordset->Open("SELECT * FROM test_torque", _variant_t(), ADODB::adOpenStatic, ADODB::adLockOptimistic, ADODB::adCmdText);
```
这样就能正确地打开 `test_torque` 表并返回一个 `_Recordset` 对象了。