ADOX error with fields of type AdDate
From: John Evans (johnevans_at_clear-Advantage.co.uk)
Date: 03/22/04
- Next message: Max Odendahl: "Open Tab delimited file with ADO"
- Previous message: Ryan Schoolman: "ADODataSet Refresh Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 22 Mar 2004 16:14:54 -0000
Dear all, I am using ADOX to build tables for a SQL server 2000 database.
I am using something like:
procedure TForm1.addtable(Conn: TAdoconnection);
var cat:catalog;
tbl,tbl2:table;
begin
cat:=CreateComObject(Class_catalog) as catalog;
cat.set_Activeconnection(conn.connectionObject);
tbl2:=CreateComObject(Class_table) as table;
tbl2.Name:='HCallHistory';
tbl2.Columns.Append('pkey',adChar, 5);
tbl2.Columns.Append('HelpCallpkey',adChar, 5);
tbl2.Columns.Append('DateAssigned',adDate, 0);
tbl2.Columns.Append('Assignedpkey',adChar, 5);
cat.Tables.Append(tbl2);
cat.Tables['HCallHistory'].keys.Append('PK_HCallHistory',adKeyPrimary,'pkey'
,'','');
end;
If I do not include the data field, then everything works fine. With the
date field the code fails when it tries to append the table to the catalog.
Any ideas?
regards
-- John Evans Managing Director Clear Advantage Ltd www.Clear-Advantage.co.uk
- Next message: Max Odendahl: "Open Tab delimited file with ADO"
- Previous message: Ryan Schoolman: "ADODataSet Refresh Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|