Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a dBASE III database using ADOX

Status
Not open for further replies.

forumuser

Programmer
Oct 3, 2002
2
US
Hi,

I want to create a new database(catalog) and then want to add a table to it using ADOX. The catalog create method works fine if I try to create a MS Access table. But

The connect string I am using to create a dBASE III database.
"Driver={Microsoft dBASE Driver (*.dbf)};"
"DriverID=277;Dbq='C:\\Personal\\Test.DBF';"

The connect method returns "No such interface supported".

Then I tried the following connection string that I read somewhere.

_CatalogPtr pCatalog = NULL;
HRESULT hresult =
pCatalog.CreateInstance(__uuidof(Catalog));

pCatalog->Create(L"Provider=Microsoft.Jet.OLEDB.4.0;"
L"Data Source='C:\\Personal\\Test.DBF';"
L"Jet OLEDB:Encrypt Database=True;"
L"Jet OLEDB:Engine Type=10;");

This results into the following error:
"Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

Please help.
Thank you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top