ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Error: OleDb Exception Was Unhandled Data type mismatch in criteria expression for Access Database in ASP.NetHi @paulrajmca,<br />Please try the following<br /><br /><a href = 'link(Threads/149168/C-Error-Arithmetic-overflow-error-converting-expression-to-data-type-datetime/)'>C# Error: Arithmetic overflow error converting expression to data type datetime</a><br /><br />It might help you.<br /><br />Cheers Andrea.https://www.aspforums.net:443/Threads/596670/Error-OleDb-Exception-Was-Unhandled-Data-type-mismatch-in-criteria-expression-for-Access-Database-in-ASPNet/https://www.aspforums.net:443/Threads/596670/Error-OleDb-Exception-Was-Unhandled-Data-type-mismatch-in-criteria-expression-for-Access-Database-in-ASPNet/Wed, 03 May 2017 02:40:02 GMTError: OleDb Exception Was Unhandled Data type mismatch in criteria expression for Access Database in ASP.Net<blockquote><cite>paulrajmca says:</cite> <pre><code class="csharp keyword">string</code> <code class="csharp plain">str = </code><code class="csharp string">"select AttendanceLogs.*,Shifts.EndTime,Shifts.BeginTime,Shifts.Break1,Shifts.Break1BeginTime,Break1EndTime from AttendanceLogs inner join Shifts on Shifts.ShiftId = AttendanceLogs.ShiftId where AttendanceDate between '"</code> <code class="csharp plain">+ sDate + </code><code class="csharp string">"' AND '"</code> <code class="csharp plain">+tDate + </code><code class="csharp string">"' and EmployeeId ='"</code> <code class="csharp plain">+ edr.GetValue(0) + </code><code class="csharp string">"'"</code><code class="csharp plain">;</code></pre> </blockquote> <p>&nbsp;Change the above line with the below.</p> <pre class="brush: csharp">string str = &#34;select AttendanceLogs.*,Shifts.EndTime,Shifts.BeginTime,Shifts.Break1,Shifts.Break1BeginTime,Break1EndTime from AttendanceLogs inner join Shifts on Shifts.ShiftId = AttendanceLogs.ShiftId where AttendanceDate between (&#39;&#34; + sDate + &#34;&#39; AND &#39;&#34; + tDate + &#34;&#39;) and EmployeeId = &#34; + edr.GetValue(0);</pre> <p>Guessing your employeeId is integer. That might be the cause.</p>https://www.aspforums.net:443/Threads/596670/Error-OleDb-Exception-Was-Unhandled-Data-type-mismatch-in-criteria-expression-for-Access-Database-in-ASPNet/https://www.aspforums.net:443/Threads/596670/Error-OleDb-Exception-Was-Unhandled-Data-type-mismatch-in-criteria-expression-for-Access-Database-in-ASPNet/Wed, 03 May 2017 03:13:18 GMT