Re: Reinstall Microsoft Jet 4.0



Thanks for your speedy reply C P,

I would guess that the issue is probably Jet settings and/or connection string settings rather than Jet being corrupted.

I emailed the source code and the database demo application to Salabium.
He recompiled it without changing anything and the export worked on his pc.

I connect the database as follows:

procedure TfrmMain.FormCreate(Sender: TObject);
var
ADOConnSource: widestring;
DBPath: string;
ExportDBPath: string;
begin
DBPath := ExtractFilePath( Application.ExeName ) + 'code.mdb';
ExportDBPath := ExtractFilePath( Application.ExeName ) + 'export.mdb';
ADOConnSource := 'Provider=Microsoft.Jet.OLEDB.4.0;' +
'User ID=Admin;Data Source=' +
DBPath +
';Mode=Share Deny None;' +
'Persist Security Info=False;';
ADOTable1.ConnectionString := ADOConnSource;
ADOTable1.Active := True;
StatusBar1.Panels[0].Text := MinimizeName( DBPath, Canvas, 250 );
StatusBar1.Panels[1].Text := MinimizeName( ExportDBPath, Canvas, 250 );
end;

update them in a particular order. Is it possible that something like this is your issue, and the reason the component vendor doesn't have the same issue is his table structure/query is different than yours and thus able to avoid the problem?

No, he has same source code and same database.

Looking at your table structure from the BDE newsgroup,
maybe it would work if you modified your table structure to be:

Method: String 255
Description: String 255
Category:: String 255
Comment: String 255
Author: String 255
Code: Memo

I put the Memo field as the last field in the table. Also I think I mentioned before that you didn't have an obvious primary key field for your table. Making sure your table has a primary key field may also help solve the problem. Aside from giving Access better performance, a lack of a Primary Key seems to cause issues in a number of database formats.

I did have it setup with an autonumber field as the first field set as primary key. I have since changed it by removing the autonumber field and had:
Method: String
Code: Memo
Description: String
Category:: String
Comment: String
Author: String

I switched it to your suggestion.

I tried setting the Method as the primary key in Access but it will not permit saving the structure unless Method is not the primary key. This is such a simple database the only other alternative i can see is to add a autonumber field has the first field with it having a primary key.

Thanks for your help.

Bill


.



Relevant Pages

  • Re: Q: Datatables, Datasets and updating
    ... I have two tables A and B in the SQL database. ... ID_A (the primary key of A) and NAME_A (a string ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Code is failing on empyt recordset
    ... Set rst = CurrentDb.OpenRecordset ... primary key field for TST_FR_CASE_OTHERS. ... > fieldnames (even a query alias), ... >> Function RecordsInTable(Tablename As String, ...
    (microsoft.public.access.forms)
  • Re: Unmatch query?
    ... i.e. a single primary key field. ... Sub CompareTables(BaseTable As String, KeyField1 As String, _ ... Free subscription: ... For example an Employee table that have ...
    (microsoft.public.access.queries)
  • Re: "Terms" in PHP
    ... >blog_id INT UNASIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, ... the unsigned integer type. ... varchar has a small overhead to store the length of the string that's ... but it only stores the data you put in it. ...
    (php.general)
  • How random are randomly generated numbers ?
    ... I have a table that has a string primary key, consisting of 25 numbers, ... Dim i As Integer ... got the duplicate key message. ...
    (microsoft.public.access.formscoding)