brandonyoung
Member
- Joined
- Apr 26, 2011
- Messages
- 12
- Programming Experience
- 3-5
I am needing some help writing to a database.
I have written a relatively large application for a nursery school using text files as my source of permanent storage. I have decided that it would be more productive and safer if I could use a database instead. I have also chosen to rewrite the program as I initially wrote the program during early stages of my degree, so the structure and implementation is not very good.
I have created a little application to connect to a MS access db. I'm able to do everything I need to do, except when I publish the project and actually install the program it gives me error messages when ever I try connect to the database, or do anything to it for that matter.
If anyone knows the answer to my problem, or a better way to deal with the permanent storage could you please let me know.
Thanks in advance.......
Here is a brief example of my code to create the database
Dim databaseName As String = "The Ascot Day Nursery.mdb"
'Creating an Access Database file using ADOX
Dim cat As ADOX.Catalog = New ADOX.Catalog()
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & databaseName & ";Jet OLEDB:Engine Type=5")
MessageBox.Show("Database Created Successfully")
cat = Nothing
con.Close()
I have written a relatively large application for a nursery school using text files as my source of permanent storage. I have decided that it would be more productive and safer if I could use a database instead. I have also chosen to rewrite the program as I initially wrote the program during early stages of my degree, so the structure and implementation is not very good.
I have created a little application to connect to a MS access db. I'm able to do everything I need to do, except when I publish the project and actually install the program it gives me error messages when ever I try connect to the database, or do anything to it for that matter.
If anyone knows the answer to my problem, or a better way to deal with the permanent storage could you please let me know.
Thanks in advance.......
Here is a brief example of my code to create the database
Dim databaseName As String = "The Ascot Day Nursery.mdb"
'Creating an Access Database file using ADOX
Dim cat As ADOX.Catalog = New ADOX.Catalog()
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & databaseName & ";Jet OLEDB:Engine Type=5")
MessageBox.Show("Database Created Successfully")
cat = Nothing
con.Close()