473,652 Members | 3,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create DB without ADOX

I have Googled this topic to death to the best of my ability and hope that
somebody here can help.

I do not want to have any COM dependencies in a project. For various
reasons, the application will use an Access database. Unfortunately, it
appears ADO.NET does not allow you to create a database and tables.
Everything I have seen seems to point to ADOX, but that requires an ActiveX
component which I extremely want to avoid.

Does anybody know how to programmaticall y create an Access DB and tables in
that DB without using a COM object?

Thanks in advance for any help.

Jul 21 '05 #1
3 2580
The issue is not creating tables, as Ican send DDL to every database I have
worked with without problem. The issue is creating the original database. To
completely avoid COM, you end up creating a database template (.mdb with no
tables) and copying it where you need it. You can then add objects to the
database, as long as they are definable in SQL (for example, forms are
objects you cannot write out in SQL, so you have to use Access objects (COM)
to set them up).

NOTE: I have not dinked fully with the Office .NET components. With these,
you may be able to do more of the creation, etc., of Office docs and files.
You note this is aimed at Office 2003 (maybe XP?), so it is not applicable
to all versions.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** ***
Think Outside the Box!
*************** *************** *************** ***
"Tink" <Ti**@discussio ns.microsoft.co m> wrote in message
news:45******** *************** ***********@mic rosoft.com...
I have Googled this topic to death to the best of my ability and hope that
somebody here can help.

I do not want to have any COM dependencies in a project. For various
reasons, the application will use an Access database. Unfortunately, it
appears ADO.NET does not allow you to create a database and tables.
Everything I have seen seems to point to ADOX, but that requires an ActiveX component which I extremely want to avoid.

Does anybody know how to programmaticall y create an Access DB and tables in that DB without using a COM object?

Thanks in advance for any help.

Jul 21 '05 #2
The Access objects are definitely easier, but unless the Office .NET
components are complete in that area, you end up with some Interop.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** ***
Think Outside the Box!
*************** *************** *************** ***
"Tink" <Ti**@discussio ns.microsoft.co m> wrote in message
news:38******** *************** ***********@mic rosoft.com...
Greg,

I should have noted that I was aware I could copy a database template, but I was not fully aware that tables and their structure could be done using ..NET technologies. Unfortunately, I will have to Google/MSDN that as I am pretty lame at SQL.

Thanks though - that is a better solution than copying a complete database
template IMHO.
Tink

Jul 21 '05 #3
On Thu, 19 Aug 2004 05:43:04 -0700, "Tink" <Ti**@discussio ns.microsoft.co m> wrote:

¤ I have Googled this topic to death to the best of my ability and hope that
¤ somebody here can help.
¤
¤ I do not want to have any COM dependencies in a project. For various
¤ reasons, the application will use an Access database. Unfortunately, it
¤ appears ADO.NET does not allow you to create a database and tables.
¤ Everything I have seen seems to point to ADOX, but that requires an ActiveX
¤ component which I extremely want to avoid.
¤
¤ Does anybody know how to programmaticall y create an Access DB and tables in
¤ that DB without using a COM object?
¤
¤ Thanks in advance for any help.

There is no way to eliminate COM dependencies from this process, and you're not adding an ActiveX
component since your project will still be dependent upon MDAC and Jet (for an Access database) if
you are using OLEDB.
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #4

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

Similar topics

2
5778
by: desc | last post by:
I am trying to create an access db using ADOX in C# and I am finding difficulties to find documentation on this in msdn library. Does anyone have any documentation or samples of creating an access db programatically in c#? THANKS.
1
4567
by: Oliver | last post by:
Hello ! Can anyone reproduce this? I am using WinXP SP1 (MDAC 2.8) with MSVS 2003. I can create a complete database with ADOX and everything works, however if I try to add a Datatype adBoolean the program raises an exception without any information :( I am adding all of the columns the same way, its only the boolean type which gives the problems:
9
8292
by: Peter | last post by:
Hello£¬everyone, My program will collect a testing machine's data ,save the data and deal with the data everyday. I want to use vb.net to create database, add and delete tables or modify the records in the database. Is it possible to create a SQL Server database using vb.net? I know I can use vb.net and ADOX to create a Access database. But I can't create SQL database using vb.net.
2
3066
by: gaffar | last post by:
Hello Sir, i need the funtionality of Using ADOX to create a JET Database and tables in it and one to many relationship between the tables. Thanks for your help Gaffar.
4
8118
by: Wayne Wengert | last post by:
I am trying to create a VB.NET Windows application to move some data from a local Access DB table to a table in a SQL Server. The approach I am trying is to open an OLEDB connection to the local Access DB and then add a Linked Table pointing to the table on the SQL Server and then run an "Insert Into (linked table)" query to add the new rows. I am having a problem getting the syntax to add that linked table to my local Access DB. When I...
1
3433
by: sunlight_sg | last post by:
Hello, i am using ADOX + VB .NET to create a Access Database programmatically. I plan to set some properties of the column such primary key. The code is as follows: Dim cat As ADOX.Catalog Dim tbl As ADOX.Table Dim idx As ADOX.Index Dim prp As ADOX.Property
3
243
by: Tink | last post by:
I have Googled this topic to death to the best of my ability and hope that somebody here can help. I do not want to have any COM dependencies in a project. For various reasons, the application will use an Access database. Unfortunately, it appears ADO.NET does not allow you to create a database and tables. Everything I have seen seems to point to ADOX, but that requires an ActiveX component which I extremely want to avoid. Does...
5
5132
by: Savante | last post by:
I am trying to investigate the JET databases to enable me to save data from a datalogging program I'm writing. At the moment, I've been using tutorial 21 of the SAMS "Learn it in 24 hours book". Whilst the book has been useful in terms of adding and editing records from an already existing database file, I want to be able to make my own database file at runtime. My databasing program can create an unknown number of columns and I...
0
8367
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
8279
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
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
8703
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
8467
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
8589
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...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5619
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();...
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.