C++SQL ODBC:从表中获取行
C++SQL ODBC: Get row from table
我正在尝试从"帐户"表中获取rpw"AID"。
SQLCHAR AID;
wsprintf(String, "select [AID] from [Account] where [UserID] = '%s'", User);
Sql.RetCode = Sql.Execute(String);
Sql.RetCode = Sql.Fetch();
Sql.Clear();
sprintf(String, "Here my result: %s", SQL RETURN!);
MsgBox(String);
How can i get the [AID] from the table [Account] ? (For User 'idohadar')
我看到您使用一些对象库来调用 ODBC 函数。我不知道这个库,但我使用"原始"API 中的 ODBC 或将其包装在我的类中。
原始 API 在以下方面有很好的描述: http://www.easysoft.com/developer/languages/c/odbc-tutorial-fetching-results.html
必须为值准备缓冲区,然后调用SQLFetch()
然后从该缓冲区读取。
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- lambda参数转换为constexpr技巧,然后获取带链接的数组
- 如何使用 < 和 > 命令获取 c++ 中的输入和输出?
- 使用指针从C++中的数组中获取最大值
- 如何获取std::result_of函数的返回类型
- 如何在openssl-ecc中获取十六进制格式的私钥
- 使用Unreal C++获取VR耳机的世界位置/方向
- 获取日期异步信号安全吗?如果在信号处理程序中使用,它会导致死锁吗
- 从C字符串中获取奇怪的字符串长度
- 为什么我的for循环不能正确获取argv
- 从python中调用C++函数并获取返回值
- 如何获取一个数字的前3位
- 获取字符串的长度并将其分配给数组
- 无法获取菜单选择以运行函数.C++
- 如何在ODBC本机客户端中获取SQL Server DateTime字段
- 如何使用oracle ODBC获取BLOB数据
- C++SQL ODBC:从表中获取行
- 如何通过ODBC从系统间缓存db获取数据
- PostgreSQL ODBC Visual C++BLOB正在获取
- 如何使用 ODBC (C++) 从 MS SQL 获取字符串中的 nvarchar