Question Database Walk-Through

EdB

Member
Joined
Aug 8, 2013
Messages
7
Programming Experience
Beginner
Is there a detailed walk-though for creating a SQL CE database that uses combo boxes for selection of common data? I am creating an address book application (for Windows desktop) and want to have the City, State & Zip Code be selected from lists (Combo Boxes) rather than having the user manually input this information.
 
You may well find what you need by following the Data Walkthroughs link in my signature. Even if it doesn't have exactly what you need in one place, you should be able to find all the elements and you can then simply put them together, e.g. using ComboBoxes to create relationships in data is the same regardless of the database.
 
Thanks for the reply; I've looked at a few of the walkthroughs, but am still having trouble. At this point, I've added a data source to my project (Sql CE), I've created several tables (Customers, City, State & Zip); the City, State & Zip fields of Customer table are Integers, the corresponding tables (City State & Zip) use Integers for the Primary field (also set as Identity (1, 1); I've set relationships identifying the primary keys and foriegn keys in each table; I've dragged a details view of the Members table (with combo boxes for City, State & Zip) onto my form; and I've set the datasources for each of the combo boxes. For some reason, the records are not being updated properly; i.e., when I add a new customer (or modify an existing customer's information) and click the "Save" button (in the binding navigation tool strip). The record appears to save (I can move back and forth through the records and the information appears to be correct); however, when I restart the program, the records seem to lose the city, state & zip information. Any idea what I've missed? Thanks!!
 
Almost certainly the data is being saved. You can check that by testing the value returned when you call Update on your table adapter. If it's not zero, the data is saved. In that case, follow the first link in my signature to learn how local data files are managed.
 
Thanks again. I found the issue, not sure what caused it, but for some reason, the link to the database became corrupt. I deleted the source connection, then re-established it, now records are being updated as expected.
 

Latest posts

Back
Top