To determine standard value - ADOX or ADO
Author |
Message |
Slim #1 / 5
|
 To determine standard value - ADOX or ADO
I caught that instruction in a book of Access2000, but it doesn't work (not even in Access2000, as I have just verified), then I am behind alternatives: CREATE TABLE tblEstoque(ItemID LONG CONSTRAINT PrimaryKey PRIMARY KEY, Qtde LONG DEFAULT 0)
Quote: > Hi, > If it works in Access 2000, do exactly the some thing in Access 2002. If
it does not work in 2002, Quote: > the cause of the error is NOT the SQL statement, neither in the VBA statement you use... What Quote: > statement (VBA or SQL) do you use in Access 2000 ? > Hoping it may help, > Vanderghast, Access MVP
Quote: > > Does anybody know as determining, for code, using the library ADOX or ADO, > > the standard value of a field in the table? > > I tried with an instruction SQL (using CREATE TABLE and ALTER TABLE, with > > Jet 4 ANSI-92 Extensions), but in AccessXP it didn't work, although in the > > 2000 it works.
|
Mon, 21 Mar 2005 22:39:15 GMT |
|
 |
Tim Ferguso #2 / 5
|
 To determine standard value - ADOX or ADO
Quote: > I caught that instruction in a book of Access2000, but it doesn't work > (not even in Access2000, as I have just verified), then I am behind > alternatives: > CREATE TABLE tblEstoque(ItemID LONG CONSTRAINT PrimaryKey PRIMARY KEY, > Qtde LONG DEFAULT 0)
I don't think the DEFAULT clause is supported. Tim F
|
Tue, 22 Mar 2005 01:46:55 GMT |
|
 |
Michel Wals #3 / 5
|
 To determine standard value - ADOX or ADO
Hi, You have to use ADO (DAO does not work, the query designer environment is based on DAO and won't work). In the Immediate window, try: CurrentProject.Connection.Execute "CREATE TABLE tblEstoque(ItemID LONG CONSTRAINT PrimaryKey PRIMARY KEY, Qtde LONG DEFAULT 0) " that works. CurrentDb.Execute "CREATE TABLE Estoque2(ItemID LONG CONSTRAINT PrimaryKey PRIMARY KEY, Qtde LONG DEFAULT 0) " that does not work (note that in the second case I change the name of the table, and use DAO, through CurrentDb, rather than ADO, through a Connection). MANY Jet 4 extensions work ONLY with ADO, not with DAO. Hoping it may help, Vanderghast, Access MVP
Quote:
> > I caught that instruction in a book of Access2000, but it doesn't work > > (not even in Access2000, as I have just verified), then I am behind > > alternatives: > > CREATE TABLE tblEstoque(ItemID LONG CONSTRAINT PrimaryKey PRIMARY KEY, > > Qtde LONG DEFAULT 0) > I don't think the DEFAULT clause is supported. > Tim F
|
Tue, 22 Mar 2005 18:29:15 GMT |
|
 |
Slim #4 / 5
|
 To determine standard value - ADOX or ADO
it is there that, now it worked. I always thought the way SQL of the query roots the widest resource for instructions SQL, I didn't imagine that to execute for ADO would feel more resources. I sought that solution in MSDN and I didn't find anything. Where did you find that clue?
Quote: > Hi, > You have to use ADO (DAO does not work, the query designer environment is
based on DAO and won't Quote: > work). In the Immediate window, try: > CurrentProject.Connection.Execute "CREATE TABLE tblEstoque(ItemID LONG
CONSTRAINT PrimaryKey Quote: > PRIMARY KEY, Qtde LONG DEFAULT 0) " > that works. > CurrentDb.Execute "CREATE TABLE Estoque2(ItemID LONG CONSTRAINT PrimaryKey
PRIMARY KEY, Qtde LONG Quote: > DEFAULT 0) " > that does not work (note that in the second case I change the name of
the table, and use DAO, Quote: > through CurrentDb, rather than ADO, through a Connection). > MANY Jet 4 extensions work ONLY with ADO, not with DAO. > Hoping it may help, > Vanderghast, Access MVP
> > > I caught that instruction in a book of Access2000, but it doesn't work > > > (not even in Access2000, as I have just verified), then I am behind > > > alternatives: > > > CREATE TABLE tblEstoque(ItemID LONG CONSTRAINT PrimaryKey PRIMARY KEY, > > > Qtde LONG DEFAULT 0) > > I don't think the DEFAULT clause is supported. > > Tim F
|
Thu, 24 Mar 2005 01:00:26 GMT |
|
 |
Michel Wals #5 / 5
|
 To determine standard value - ADOX or ADO
Hi, It is just a matter of fact that some tricks work only with ADO, some other only with DAO... setting a DEFAULT is not the only new "extension" that works only with ADO. Vanderghast, Access MVP Quote:
> it is there that, now it worked. > I always thought the way SQL of the query roots the widest resource for > instructions SQL, I didn't imagine that to execute for ADO would feel more > resources. > I sought that solution in MSDN and I didn't find anything. Where did you > find that clue?
> > Hi, > > You have to use ADO (DAO does not work, the query designer environment is > based on DAO and won't > > work). In the Immediate window, try: > > CurrentProject.Connection.Execute "CREATE TABLE tblEstoque(ItemID LONG > CONSTRAINT PrimaryKey > > PRIMARY KEY, Qtde LONG DEFAULT 0) " > > that works. > > CurrentDb.Execute "CREATE TABLE Estoque2(ItemID LONG CONSTRAINT PrimaryKey > PRIMARY KEY, Qtde LONG > > DEFAULT 0) " > > that does not work (note that in the second case I change the name of > the table, and use DAO, > > through CurrentDb, rather than ADO, through a Connection). > > MANY Jet 4 extensions work ONLY with ADO, not with DAO. > > Hoping it may help, > > Vanderghast, Access MVP
> > > > I caught that instruction in a book of Access2000, but it doesn't work > > > > (not even in Access2000, as I have just verified), then I am behind > > > > alternatives: > > > > CREATE TABLE tblEstoque(ItemID LONG CONSTRAINT PrimaryKey PRIMARY KEY, > > > > Qtde LONG DEFAULT 0) > > > I don't think the DEFAULT clause is supported. > > > Tim F
|
Fri, 25 Mar 2005 18:07:35 GMT |
|
|
|