I'm an amateur programmer and I want to start
using C#.
I need to connect to some existing Paradox database tables but I'm not
having any luck with it using C# 2005 . I've searched with google and
on MSDN but still can't get it working.
I set up the connection using the wizards and in Server Explorer I can see
the table, but not the table fields and if i try to refresh a Table, i get the following error with every table :
The object either no longer exists or you do not have the permission to see it.But, i check it, the tables exists, and i've the rights to read/write.
I connect to the database with ODBC, as i did with DBF tables, but it doesn't work,...
And if i try to make a select request with this code :
Expand|Select|Wrap|Line Numbers
- DbCommand cmd;
- cmd = cnx.CreateCommand();
- cmd.CommandType = System.Data.CommandType.Text;
- cmd.CommandText = "SELECT COUNT(*) FROM myTable";
- int nbEnreg = (int)cmd.ExecuteScalar(); //bug
- cnx.Close();
- return nbEnreg;
I'm really lost and i don't know what to do,...
Thanks
PS: Sorry for my "not so good" English