ledaker
January 8th, 2006, 05:55 PM
Hi,
i use visual c++ to open connection with dbase data base using odbc my code is :
CDataBase DBase;
....
try
{
DBase.Open(NULL,false,false,"ODBC;DBQ=name_list.dbf;DRIVER={MICROSOFT dBase Driver (*.dbf)}");//the error is here !!!
CRecordset rec(&DBase);
rec.Open(CRecordset::snapshot,"SELECT * FROM name_list",CRecordset::readOnly);
DBase.Close();
}
catch(...)
{
....
}
but i have an error :the name path is not valid :sick:, i dont know why, the database file is in the same directory with the program and his name is name_list.dbf .
i use visual c++ to open connection with dbase data base using odbc my code is :
CDataBase DBase;
....
try
{
DBase.Open(NULL,false,false,"ODBC;DBQ=name_list.dbf;DRIVER={MICROSOFT dBase Driver (*.dbf)}");//the error is here !!!
CRecordset rec(&DBase);
rec.Open(CRecordset::snapshot,"SELECT * FROM name_list",CRecordset::readOnly);
DBase.Close();
}
catch(...)
{
....
}
but i have an error :the name path is not valid :sick:, i dont know why, the database file is in the same directory with the program and his name is name_list.dbf .