PC Review


Reply
Thread Tools Rate Thread

Can these SQL Table Definitions be used?

 
 
Cheese
Guest
Posts: n/a
 
      12th Nov 2008
I would like to use the SQL Table Definitions available here to create a
Microsoft Access database:

http://wireless.fcc.gov/uls/data/doc.../pa_ddef42.txt

If this is possible, how would I do it?
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      12th Nov 2008
You can use similiar DDL queries in Access if you execute them in vba code
using ADO/ADOX.

You cannot place multiple CREATE TABLE statements in one query.

Here's an example of creating a table under ADOX:
http://allenbrowne.com/func-ADOX.html#CreateTableAdox

Here's a list of the data types to use in ADOX (and other libraries)
compared to the Access interface:
http://allenbrowne.com/ser-49.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Cheese" <(E-Mail Removed)> wrote in message
news:2AF4300A-9B12-440A-87E8-(E-Mail Removed)...
>I would like to use the SQL Table Definitions available here to create a
> Microsoft Access database:
>
> http://wireless.fcc.gov/uls/data/doc.../pa_ddef42.txt
>
> If this is possible, how would I do it?


 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      12th Nov 2008
"Cheese" <(E-Mail Removed)> wrote in message
news:2AF4300A-9B12-440A-87E8-(E-Mail Removed)...
>I would like to use the SQL Table Definitions available here to create a
> Microsoft Access database:
>
> http://wireless.fcc.gov/uls/data/doc.../pa_ddef42.txt
>
> If this is possible, how would I do it?



You'd need to set the database to use ASNI-92 SQL syntax. That's an option
on the Tools -> Options... dialog's Tables/Queries tab. You can't run them
all as a batch, because Access won't accept that, but you could cut out each
individual statement and execute it separately.

I notice that there are NUMERIC -- a.k.a. DECIMAL -- fields there, and there
have been some bugs in Jet's handling of that data type. I don't know where
that stands now. You might look at how those fields are being used, and
consider whether another data type might be substituted.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
Albert D. Kallal
Guest
Posts: n/a
 
      12th Nov 2008
"Dirk Goldgar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...


> I notice that there are NUMERIC -- a.k.a. DECIMAL -- fields there, and
> there have been some bugs in Jet's handling of that data type. I don't
> know where that stands now. You might look at how those fields are being
> used, and consider whether another data type might be substituted.
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>


I just did a quick cut/paste of the 1st table and with ansi92 turned on it
worked fine...

eg:
create table dbo.PUBACC_A2
(
Record_Type char(2) null,
etc.....

The above worked fine if you REMOVE the "database" "dbo" prefix.

However, what is REALLY interesting is that if you use the "dbo" prefix,
access WILL ASSUME the database is the SAME name but in access "default"
dir.

So, if one uses "dbo", then the database MUST BE

C:\Documents and Settings\Albert\My Documents\dbo.mdb

If the dbo is dropped, then access will not care where the mdb is currently
placed...

I not really worked with the decimal types, but certainly some people been
using them without problems....

So, to the orignal poster, you can cut/paste into the sql editor and hit the
run key....it will create the table for you. However, you MUST DO ONE table
at a time.

If you don't want to do all those cut/paste (you have to do one at a time),
then I would consider writing a import rotuine in vba to execute the whole
script. Or, simply fire up the free editon of sql server paste in the text,
run and then export the database to ms-access.....


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)


 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      12th Nov 2008
"Albert D. Kallal" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> The above worked fine if you REMOVE the "database" "dbo" prefix.


Darn! I meant to mention that, but I forgot. Thanks for pointing that out,
Albert.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
table definitions =?Utf-8?B?Y29sZ2F0ZW1hbg==?= Microsoft Access 1 13th Nov 2006 06:43 PM
Printing out Table Definitions =?Utf-8?B?QW5uZQ==?= Microsoft Access 5 29th Aug 2005 09:56 PM
Couldn't read definitions; no read definitions permission for table or query 'Msysaces'. =?Utf-8?B?RGF2aWQ=?= Microsoft Access 1 19th Dec 2003 09:23 PM
Printing table definitions Susan Microsoft Access Database Table Design 1 7th Nov 2003 01:31 AM
Printing Table Definitions Susan Microsoft Access Database Table Design 1 6th Nov 2003 03:38 AM


Features
 

Advertising
 

Newsgroups
 


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