473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ms-access db script creation

Hello, I have created the following table and her relations

CREATE TABLE bannerdetail (objectname VARCHAR(30), elementname
VARCHAR(30), sequence SMALLINT) ;

CREATE UNIQUE INDEX primarykey ON bannerdetail (objectname,
elementname, sequence) ;
CREATE INDEX bannerheaderbannerdetail ON bannerdetail (objectname) ;
CREATE INDEX elementsstorebannerdetail ON bannerdetail (elementname) ;

but

1- Foreing Keys does not work

2- I can not see in DESIGN mode (graphical view) neither PK nor FK
(relations panel)
Is there any utility to be run so db is updated or what else ?

Any idea ?

Thanks in advance

Alfredo
Nov 12 '05 #1
2 4135
"Alfredo" <ag*****@teleline.es> wrote in message
news:f7**************************@posting.google.c om...
Hello, I have created the following table and her relations

CREATE TABLE bannerdetail (objectname VARCHAR(30), elementname
VARCHAR(30), sequence SMALLINT) ;
CREATE UNIQUE INDEX primarykey ON bannerdetail (objectname,
elementname, sequence) ;
CREATE INDEX bannerheaderbannerdetail ON bannerdetail (objectname) ;
CREATE INDEX elementsstorebannerdetail ON bannerdetail (elementname) ;

but

1- Foreing Keys does not work


Firstly I would advise you to explcitly declare the nullability of columns,
otherwise you may have columns in your PK that allow nulls.

create table bannerdetail
(
objectname varchar(30) not null,
elementname varchar(30) not null,
sequence smallint not null
)
Next, primary and foreign keys are declared with the constraint clause. You
may declare them in the create table statement or afterwards using alter
table. To add a primary key constraint you can do this:

alter table bannerdetail
add constraint PK_bannerdetail
primary key
(
objectname,
elementname,
sequence
)
To declare the foreign key constraints you will need to reference the
foreign table, e.g.

alter table bannerdetail
add constraint FK_bannerdetail_objectname
references objects(objectname)
Look up CONSTRAINT clause in Access Help under Jet SQL.

Nov 12 '05 #2
Thank you very much John
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jules | last post by:
So with MS looking towards Longhorn Indigo messaging, for Service based Applications Integration, its brief dalience with adoption of industry wide Web Service standards is over. This is a major...
3
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.64bit This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.64bit as an unmoderated...
18
by: Rob R. Ainscough | last post by:
MS Visual Studio Ad contained in VS Magazine. Two developers in "hip" clothing diagramming out a huge flow chart on a beach. I could NOT stop laughing at the stupidity of the ad -- "Let your...
7
by: Dave | last post by:
We are trying to migrate a MS SQL server app to DB2 8.1 Linux platform. Our database has got about 300+tables with total size - 150 GB We are using MS SQL's BCP utility to extract data from...
7
by: Joe Ross | last post by:
I've been working with Microsoft support for over 3 weeks now on an intermittent General Network Error we're seeing in our production environment between our ASP.NET application and SQL Server...
2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
1
by: Dr T | last post by:
Hi! I downloaded MS Visual Web Developer 2005 Express Edition, MS .NET Framework SDK v2.0, and MS SQL Server 2005. Subsequently, I bought MS Visual Studio 2005 Professional Edition. 1) Are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.