What is your problem exactly?
Ignatius
____________________________________________
----- Original Message -----
From: "Jaap Aikema" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 11:58 AM
Subject: [PHP-DB] Create Table with AutoIncrement-field in M$ AccessDB
> I try to make a new table using PHP4 & M$ Access (via ADODB).
> This is the code I use:
>
> //begin DB-connection to create table
> $db_connection = new COM("ADODB.Connection");
> $db_connstr = "driver={Microsoft Access Driver (*.mdb)}; DBQ=".
> realpath("database.mdb") ." ;DefaultDir=". realpath("");
> $db_connection->open($db_connstr);
>
> $table = "CREATE TABLE $pad (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
> name TEXT(30),
> email TEXT(30),
> http TEXT(30),
> icq TEXT(15),
> message MEMO,
> adddate TEXT(15),
> ip TEXT(15),
> location TEXT(35),
> browser TEXT(55),
> comment TEXT(255),
> rating INT NOT NULL
> )";
> $result = $db_connection->execute($table);
> $db_connection->Close();
> //end DB-connection to create table
>
> when I delete the "AUTO_INCREMENT"-part, the table is created properly,
> exept for the fact that the 'id' is NOT autoincrement.
>
> Does anyone have a solution (or workaround)
>
> Tnanx Aikie
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php