Click to See Complete Forum and Search --> : Could not find installable ISAM ???


JNic
March 9th, 2008, 12:35 AM
MSDN is not the best in explaining that type of error. I keep getting this. I looked if my Jet engines was installed correctly and everything looks fine in my registry.

May be I am doing something wrong in my code ?


public const string DB_CONN_STRING =
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@" DataSource=D:\\Documents\\Visual Studio 2005\\Projects\\WindowsApplication2\\db_RFID_OIC.mdb";


public void InsertDBLogTag()
{

OleDbConnection conn = new OleDbConnection(DB_CONN_STRING);
conn.Open();

// SQL command
String sSQLCommand =
"INSERT INTO LogTag (Date, Puce, Cle_bureau, Cle_couloir, Cle_cargaison, Poids, Poste) " +
"VALUES( '2001/12/25 20:30:15', '55', 1, 3, 2, 134, 1 );";

// Create the command object
OleDbCommand cmdAdder = new OleDbCommand(sSQLCommand, conn);

// Execute the SQL command
int nNoAdded = cmdAdder.ExecuteNonQuery();

// Close the connection
conn.Close();


}



The errors is when I open the connection (in the beginning), so I am wondering if my connection string is ok.

thank you for helping me

dglienna
March 9th, 2008, 12:44 AM
Check out this link:

http://www.codeproject.com/KB/database/adonetp1.aspx

JNic
March 9th, 2008, 01:01 AM
Check out this link:

http://www.codeproject.com/KB/database/adonetp1.aspx
This article doesn't talk about my type of error and it's a beta network version, so it doesn,t work with what I am using :(

superuser
March 9th, 2008, 01:01 AM
try separating DataSource into two words like Data Source.

JNic
March 9th, 2008, 01:05 AM
try separating DataSource into two words like Data Source.
Thank You very much !

Now it's work :)

I have an error in my insert command, but I will figure it out. I belive my sql command error comes from the fact that I have a "auto increment" field as my primary on my table and I tought access would automaticly add it, looks like not. I will have to figure it out.

Thank You !