Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2006, 05:12 AM
Registered User
 
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Query returns error

Hi guys !
Here is my question: I am trying to create a table with default values using SQL statements within Access. I use the following Query:

CREATE TABLE Table1 (Name VARCHAR NOT NULL, Num INTEGER DEFAULT 0);

Our friend Access returns an error on the word "DEFAULT"... Could you explain me why and how to solve the problem please?

Thanks in advance !

 
Old February 22nd, 2006, 05:43 AM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi ,
in access query it doesn't seem to work the 'DEFAULT' word . If you delete 'DEFAULT 0' it will work perfectly .

 
Old February 22nd, 2006, 08:30 AM
Registered User
 
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thx for your help!

after hours browsing on the internet i found a solution ! the DEFAULT keyword only works on ADO tables ! On DAO tables it does not exist...






Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - SQL query returns nothing from MySQL Calligra Access VBA 6 September 19th, 2007 04:10 PM
Urgent help! Index Server Query returns 0 records rakeshsharma Internet Information Services 0 August 29th, 2006 12:35 AM
Check if query returns results marcin2k Access VBA 10 December 9th, 2005 02:05 PM
RecordCount Query returns EOF and BOF jigs_bhavsar Pro VB Databases 3 November 11th, 2004 09:32 AM
SQL "Last" instruction returns wrong value rjp Access VBA 0 August 31st, 2004 10:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.