Something like this should work.

1. Make the following changes to the script:
 Take out statements like the first one.
 Remove all the square brackets
 Change IDENTITY(...) to int
 Change smalldatetime to date
 Change varchar () to text

(Also if there are any text fields change them to memo... there are some
other SQL Server datatypes that Access doesn'tunderstand as well)

2. Create an empty database.
3. Run the script (Query->New->SQL)
4. Manually change the int keys to autonumbers
5. If you want any constraints, set these up in the Relationships view

Nick

-----Original Message-----
From: Lorenzo Imperatrice [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 10:42 AM
To: CF-Talk
Subject: RE: ms sql to ms access


if exists (select * from dbo.sysobjects where id object_id(N'[dbo].[UserProfiles]') 
and OBJECTPROPERTY(id, N'IsForeignKey') 1)
ALTER TABLE [dbo].[Invoices] DROP CONSTRAINT UserProfiles
GO


CREATE TABLE [dbo].[UserProfiles2] (
        [UserID] [int] IDENTITY (100, 1) NOT NULL ,
        [CompanyID] [int] NOT NULL ,
        [Username] [varchar] (50) NULL ,
        [Password] [varchar] (50) NULL ,
        [Datestamp] [smalldatetime] NULL ,
        [Email] [varchar] (255) NULL ,
        [TaxID] [varchar] (20) NULL ,
        [Hourly] [int] NULL ,
        [Percentage] [int] NULL ,
        [Payroll] [decimal](18, 0) NULL ,
        [PayrollStart] [datetime] NULL ,
        [PayrollEnd] [datetime] NULL ,
        [SocialSecurityTax] [money] NULL ,
        [FederalTax] [money] NULL ,
        [StateTax] [money] NULL ,
        [Company] [varchar] (255) NULL ,
        [PrimaryAcct] [int] NULL ,
        [FirstName] [varchar] (255) NULL ,
        [LastName] [varchar] (255) NULL ,
        [Address1] [varchar] (255) NULL ,
        [Address2] [varchar] (255) NULL ,
        [City] [varchar] (100) NULL ,
        [State] [varchar] (50) NULL ,
        [Zip] [varchar] (15) NULL ,
        [Phone] [varchar] (50) NULL ,
        [Fax] [varchar] (50) NULL ,
        [Browser] [varchar] (100) NULL ,
        [Description] [text] NULL ,
        [Image] [varchar] (50) NULL ,
        [LeftOver] [money] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

this a part of the script....

L


-----Original Message-----
From: DeVoil, Nick [mailto:[EMAIL PROTECTED]]
Sent: mercoled� 22 agosto 2001 11.26
To: CF-Talk
Subject: RE: ms sql to ms access


Lorenzo

> i have a sql script and i wont this to became an access db....

Can you post the script?


**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to