I'd like to jump in and write a simple application to display fields related to my compact disk library (Disk#, Composer, Work, etc.) in a scrollable window. The current catalog in in a DOS/xBase format, but i can export it to Excel or Acces. I am using VB within Visual Studio 2008.
Can you suggest the most effective VB command(s) to use? Is the indicated command used within a looping structure?
Once I know what to do, I will research how to do it.
Thanks much for your help.
1st Application - Compact Disk Catalog
Page 1 of 1
1st Application - Compact Disk Catalog
#2
Posted 27 March 2009 - 01:41 AM
Hi!
Your question feels a little bit too open, you probably need to be more specific.
Do you want to put the stuff you have into a new database and work with it that way or do you want to store the info in plain old text files?
Do you only want to display the information (showing it in a scrollable textbox) or do you want to add/modify information too?
Is there a lot of information? Do you need to export/import or can you type in the info into the new sulotion?
I would suggest you look in to using SQL CE with VB.
Open a new project, in the Database Explorer do right-click the Data Connections and Add Connection. In the dialog choose SQL Server Compact and click Create to make a new database. (Suppose you name it DiscDB)

When done with this you'll have a dataconnection named DiscDB.sdf, expand it and right-click the "Tables" choosing Create new table. I called it Discs...

Create an identity field named DiscID and whatever other fields you need. The picture shows a suggestion for some fields.
Now go to Data Sources and click Add New Data Source, choose DiscDB.sdf as your source. Answer yes to the question about copying the file to your project.
Check the box in the picture so you get all tables. Click finish.
Back to the Data Sources

Drag the Discs table onto your new form.
Run the project.
If I've remembered everything correctly and you managed to follow my very brief explanation you should now be able to run this little app and add information to the database.
Next step for you is to look at the tutorial section and check out how to handle files. You need to read a file from disk (that you have exported from your old program - export to excel csv file or into excel and then save it as a csv) and put the information into the database.
This means you also have to look in to some othe stuff about connecting to a database...
Well. Come to think of it, maybe you don't have to. Remember when we created the database... There is an option to connect to a Access database file... Maybe you could do somthing with that, I've never tried it.
Hope this helps as a starter.
Regards
/Jens
Your question feels a little bit too open, you probably need to be more specific.
Do you want to put the stuff you have into a new database and work with it that way or do you want to store the info in plain old text files?
Do you only want to display the information (showing it in a scrollable textbox) or do you want to add/modify information too?
Is there a lot of information? Do you need to export/import or can you type in the info into the new sulotion?
I would suggest you look in to using SQL CE with VB.
Open a new project, in the Database Explorer do right-click the Data Connections and Add Connection. In the dialog choose SQL Server Compact and click Create to make a new database. (Suppose you name it DiscDB)
When done with this you'll have a dataconnection named DiscDB.sdf, expand it and right-click the "Tables" choosing Create new table. I called it Discs...
Create an identity field named DiscID and whatever other fields you need. The picture shows a suggestion for some fields.
Now go to Data Sources and click Add New Data Source, choose DiscDB.sdf as your source. Answer yes to the question about copying the file to your project.
Check the box in the picture so you get all tables. Click finish.
Back to the Data Sources
Drag the Discs table onto your new form.
Run the project.
If I've remembered everything correctly and you managed to follow my very brief explanation you should now be able to run this little app and add information to the database.
Next step for you is to look at the tutorial section and check out how to handle files. You need to read a file from disk (that you have exported from your old program - export to excel csv file or into excel and then save it as a csv) and put the information into the database.
This means you also have to look in to some othe stuff about connecting to a database...
Well. Come to think of it, maybe you don't have to. Remember when we created the database... There is an option to connect to a Access database file... Maybe you could do somthing with that, I've never tried it.
Hope this helps as a starter.
Regards
/Jens
Page 1 of 1

Add Reply




MultiQuote
| 


