CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    204

    Thumbs up Error in connection: could not find installable ISAM [RESOLVED]

    I have followed the solution my Microsoft and other sites none work.

    here is my code

    Code:
    private void tbPunch_Click(object sender, System.EventArgs e)
    		{
    			
    			String conString = " ";	
    			try 
    			{
    				//contructor accepts the database path
    				
    				conString=@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Documents and Settings\Me\My Documents\Visual Studio Projects\DB\testDB.mdb";
    								
    				DataSet oDS = new DataSet();
    				con = new OleDbConnection(conString);
    				con.Open(); ***** this is where the error is
    				OleDbDataAdapter myDataAdapter = new OleDbDataAdapter();
    				myDataAdapter = new OleDbDataAdapter("Select * From clockTable", con);
    
    				OleDbCommandBuilder myCmdBuilder = new OleDbCommandBuilder(myDataAdapter);
    				
    				myDataAdapter.Fill(myDtPunch);
    				this.ShowCurrentRecord();
    			}
    			catch (Exception ex) 
    			{
    				MessageBox.Show("conString = " + conString + " Error in connection : "+ex.Message);
    			}
    			finally 
    			{
    				// dispose of open objects
    				if (con != null)
    					con.Close();
    			} //finally
    		}
    
    		private void ShowCurrentRecord()
    		{
    			if (myDtPunch.Rows.Count==0)
    			{
    				test1.Text = "No Entries";
    				test2.Text = "No Entries";
    				return;
    			}
    			test1.Text = myDtPunch.Rows[rowPosition]["IDnum"].ToString();
    			test2.Text = myDtPunch.Rows[rowPosition]["position"].ToString();
    		}
    Anyone know how to fix this, its put a huge halt in me continuing,

    thanks
    Last edited by Ctwizzy; February 11th, 2005 at 12:39 PM. Reason: Resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured