473,326 Members | 2,081 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,326 software developers and data experts.

How to create a new DB with code?

Could anyone point me to an article that can explain to
me how to create an Access database in code using Visual
Basic .NET?

I really don't want an OLEDB connection .... I want a
private database that simply resides as a file on my
system and is accessed directly by the software I write.
It is NOT intended for the internet or to be read or
written too by anyone over a network.

I also don't want to use any controls that simplify the
process and limit my ability. I want to do it all in code.

Thank you in advanced,
K
Jul 21 '05 #1
7 1867
>Could anyone point me to an article that can explain to
me how to create an Access database in code using Visual
Basic .NET?

I really don't want an OLEDB connection ....


Well, if you want to do ANYTHING with a database, you need to have a
connection to it - even if it resides locally on your machine!

"Connection" doesn't mean something that goes out to the network or
internet - it just means a way to get at your data. Without
connection, you can't do anything - period.

Marc

================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Jul 21 '05 #2
On Tue, 7 Oct 2003 04:18:32 -0700, "Kline" <as**@hotmail.com> wrote:

¤ Could anyone point me to an article that can explain to
¤ me how to create an Access database in code using Visual
¤ Basic .NET?
¤
¤ I really don't want an OLEDB connection .... I want a
¤ private database that simply resides as a file on my
¤ system and is accessed directly by the software I write.
¤ It is NOT intended for the internet or to be read or
¤ written too by anyone over a network.
¤
¤ I also don't want to use any controls that simplify the
¤ process and limit my ability. I want to do it all in code.

You have two choices and both will require COM interop. One uses ADOX (Microsoft ADO Ext 2.x for DDL
and Security) and OLEDB with Jet is required. The other uses the original (and somewhat dated) Jet
database engine layer DAO (no OLEDB is required).

There is no native .NET Jet database engine layer so you will have to rely on the COM objects.

If there is one that you would prefer, post a follow-up and we can come up with an example.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #3
>There is no native .NET Jet database engine layer so you will have to rely on the COM objects.

Well, there's a native OleDB provider which can talk to any OleDB
database - including MS Access / Jet, no??

Marc

================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Jul 21 '05 #4
Marc,

Paul is correct, there is no native .net Jet engine
layer. If you read the original post correctly, that is
essentially what Kline wanted, the kind of connection and
control over an Access database the we got from DAO. ADOX
is also a very good solution. Good post Paul.

If I could humbly offer another suggestion to Kline; have
you considered using xml for the data store instead? In
the situation you describe, it might work for you.

Kirk

ps. I hope I didn't just get in the middle of an MVP
fight. If so, I want both of you to know that I am a
confirmed coward and will "RUN AWAY, RUN AWAY!", just as
fast as I can. (Please, no rabbits)

-----Original Message-----
There is no native .NET Jet database engine layer so you
will have to rely on the COM objects.
Well, there's a native OleDB provider which can talk to any OleDBdatabase - including MS Access / Jet, no??

Marc

================================================= ========= ======Marc Scheuner May The Source Be With You!Bern, Switzerland m.scheuner(at) inova.ch.

Jul 21 '05 #5
On Tue, 07 Oct 2003 16:09:10 +0200, Marc Scheuner [MVP ADSI] <m.********@inova.SPAMBEGONE.ch> wrote:

¤ >There is no native .NET Jet database engine layer so you will have to rely on the COM objects.
¤
¤ Well, there's a native OleDB provider which can talk to any OleDB
¤ database - including MS Access / Jet, no??

Yes you can *connect* to an Access database using the native .NET OLEDB provider and the Jet OLEDB
provider, but there is no facility for *creating* an Access database using the native .NET OLEDB
provider.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #6
>¤ >There is no native .NET Jet database engine layer so you will have to rely on the COM objects.
¤
¤ Well, there's a native OleDB provider which can talk to any OleDB
¤ database - including MS Access / Jet, no??

Yes you can *connect* to an Access database using the native .NET OLEDB provider and the Jet OLEDB
provider, but there is no facility for *creating* an Access database using the native .NET OLEDB
provider.


Okay, thanks, that clears it up - I've never really done much in
Access, but I thought there was a way to get at Access tables if
needed. And I just assumed that would also give me the opportunity to
create new Access DB's if needed - thanks for clarifying. One more
reason for me not to use Access anymore.

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Jul 21 '05 #7
>ps. I hope I didn't just get in the middle of an MVP fight. If so, I want both of you to know that I am a
confirmed coward and will "RUN AWAY, RUN AWAY!", just as fast as I can. (Please, no rabbits)


<hehe> don't worry - I was just trying to get an understanding of what
you guys mean by "native Jet layer" - Paul cleared that up quite
nicely.

No rabbits?!?!?! ;-) I don't quite follow..... some inside joke or
somethin' ??

In that spirit: what's a wok? A wok is what you twow at a wabbit .....
;-))

Marc

================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Jul 21 '05 #8

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

Similar topics

5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
15
by: Brian Rogers | last post by:
Hello everyone, I apologize for the cross and re-post, but I am still searching for an answer. Why can C++ can create this object, but C# can't? I am trying to create an instance of the...
4
by: John T. Howard | last post by:
Can you issue commands from VB.Net to create and delete databases? I would like to create, delete, and copy MSAccess tables and/or databases from code. Can this be done? Can you show, or point...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
11
by: raylopez99 | last post by:
Keep in mind this is my first compiled SQL program Stored Procedure (SP), copied from a book by Frasier Visual C++.NET in Visual Studio 2005 (Chap12). So far, so theory, except for one bug...
14
RMWChaos
by: RMWChaos | last post by:
Firebug is reporting "too much recursion" when I attempt to create a child element in a parent that doesn't exist yet. The script should automatically create the missing parent before going on to...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.