GUPTA AND ACCESS

forum.connectivity (1998-2005) & forum.td.connectivity (2005-2010)
G G

GUPTA AND ACCESS

Post by G G » 06 Apr 2010, 11:37

 Posted by:  G G 

Hi to all.
I want to set a numeric column in an Access d.b., to NOT NULL WITH DEFAULT
as in SqlBase
Asking for the correct syntax in an Access forum, i got that:
"ALTER TABLE Pippo ALTER COLUMN c_nome > Int NOT NULL DEFAULT 0"
and
"CREATE TABLE Pippo (c_nome Int NOT NULL DEFAULT 0)"
but I get an error when trying it from SqlTalk or SqlWindows.
ACCESS:-3551[Microsoft][Driver ODBC Microsoft Access] Syntax error in
CREATE TABLE.

I am connected via ODBC with connection string in the Sql.ini file.
REMOTEDBNAME=MANAGER,Driver=Microsoft Access Driver
(*.mdb);Dbq=G:\database\access\manager.mdb;MaxBufferSize=2048;PageTimeout=5;UID=admin;

They told me to use Currentproject.Connection.Execute "ALTER TABLE Pippo
ALTER COLUMN c_nome Int NOT NULL DEFAULT 0" but how substitute this sintax
to Gupta?

Thank you.

-----------------------------------
Luigi Fantelli
Skype: gigitf
-----------------------------------

Return to “td.connectivity”

Who is online

Users browsing this forum: [Ccbot] and 0 guests