Connecting Tech Pros Worldwide Forums | Help | Site Map

Connection paradox Database

Newbie
 
Join Date: Aug 2008
Posts: 4
#1: Aug 20 '08
Hi,
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 :
Quote:
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
  1. DbCommand cmd;
  2.             cmd = cnx.CreateCommand();
  3.             cmd.CommandType = System.Data.CommandType.Text;
  4.             cmd.CommandText = "SELECT COUNT(*) FROM myTable";
  5.             int nbEnreg = (int)cmd.ExecuteScalar();    //bug
  6.             cnx.Close();
  7.             return nbEnreg;
I get an error telling me he doesn't find "myTable",...
I'm really lost and i don't know what to do,...

Thanks

PS: Sorry for my "not so good" English

insertAlias's Avatar
Forum Leader
 
Join Date: Apr 2008
Location: San Antonio, TX (USA)
Posts: 2,608
#2: Aug 20 '08

re: Connection paradox Database


Are you sure that you are using the right permissions? It sounds like you are doing things correctly, but maybe you don't have administrative privileges?
Newbie
 
Join Date: Aug 2008
Posts: 4
#3: Aug 20 '08

re: Connection paradox Database


I'm sure i've all permissions to connect, read and write data because these permissions are the same i use to connect with my *.DBF tables,...

I've no idea what to do, i'm searching a way to transform my .DB files to .DBF files,...

Any help is welcome, thanks !
Newbie
 
Join Date: Aug 2008
Posts: 4
#4: Aug 20 '08

re: Connection paradox Database


I'm looking at the poosibility that my problem come from the Paradox driver's versions i'm using,...
Newbie
 
Join Date: Aug 2008
Posts: 4
#5: Aug 31 '08

re: Connection paradox Database


Ok, i solved my problem by installing BDE, and it works, thanks
Reply