Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Access from Excel using ADO

I assume you are using DDL statements i.e. CREATE TABLE. Therefore,

1. The Autonumber ('IDENTITY' in SQL Server) is evil, avoid using it.
But if you must, the keyword is IDENTITY(1,1) - it is for Jet 4.0,
anyhow.

2. It is good practise to always use either NULL or NOT NULL, even
though NULL is the default.

Here's an example:

CREATE TABLE PersonalDetails (
RefID IDENTITY(1,1) PRIMARY KEY,
Name VARCHAR(35) NOT NULL UNIQUE,
Description VARCHAR(50) NULL
)

--

"Raj" wrote in message ...
Hello, please help if you can.

I am using ADO to add data from Excel to an Access
Database. I am successful so far. I only need to add two
things:

1. How can I add an "AutoNumber" column using ADO?

2. When adding fields to a table, how can I tell Access
that the field may be null (equivalent to
setting "Required" to no) using ADO?

Your example code would be most appreciated. Thanks in
advance for your assistance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query from Access into Excel cause Access to go to read only T Stephens Excel Discussion (Misc queries) 0 March 24th 09 04:17 PM
Can Excel access data from Access?! Al Excel Discussion (Misc queries) 5 April 5th 08 03:52 PM
Access Form In An Access Report (SubForm) Question Gary Links and Linking in Excel 0 January 27th 06 05:54 AM
export access to excel. change access & update excel at same time fastcar Excel Discussion (Misc queries) 0 June 24th 05 09:27 PM
How to access ACCESS from Excel! Gordon Cartwright[_2_] Excel Programming 3 November 8th 03 11:50 AM


All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"