Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Visual Dbase > Packing dBase t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 106 of 130
Post > Topic >>

Packing dBase tables while using ODBC drivers?

by "Sonnich" <sonnich.jensen@[EMAIL PROTECTED] > Aug 24, 2005 at 07:53 AM

While not using BDE, I tyr to connect to my DB using ADO.
Does anyone know, how, in Delphi, using ADO and ODBS driver for dBase
files, I can pack the dBase tables?
var Ai : OleVariant

  CoInitialize(nil);
  connection := CreateOleObject('ADODB.Connection') as _Connection;
  connection.Open('Data Source=test', sUsername, sPassword, 0);
connection.Execute('Set Exclusive On', Ai, adCmdText);
connection.Execute('Pack test.dbf', Ai, adCmdText);

The 2 last lines cause the problems, an error message telling me, that
I can only user insert,update etc... verbs for direct changes into the
database.

The problem is, once deleted, a row is marked deleted, but is still
present in the file. Therefore packing it makes the file (much)
smaller.
 




 1 Posts in Topic:
Packing dBase tables while using ODBC drivers?
"Sonnich" <s  2005-08-24 07:53:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Wed Jul 9 2:00:44 CDT 2008.