Note that there are some explanatory texts on larger screens.

plurals
  1. POoledb exception Data type mismatch in criteria expression
    primarykey
    data
    text
    <p>I have filled a table in msaccess with the data from some web resource. metadata of table in msaccess and my code is as </p> <pre><code>Dim Con1 As OleDbConnection = Nothing Dim LastDateTimeOfRawNews As DateTime = Nothing Private Function copyLatestNewstoNewsAndTemporary() Con1 = DB_Manager.getConnection() Con1.Open() Dim SQL2 As String = "" LastDateTimeOfRawNews = "#6/7/2013 4:36:46 PM#" SQL2 = "insert into TemporaryNews(Title) SELECT Title FROM News where News.news_Date &gt;='" + LastDateTimeOfRawNews + "'" Dim objCmd2 As OleDbCommand = New OleDbCommand(SQL2, Con1) objCmd2.ExecuteNonQuery() Con1.Close() End Function </code></pre> <p>metadata:</p> <pre><code>NewsId -&gt; AutoNumber Title -&gt; Text news_Date Date/Time etc </code></pre> <p>I got {"Data type mismatch in criteria expression."} exception</p> <pre><code>exception full detail is as under System.Data.OleDb.OleDbException was unhandled ErrorCode=-2147217913 Message=Data type mismatch in criteria expression. Source=Microsoft JET Database Engine StackTrace: at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object&amp; executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&amp; executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object&amp; executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at WBand.frmMain.copyLatestNewstoNewsAndTemporary() in C:\Users\Khanz\Desktop\Latest news\Editing\WBand\Form1.vb:line 679 at WBand.frmMain.Button3_Click(Object sender, EventArgs e) in C:\Users\Khanz\Desktop\Latest news\Editing\WBand\Form1.vb:line 918 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message&amp; m) at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m) at System.Windows.Forms.Button.WndProc(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at WBand.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: </code></pre> <p>Also please tell me that is there any difference between datetime type of msaccess and vb.net's datetime type.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload