本文介绍了访问数据库单表连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好
Hello
string sql = "";
OleDbConnection conn = new OleDbConnection(oldbconnstring);
sql = "select AttendanceLogs.InTime,AttendanceLogs.OutTime,Employees.EmployeeCode
FROM AttendanceLogs INNER JOIN Employees ON AttendanceLogs.EmployeeId = Employee.EmployeeId";
OleDbCommand cmd = new OleDbCommand(sql, conn);
conn.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);
adapter.Fill(results);
plz帮助我收到错误
语法错误在JOIN操作中。
如何使用C#
plz help i am getting error
Syntax error in JOIN operation.
how to do single join in access database using C#
推荐答案
select AL.InTime,AL.OutTime,E.EmployeeCode
FROM AttendanceLogs AL INNER JOIN Employees E ON AL.EmployeeId = E.EmployeeId
这篇关于访问数据库单表连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!