473,803 Members | 1,992 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 bannerheaderban nerdetail ON bannerdetail (objectname) ;
CREATE INDEX elementsstoreba nnerdetail 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 4161
"Alfredo" <ag*****@teleli ne.es> wrote in message
news:f7******** *************** ***@posting.goo gle.com...
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 bannerheaderban nerdetail ON bannerdetail (objectname) ;
CREATE INDEX elementsstoreba nnerdetail 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(objectn ame)
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
1687
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 dissapointment we were looking towards a more positive attitude towards interoperation with third party products. Is it not possible for MS to ensure that Indigo has some compliance with emerging Asynchronous/Message based Web Service open...
3
3254
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 world-wide Usenet newsgroup dedicated to the discussion of Microsoft Windows 64-bit programming. This is not a Call for Votes (CFV); you cannot vote at this time. Procedural details appear below. All followup discussion should be crossposted to...
18
2261
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 ideas run free"....only to be washed up by the waves when the tide comes in -- this is exactly so so so Microsoft. Re-invent the dev tools every 3-5 years in the name of progress and hope developers don't notice -- good revenue generation for MS,...
7
8078
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 MS SQL's tables and loading into DB2 using DB2's LOAD utility. There are tons of colums of floating point types (singe precion & double precision types) in the database and when extracted using BCP, it generates data only upto 17 digits....
7
2028
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 2000. They are continuing to work on the issue, but it seems as if our progress is grinding to a halt. I asked this question on the newsgroups before going to MS but figured I'd give it another shot now that I have more information. The problem...
2
13537
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 execute a MailMerge to create mailing labels or customized letters. A label name known to MS Word MailMerge mailing label wizard may be used or a template file containing the field names Line1 thru Line5 for each record to be printed. If a...
1
2507
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 both the MS Visual Web Developer 2005 Express Edition and the MS Visual Studio 2005 Professional Edition used to develop .ASP applications?
0
9699
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10309
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10289
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.