CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  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

  2. #2
    Join Date
    Nov 2004
    Location
    Poland
    Posts
    1,355

    Re: Error in connection: could not find installable ISAM

    What's the error?

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

    Re: Error in connection: could not find installable ISAM

    could not find installable ISAM

  4. #4
    Join Date
    Jul 2003
    Location
    DELHI
    Posts
    62

    Re: Error in connection: could not find installable ISAM

    Solved Your Problem ?

    Your Connection String is wrong ....

    wrong :
    Code:
    conString = @"Provider=Microsoft.JET.OLEDB.4.0;DataSource=.....";
    correct : --

    Code:
    conString = @"Provider=Microsoft.JET.OLEDB.4.0;Data Source=.....";
    Last edited by Amit_Roy; February 11th, 2005 at 11:19 AM.

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

    Re: Error in connection: could not find installable ISAM

    Ill give that a try.

    A lot of the tutorial sites and books i read all say DataSource which is odd if it doesnt work. Plus the error generated suggests that it a wrong error should say something like : ERROR: invalid connection string.

    Ill let you know how it works out.

  6. #6
    Join Date
    Jul 2003
    Location
    DELHI
    Posts
    62

    Talking Re: Error in connection: could not find installable ISAM

    BTW you have created one object and then another


    Code:
    OleDbDataAdapter myDataAdapter = new OleDbDataAdapter();
    myDataAdapter = new OleDbDataAdapter("Select * From clockTable", con);

    Code:
    OleDbDataAdapter myDataAdapter = new OleDbDataAdapter("Select * From clockTable", con);

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

    Re: Error in connection: could not find installable ISAM

    Thanks again.

    Im learning ADO.net from web tutorials, cant find a decent one yet so if anyone can recommend a good site to get me up to speed on using ADO.NET to do things such as

    Query Selects
    modify
    insert
    Remove
    Display data
    Display data in a dtagrid

    anything else of importance.

    Thanks

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

    Re: Error in connection: could not find installable ISAM

    That did the trick thanks a ton.

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