Error with c/front

hiiii

I am a navision trany i am getting error when i use c/front to count the table 18 using following code unit

CLEAR(Cfront);
Cfront.ConnectServerAndOpenDatabase(FORMAT(Driver),’ ‘,’ ‘,MyDataBase,0,FALSE,TRUE,’ ‘,’ ');
Cfront.OpenCompany(MyCompany);
IF Cfront.OpenTable(TableNo,TableNo) THEN
MESSAGE(Text002,Cfront.RecCount(TableNo),Cfront.TableName(TableNo));
Cfront.CloseTable(TableNo);
MESSAGE(‘Table Closed’);
Cfront.CloseCompany();
MESSAGE(‘Company Closed’);
Cfront.DisconnectServer();
MESSAGE(‘Disconnect’);

i am trying to count the no of records in table 18 in a database which is situated in my computer itself

please mail me at prajeeshmac@gmail.com or replay as soon as possible

the error i got is like this THE CALL TO THE MEMBER ConnectServerAndOpenDatabase failed. c/front returns the following message:c/front error