473,387 Members | 1,573 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,387 software developers and data experts.

how to create a database file

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
therefore want to be able to press a save button and store all my data
in one go.

Anyone had experience at this-how do I create a database file?

Best Regards,

Grant

Apr 14 '07 #1
5 5119

"Savante" <gr***********@savante.co.ukwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
>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
therefore want to be able to press a save button and store all my data
in one go.

Anyone had experience at this-how do I create a database file?

Best Regards,

Grant
Here is some code stripped from an earlier post that may be helpful to you,
alleged to work by the recipient:

Below is working example (semicolon added):
Module Module1
Sub Main()
CreateDb("E:\My folder\My data.mdb")
End Sub
Public Function CreateDb(ByVal path As String)
Dim adox As Object
adox = CreateObject("ADOX.Catalog")
adox.Create("Provider=Microsoft.Jet.OLEDB.4.0;" + _
"Data Source=" + path + _
";Jet OLEDB:Engine Type=5;")
End Function
End Module
In that same thread, somebody else suggested a utility here:

Here is a nifty little utility that allows you to point to an Access
database, then it generates VB.Net code to duplicate that database:
http://www.smithvoice.com/dbcopier.aspx



Apr 14 '07 #2
On Apr 14, 2:57 am, "Savante" <grant.thom...@savante.co.ukwrote:
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
therefore want to be able to press a save button and store all my data
in one go.

Anyone had experience at this-how do I create a database file?

Best Regards,

Grant
You might want to check out SQL Server Compact Edition. It does the
job of JET much, much better:

http://www.microsoft.com/sql/edition...t/default.mspx

http://www.developer.com/db/article.php/3628751

Apr 14 '07 #3
On 14 Apr, 14:31, "pvdg42" <pvd...@newsgroups.nospamwrote:
"Savante" <grant.thom...@savante.co.ukwrote in message

news:11**********************@n76g2000hsh.googlegr oups.com...


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
therefore want to be able to press a save button and store all my data
in one go.
Anyone had experience at this-how do I create a database file?
Best Regards,
Grant

Here is some code stripped from an earlier post that may be helpful to you,
alleged to work by the recipient:

Below is working example (semicolon added):
Module Module1

Sub Main()
CreateDb("E:\My folder\My data.mdb")
End Sub

Public Function CreateDb(ByVal path As String)
Dim adox As Object
adox = CreateObject("ADOX.Catalog")
adox.Create("Provider=Microsoft.Jet.OLEDB.4.0;" + _
"Data Source=" + path + _
";Jet OLEDB:Engine Type=5;")
End Function
End Module

In that same thread, somebody else suggested a utility here:

Here is a nifty little utility that allows you to point to an Access
database, then it generates VB.Net code to duplicate that database:http://www.smithvoice.com/dbcopier.aspx- Hide quoted text -

- Show quoted text -
Cheers,

I'll try that tomorrow and see how it goes!!

Best Regards,

Grant

Apr 15 '07 #4
On 14 Apr, 22:12, "camainc" <cama...@gmail.comwrote:
On Apr 14, 2:57 am, "Savante" <grant.thom...@savante.co.ukwrote:


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
therefore want to be able to press a save button and store all my data
in one go.
Anyone had experience at this-how do I create a database file?
Best Regards,
Grant

You might want to check out SQL Server Compact Edition. It does the
job of JET much, much better:

http://www.microsoft.com/sql/edition...t/default.mspx

http://www.developer.com/db/article.php/3628751- Hide quoted text -

- Show quoted text -
in what way- is it faster/?

Best Regards,
Grant

Apr 15 '07 #5
On 14 Apr, 14:31, "pvdg42" <pvd...@newsgroups.nospamwrote:
"Savante" <grant.thom...@savante.co.ukwrote in message

news:11**********************@n76g2000hsh.googlegr oups.com...


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
therefore want to be able to press a save button and store all my data
in one go.
Anyone had experience at this-how do I create a database file?
Best Regards,
Grant

Here is some code stripped from an earlier post that may be helpful to you,
alleged to work by the recipient:

Below is working example (semicolon added):
Module Module1

Sub Main()
CreateDb("E:\My folder\My data.mdb")
End Sub

Public Function CreateDb(ByVal path As String)
Dim adox As Object
adox = CreateObject("ADOX.Catalog")
adox.Create("Provider=Microsoft.Jet.OLEDB.4.0;" + _
"Data Source=" + path + _
";Jet OLEDB:Engine Type=5;")
End Function
End Module

In that same thread, somebody else suggested a utility here:

Here is a nifty little utility that allows you to point to an Access
database, then it generates VB.Net code to duplicate that database:http://www.smithvoice.com/dbcopier.aspx- Hide quoted text -

- Show quoted text -
Actually, this is probably a good place to ask....

In my datalogging program, it may be possible for two classes to try
and access the same output file at the same time to write data. Does
this corrupt the text file? Is using a database really going to help
here? or would you reccomend just using a timer at say 1sec intervals
and then using a streamwriter to output data to a file?

At the moment, I'd say there is a good possibility that one com port
may be writing to a file when another com port may try and open the
file for append.

Best Regards,

Grant

Apr 15 '07 #6

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

Similar topics

8
by: Jonas L | last post by:
I'm creating a application that should handle contacts, orders etc. I want to distribute only the exe file and let the application take care of creating and changing the database that is to be...
3
by: Roger | last post by:
Is it possible to create a database from a db2 client when the database contains both SMS and DMS tablespaces ? We have a special file structure that look like this : x:\instancename_dbname...
4
by: intl04 | last post by:
How do I create a data input form in Access that is external to the Access database to which it's connected (if that's possible, which I believe it is)? For example, if someone clicks on an Access...
9
by: Albretch | last post by:
.. I am trying to create a database in a MS Access DB via JDBC drivers. I have tried both sun.jdbc.odbc.JdbcOdbcDriver and ids.sql.IDSDriver From some reason both drivers Exceptions tell me...
13
by: Daniel Walzenbach | last post by:
Hi, Imagine the following situation: I have an asp.net application which allows uploading files to a SQL Server 2000 database (Files are stored as type "images"). As a next step I would like to...
9
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...
10
by: Minh | last post by:
I search in all the Disscussion but can not found. How can I create a MS Access Database file using C# code with a given Table Structure ? For example, I want to create a Access Database File...
3
by: Madhu | last post by:
All, New to DB2 environment. Can someone share a script that can be used to a create a DB2 UDB database manually. I am trying to create a database on Linux, single partition. Thanks Madhu
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.