|
-
Jan 16th, 2005, 10:26 AM
#1
I need to create and maintain a new DB in VB.net [pretty much resolved]
I would like to write my own version of Quicken, and I think I need a DB to store everything(I could put in all in files, but I think it would be slow.) In the DB, for to start, I will have accounts, spending categories (who or what money the money gets spend on) and payees. Each member of the Accounts field (a particular account) will have information like name, address, phone, etc. Also each account will need and account register that holds daily transaction in the account. I don't know who to set this up in VB.net. How do I set up the DB, and what tools/code statement are available in VB.net? Does any one have a sample project regarding DB's? Not necessarily a quicken type DB, just something that might have the same type of structure.
thanks a bunch
kevin
Last edited by kebo; Jan 19th, 2005 at 12:12 PM.
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 17th, 2005, 05:59 AM
#2
Lively Member
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
I have made an application that might be intresting for you. i wrote it for a cycling club, and it is used for maintaining a member database.
i used an ms access database, to store the data
data that will be stored are:
First and lastname, adress, date of birth, some numbers, and how many kilometers each member has.
i can send it to you if you like.
-
Jan 17th, 2005, 10:58 AM
#3
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
please do send it.
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 17th, 2005, 06:07 PM
#4
Junior Member
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
I think this link might contain some useful stuff on working with datasets and Access:
http://www.programmersheaven.com/zon...1000/23332.htm
If you're also interested in a text reference, I found Day 12 in Sams 'Teach Yourself Visual Basic.NET in 21 Days' (Mackenzie and Sharkey) a good start.
-
Jan 17th, 2005, 09:29 PM
#5
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
thanks, I'll check it out
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 18th, 2005, 11:50 AM
#6
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
that is exactly what I was looking for. thanks
VB Code:
Dim strConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & g_strAppPath & "\PhoneBook.mdb"
Dim objConn As New System.Data.OleDb.OleDbConnection( strConnectionString )
Dim cb As System.Data.OleDb.OleDbCommandBuilder
' Connect to provider (connectionstring above)
objConn.Open()
In this code, if Phonebook.mdb doesn't exist in the right place the code errors. Is there a way that I can create an mdb file from VB code? If the mdb file ever gets delete, the code breaks.
thanks
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 18th, 2005, 12:34 PM
#7
Junior Member
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
It took some digging but i found an old post that may help you.
Create Database Programmatically
-
Jan 18th, 2005, 12:46 PM
#8
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
ok...Im getting close (but I kinda feel like a tard), but
VB Code:
Dim ADOXcatalog As New ADOX.Catalog
Dim ADOXtable As New ADOX.Table
Dim SecondTable As New ADOX.Table
Dim ADOXindex As New ADOX.Index
give me errors that ADOX is not defined. Do I need to add a control to the form...I'm so lost but so close to learning
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 18th, 2005, 01:05 PM
#9
Junior Member
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
Sorry gave you the wrong link. You need to reference Microsoft ADO Ext. 2.7 for DDL and Security to access ADOX.
The right link.
Microsoft
-
Jan 18th, 2005, 02:09 PM
#10
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
I'm finally moving forward thanks. Now I need to know how to open it after its been created (still feeling like a tard )
VB Code:
Dim ADOXcatalog As New ADOX.Catalog
Dim ADOXtable As New ADOX.Table
Dim SecondTable As New ADOX.Table
Dim ADOXindex As New ADOX.Index
Dim appPath As String = Application.StartupPath
Try
ADOXcatalog.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & appPath & "\test.mdb")
Catch ex As Exception
If ex.Message = "Database already exists." Then
'I need code to open the DB
'
'
Else
MessageBox.Show(ex.Message)
End If
End Try
I know I its ADOXcatalog.something, but I can't figure it out nor find it
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 18th, 2005, 02:38 PM
#11
Junior Member
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
To open it just use the normal code to open a database file. Below is a sample. I am still very new to programming in general but this should help you.
If you have any other questions feel free to ask.
[Code]
Imports System.Data.OleDb
Dim dconn As OleDbConnection = New OleDbConnection _(provider=Microsoft.Jet.OLEDB.4.0;Data Source = nameOfDatabase.mdb)
' Open the database
dconn.Open
' Close the database
dconn.Close
-
Jan 18th, 2005, 02:43 PM
#12
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
so what's the difference then between using ADOX and OleDB? I can't find hardly any documentation about ADOX in either of my .net books
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 19th, 2005, 11:06 AM
#13
Junior Member
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
To tell you the truth all i know is that ADOX was used in vb6. I just searched the forums for creating a new access database and found this post . Your question peaked my interest because right know I am thinking about doing the same thing in a program that I am writing.
Will
-
Jan 19th, 2005, 12:11 PM
#14
Re: I need to create and maintain a new DB in VB.net (also posted in the DB forum)
thanks gunslngr, its been a big help.
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Jan 19th, 2005, 01:11 PM
#15
Junior Member
Re: I need to create and maintain a new DB in VB.net [pretty much resolved]
No problem at all. You helped me think of something that I should add to my project. And hopefully I did not send you someplace you did not need to go.
Will
-
Jan 21st, 2005, 07:14 AM
#16
Junior Member
Re: I need to create and maintain a new DB in VB.net [pretty much resolved]
kebo
Just caught up with the thread. Thought I'd mention that the easiest way to create a .mdb file structured as you want is in Access itself.
Once created, put it in the application's 'Bin' folder to link in with the application's AppPath.
-
Jan 21st, 2005, 11:36 AM
#17
Junior Member
Re: I need to create and maintain a new DB in VB.net [pretty much resolved]
NetNovice i am pretty sure that Kebo wanted to make if somebody decided to delete or rename the database his program does not break. Instead it creates a new database and adds the necessary tables and columns.
Will
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|