- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我能够建立到 Visual Fox Pro 数据库的数据连接,我需要从它连接到 2 个表。我如何加入 2 个表然后在 C# 中检索数据?
最佳答案
首先,我会 download Microsoft's Visual FoxPro OleDb provider .
下载并安装后,您可以使用它连接到数据库表所在的 PATH。此外,如果应用程序使用的是正确链接表的“数据库”,您也可以明确包含数据库名称。
using System.Data;
using System.Data.OleDb;
public class YourClass
{
public DataTable GetYourData()
{
DataTable YourResultSet = new DataTable();
OleDbConnection yourConnectionHandler = new OleDbConnection(
"Provider=VFPOLEDB.1;Data Source=C:\\SomePath\\;" );
// if including the full dbc (database container) reference, just tack that on
// OleDbConnection yourConnectionHandler = new OleDbConnection(
// "Provider=VFPOLEDB.1;Data Source=C:\\SomePath\\NameOfYour.dbc;" );
// Open the connection, and if open successfully, you can try to query it
yourConnectionHandler.Open();
if( yourConnectionHandler.State == ConnectionState.Open )
{
OleDbDataAdapter DA = new OleDbDataAdapter();
string mySQL = "select A1.*, B1.* "
+ " from FirstTable A1 "
+ " join SecondTable B1 "
+ " on A1.SomeKey = B1.SomeKey "
+ " where A1.WhateverCondition "; // blah blah...
OleDbCommand MyQuery = new OleDbCommand( mySQL, yourConnectionHandle );
DA.SelectCommand = MyQuery;
DA.Fill( YourResultSet );
yourConnectionHandle.Close();
}
return YourResultSet;
}
}
关于c# - 使用 C# 从 Visual Fox Pro 数据库中读取数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10691556/
在 visual fox pro 中是否有像 sql server 的 ROW_NUMBER() 这样的函数返回一行的序号?实际上我在 c# 中使用 oledb 命令从 fox pro 检索数据。我需
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, over
我正在使用 PHP FOX,所有过程都记录得很好。但是需要知道如何隐藏页面http://live.phpfox.com/demo/?do=/video/如果用户未登录并重定向到登录页面。 仅当用户未注
我一直在尝试在 C# 中模拟我在 C++ 中实现的行为,没有任何问题。我有一个标志集合,它基于 2 的幂,还有一个我需要检查它是否存在于集合中的标志。 byte flagCollection =
我在一个 spring boot 项目中使用 spring boot actuator health 和 spring fox swagger。我在我的 Application.java 类中使用下面
在模板名称 P 中,我想检查当前节点的名称是否为 Fox。我想知道人们进行此类检查的常用方法是什么: 或者: 或:与这 2 个相比,还有其他更好的解决方
Swagger - Spring Fox - 隐藏密码。 在我们的 API 之一中,我需要在验证用户 ID 和密码后返回字母数字代码。 我们正在使用springfox-swagger-ui-2.3.1
我正在使用包含 fox 客户端的 camunda 7.0.0-Final。当我重新部署我的应用程序时,出现以下错误。 Exception sending context initialized
当我想在终端上运行我的 .rb 文件时,这会一直出现: /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require':
我正计划试用 Re-Fox:http://www.refox.net/ 他们有一个演示版本——但是在测试它时它说在试用模式下不支持重新编译器(考虑到该工具的主要用途,这似乎很奇怪)。 这是一款 500
enter image description here我在填充列表框时遇到问题,例如,我想在 active = "1"的位置填充它,以便显示 active = "1"的数据,而 active="0"
我正在尝试使用 C# 将 DBF 文件中的数据提取到我的程序中。我正在使用 Visual FoxPro OLE DB 提供程序。它在我的本地机器上运行良好,但我想将我的程序打包成客户端可以使用的 dl
我正在使用 spring-fox2 @ApiImplicitParam 注释使 swagger-ui 显示一个框,用于在请求中包含授权 header : @ApiImplicitParams({
我有一个 Spring Fox Swagger UI,在其中执行许多操作,其中之一是发布到 Jira,它要求用户输入用户名和密码。 此问题是密码未屏蔽。 public ResponseEntity c
我必须将 mi DB 从 Fox Pro 移至 Mysql。所以我想知道如何将数据迁移到新的以及数据是否可以自动刷新。我有一个使用 Fox Pro 的软件 ERP,但想将该数据库移至 Mysql 以便
在帖子存档页面here 以及个人帖子页面,例如 this 我想隐藏作者,目前显示为“by coadmin”,但我试过的插件都不起作用,而且我找不到任何具体引用作者的 CSS 行。我可以通过定位 .po
我正在使用 visual fox pro 数据库(.dbf 文件)并且我正在使用 dbf python 模块。这是一个例子: myDb = VfpTable('table.dbf'); 现在我可以通过
我正在用 C 编写带有 MPI 的 Fox 算法的实现。我已经将我的 global_matrix segmentation 为更小的 block 。所以每个进程都有一小块矩阵 A 和矩阵 B。但是我很
我们项目的后端是用 Spring 制作的,我们用 Spring Fox swagger 记录 API。我们的引擎中有两个 API,我们希望将它们记录在同一页面上。有没有办法做到这一点 ?提前致谢。 最
如何完成 UINavigationBar 自定义?它是使用子类还是类别? 我对2个方面感兴趣: 将图像添加到导航栏(如 FOXNEWS Logo ) 将后退按钮自定义为“显示”。 (后退按钮通常取堆栈
我是一名优秀的程序员,十分优秀!