I just tried that, and when I run the program, I get the following error:
"The specified cast is not valid."
************* Exception Text **************
System.InvalidCastException: Specified cast is not valid.
at System.Data.OleDb.OleDbException..ctor(IErrorInfo errorInfo, Int32 errorCode, Exception inner)
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hResult, OleDbConnection connection, Object src)
at System.Data.OleDb.OleDbDataReader.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbDataReader.BuildSchemaTableInfo(Object handle, Boolean filterITypeInfo, Boolean filterChapters)
at System.Data.OleDb.OleDbDataReader.BuildSchemaTableRowset(Object handle)
at System.Data.OleDb.OleDbDataReader.GenerateSchemaTable(OleDbDataReader dataReader, Object handle, CommandBehavior behavior)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.CommandBuilder.BuildCache(Boolean closeConnection)
at System.Data.OleDb.OleDbCommandBuilder.GetInsertCommand()
at ADODataAdapterTestVB.Form1.btnOpen_Click(Object sender, EventArgs e) in C:\Documents and Settings\Sandeep Nathwani\My Documents\SharpDevelop Projects\ADODataAdapterTestVB\Form1.vb:line 123
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& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
ComputerCop911
ASP and HTML Programmer
Learning VB.NET and ASP.NET
Can also help with hardware probs