Database problems: Save data, Change table definition

Although a problem was recognized months ago regarding saving data, I'm disappointed that the Start Page "How Do I... (Database updating) still has a serious error and several suggestions are still floating around to resolve. Forum messages show this is causing a great loss of productivity with programmers and companies.

See below for another problem.

My past experience is with VBA and 2003 Net, using Excel as a database.

Basics:
1. There are two separate items utilized by computer applications:
-Definitions (object names, properties, methods etc.)
-Data (actual information entered by user in various ways)

2. There are two periods of time:
-Design, when we normally generate definitions.
-Run, when the user enters data. Of course, programmers use Run many times before the user does.

3. Whenever Definitions are created, the programmer expects them to be always utilized after they are created. Most definitions are created at Design time, but can also be created and modified at Run time.

4. Data is normally entered at Run time, when the program is "in production". The app may generate some Data, but it should be transparent to the user and should never interfere with "production" Data.

5. Programmers need to have the program work with various Data sets for testing. (When using Excel, this is fairly easy.) This is especially important for item 6, when a production file exists, to answer questions like "What effect will a certain new Definition have on the existing Data file " 
 
6. Experience has shown that AFTER an application has been deployed and utilized, there is a need to apply updated Definitions, without changing the precious Data.

>>> end of Basics

Suggestions for database usage.
A. File property "copy to output directory"
I would expect Definitions to be "Copy always" (Basic 3).
I would NOT expect the Data to be copied from Design to Run time (Basic 4). It appears that Express copies both Definitions and Data. Is this a standard practice of all languages when handling databases

B. Is there a provision for Basic 5, to allow the app to temporarily work with a test data set

C. What is the provision for Basic 6 I've seen a post from Microsoft that File property Build Action needs to be changed to "None". Perhaps this realtime situation is too complicated for discussion here

Another problem I've encountered is this: After changing the Table definitions (to add field State in the "How Do I" tutorial) when I do Show table data, the new field does NOT appear! This is after I "Saved Addresses" (the project) and Refresh. As a newcomer to SQL, I would think this is a basic thing to do.    

A minor item I've noticed is when showing properties of files in Solution Explorer, the default values are not indicated.   

IMO considering the status of these problems  about "easy" things (and the apparent lack of attention from Microsoft), Express does not seem to be a Database Production tool at this time. 

 


 



Answer this question

Database problems: Save data, Change table definition

  • SergioT

    Hi Richard,

    When deploying via ClickOnce the application and its related files are installed to a "hidden" location; the user can't change it. If the database is in your project and its Build Action is set to Content (the default), it will be automatically installed along with the app and the application will know where to find it.

    Not sure what you mean by "lost your application" - the errors look like they are coming from references in code to several datasets and tableadapters. Did you remove these from your project If so, just adding them back should fix your problem.

    Hope this helps,

    Steve Hoag

    Visual Basic Express



  • Qaiser Mehmood Mughal Islamabad

    Hi Richard,

    How are you deploying your application If you are simply copying the files to a CD and then copying them onto another computer, I wouldn't expect that this would work. If you are deploying via ClickOnce and still seeing this problem, then this may be a bug. Please provide the details of what you are doing.

    Also, the path shown for your database file points to the MyDocuments folder on your local machine, which is most likely why you are getting an error. Are you attempting to install the database to the My Documents folder on the target computer \

    Steve Hoag

    Visual Basic Express



  • Big5824

    Steve,

    1a) After several attempts - repeating steps exactly, I was able to add fields to the table in FirstDatabase. (Inconsistent results = Not dependable)

    1b) As you stated, the Addresses project does not recognize the updated FirstDatabase project. (Unexpected results = Not dependable)
    What are the exact steps needed to recognize the updated Database

    (How can we post a corrected version of "How Do I... Database" There are several needed corrections in addition to the "Save data" problem, the steps in part 1b above and probably many more. They need to be in a "FAQ-type" post, staying at top of all posts.)

    2) Would you be able to report the default values for files in Solution Explorer After viewing these for .vb and database files, I'm not sure how these important values should be set for each file type.


    3) The purpose of making apps is to run them as EXE files, not in Debug mode. Even if I want a simple app to organize my baseball card collection, I don't want to always run it in Debug mode.
    Can we agree on that - the objective end result is an EXE file that updates a "production" database

    I can see entering a few records at design time to test how things look in the UI. But in the real world, the user (even if it is the hobbyist programmer) should enter Data at Run time.

    You said "There are many cases where you might want to deploy a database pre-populated with data - for example, a table of product information, a list of states and zip code, and so forth."

    For things like State and Zip codes that don't change often, the programmer can provide special tables. These values are then made available to the User to make it easier to insert them into the main database, at Run time. So the main database includes the State and Zip fields.

    As for the bulk of information (even on local databases), it changes with each transaction (sales order, baseball card, employee etc.) Users enter this Data, yes - at Run time.

    If that is the model in the business world, why shouldn't it be taught for the hobbyist Develop each app AS IF it will be sold to millions.

    Therefore, I favor this change regarding the database File property "copy to output directory":

    -Always copy Definitions.
    Why would I ever Not want to copy Definitions

    -Never copy Data.
    Programmer doesn't need to delete anything entered at Design time. The hobbyist programmer should enter "production" data at Run time, like the business world does.

    Does Express work differently than "normal" Net 2005 in this regard

    George


  • DeepeshMS

    Steve,

    Thanks for the helpful ideas.

    Re: "By the way, there already is an FAQ post at the top of this forum that talks about the "Save data" problem;"

    What we have here is a lack of correct instructions on how Express works. The first thing we see as a new Express user is the "How Do I... " series which has incorrect information, so we waste time trying to do it wrong. Then if we start in this forum, we get answers (sometimes conflicting) scattered in various posts. All this time spent on finding out various ways Express does not work, when we should be writing code!

    The best solution is to have Microsoft provide corrected information; I bet they won't do that, considering this product is free.

    So my second-best solution was suggesting that we provide a corrected version of "How Do I..." series at the top of the forum.

    The vendor's second-best solution is that we purchase the Standard edition.

    George


  • Jasonld

    snip

    The vendor's second-best solution is that we purchase the Standard edition.

    George.

    Question

    If we purchase the Standard edition

    Can we than change the table definition, without starting over again, building a new data source and new forms

    If so I am wasting time to learn Visual Basic.

    Henk



  • ericjs1

    Steve,

    Thanks for your helpful reply.
    I would like to comment on three items here.

    1-Adding a State field.
    I opened the project "FirstDatabase", created in the "How Do I"
    tutorial.
    In Database Explorer, Tables, Addresses, Open Table Definition.
    In Column Name, at bottom, I entered word State (in same way I added
    the other data fields).
    In Data Type, I selected the "nvarchar(50)".
    On the File menu, choose Save All.

    In Database Explorer, Tables, Addresses, Show Table Data
    I expected to see the new State field, but it does not appear.

    2-Default values of files in Solution Explorer
    Normally default values are indicated as normal font, other values are
    BOLD. This is important. But properties of files do not indicate non-default values, so we  don't remember what the default is, after investigating the options. Each file type may have different default values. 

    3-Separation of Definition and Data

    "we ended up going with the "no brainer" approach - create your definition and data at design time, and whatever you do is automatically propagated with the app."
    and,
    "I suspect that for many users [my suggestion to decouple definition from data] would just make an already confusing
    situation even more confusing."

    I'm not sure what words to describe how I feel about this, starting with Utter Disbelief. 

    What part of my Basics are confusing

    Programmers write the Programs; Users enter the Data.
    Why do you say the programmer should enter both Definitions AND Data What's the purpose of providing a program to the User if the User isn't going to enter the Data

    Interactive apps work this way: programmers provide the app definitions (forms, controls etc.), the app is deployed, Users enter data.

    Why should Database apps be different Programmers should add Data the same way Users do - at Run time, with a Test Data set. Isn't that the only way to test the app   To me, this is clear and understandable, because it simulates what will happen after deployment. 

    IMO, the system should copy All definitions but No Data entered at Design time.

    George


  • HashPlus

    Henk,

    I'm not sure if the purchased edition(s) provide any improvement with database.

    I would think so.

    And I would think you should be able to read an Express project into a purchased upgrade.

    I've had success with regular windows form apps, but I've been disappointed with my introduction to database, using VB Express. Don't know if the problem is with VB Express, SQL Express, or both.


  • velmurugan B

  • Mike Suarez

    Hi George,

    1) I'm not seeing what you describe. I tried your example, and after adding the State field and going to Show Table Data I do see the State field, which of course displays "null" since I haven't added any data yet.

    As far as getting the new State field to show up in the UI, it's not so easy. I'm unaware of any way to refresh the DataSet; it looks like you have to add a new DataSource in order to get the updated definition, and then redo the UI to use the new DataSet.

    It seems llike there should be an easier way to do this; perhaps someone who is more familiar with the Data Designer can comment on this.

    2) Funny, I never noticed this. For Windows Forms properties, values changed from the default do indeed show up in Bold. For items in Solution Explorer, they do not - this is true for anything in Solution Explorer, not just database files.

    I suspect that this inconsistency is due to different teams implementing the different features, but there could be some technical reason why they didn't do this for Solution Explorer. At any rate, if you feel strongly that this is a problem, please enter a bug (on the menu, choose Community, Feedback, Report a bug).

    3) "Programmers write the Programs; Users enter the Data" - this isn't necessarily true when you are talking about local data. There are many cases where you might want to deploy a database pre-populated with data - for example, a table of product information, a list of states and zip code, and so forth.

    In addition, the hobbyist programmer is often creating a program strictly for their own use. Say I am creating a program to track my baseball card collection - I'm going to enter data at design time as a part of my testing. Why would I want to delete that data and then re-enter it after I build my app

    Again, since the target of Visual Basic Express is the hobbyist or beginning programmer, I personally feel that this is the correct model. For professional programmers it is not, however a professional programmer knows that they need to delete their test data before deploying the app.

    Bottom line - if you don't want to deploy both definition and data, either don't enter the data at design time, or delete it before deploying. Having the choice to do what you want is a good thing.

    Steve Hoag

    Visual Basic Express



  • biffo_reid

    I am using ClickOnce. I thought the install.exe file gave the user a preferance as to where he or she wants to load my program. Am I missing something here

    I lost my application when I tried to move my database under Visual Studio as suggested by Jack Hu. My situation now is that when I build my application, I get a total of 52 errors as shown below:

    Error 1 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\ChildrensBedRoom1.Designer.vb 25 40 NuHomeInventory
    Error 2 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.ChildrensBedroom1TableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\ChildrensBedRoom1.Designer.vb 27 48 NuHomeInventory
    Error 3 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\ChildrensBedRoom1.Designer.vb 303 48 NuHomeInventory
    Error 4 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.ChildrensBedroom1TableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\ChildrensBedRoom1.Designer.vb 305 56 NuHomeInventory
    Error 5 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\DiningRoom.Designer.vb 25 41 NuHomeInventory
    Error 6 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.DiningRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\DiningRoom.Designer.vb 27 41 NuHomeInventory
    Error 7 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\DiningRoom.Designer.vb 306 49 NuHomeInventory
    Error 8 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.DiningRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\DiningRoom.Designer.vb 308 49 NuHomeInventory
    Error 9 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\FamilyRoom.Designer.vb 25 41 NuHomeInventory
    Error 10 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.FamilyRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\FamilyRoom.Designer.vb 27 41 NuHomeInventory
    Error 11 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\FamilyRoom.Designer.vb 305 49 NuHomeInventory
    Error 12 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.FamilyRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\FamilyRoom.Designer.vb 307 49 NuHomeInventory
    Error 13 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\GameRoom.Designer.vb 25 41 NuHomeInventory
    Error 14 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.GameRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\GameRoom.Designer.vb 27 39 NuHomeInventory
    Error 15 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\GameRoom.Designer.vb 305 49 NuHomeInventory
    Error 16 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.GameRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\GameRoom.Designer.vb 307 47 NuHomeInventory
    Error 17 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Gym.Designer.vb 25 41 NuHomeInventory
    Error 18 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.GymTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Gym.Designer.vb 27 34 NuHomeInventory
    Error 19 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Gym.Designer.vb 305 49 NuHomeInventory
    Error 20 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.GymTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Gym.Designer.vb 307 42 NuHomeInventory
    Error 21 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Kitchen.Designer.vb 25 41 NuHomeInventory
    Error 22 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.KitchenTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Kitchen.Designer.vb 27 38 NuHomeInventory
    Error 23 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Kitchen.Designer.vb 306 49 NuHomeInventory
    Error 24 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.KitchenTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Kitchen.Designer.vb 308 46 NuHomeInventory
    Error 25 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LaundryRoom.Designer.vb 25 41 NuHomeInventory
    Error 26 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.LaundryRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LaundryRoom.Designer.vb 27 42 NuHomeInventory
    Error 27 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LaundryRoom.Designer.vb 305 49 NuHomeInventory
    Error 28 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.LaundryRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LaundryRoom.Designer.vb 307 50 NuHomeInventory
    Error 29 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LivingRoom.Designer.vb 25 41 NuHomeInventory
    Error 30 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.LivingRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LivingRoom.Designer.vb 27 41 NuHomeInventory
    Error 31 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LivingRoom.Designer.vb 305 49 NuHomeInventory
    Error 32 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.LivingRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\LivingRoom.Designer.vb 307 49 NuHomeInventory
    Error 33 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MasterBedRoom.Designer.vb 25 42 NuHomeInventory
    Error 34 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.MasterBedroomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MasterBedRoom.Designer.vb 27 44 NuHomeInventory
    Error 35 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MasterBedRoom.Designer.vb 305 50 NuHomeInventory
    Error 36 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.MasterBedroomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MasterBedRoom.Designer.vb 307 52 NuHomeInventory
    Error 37 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MusicSittingRoom.Designer.vb 25 42 NuHomeInventory
    Error 38 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.MusicSittingRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MusicSittingRoom.Designer.vb 27 47 NuHomeInventory
    Error 39 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MusicSittingRoom.Designer.vb 305 50 NuHomeInventory
    Error 40 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.MusicSittingRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\MusicSittingRoom.Designer.vb 307 55 NuHomeInventory
    Error 41 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\PlayRoom.Designer.vb 25 42 NuHomeInventory
    Error 42 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.LaundryRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\PlayRoom.Designer.vb 27 39 NuHomeInventory
    Error 43 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\PlayRoom.Designer.vb 305 50 NuHomeInventory
    Error 44 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.LaundryRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\PlayRoom.Designer.vb 307 47 NuHomeInventory
    Error 45 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Spa.Designer.vb 25 42 NuHomeInventory
    Error 46 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.SpaTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Spa.Designer.vb 27 34 NuHomeInventory
    Error 47 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Spa.Designer.vb 305 50 NuHomeInventory
    Error 48 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.SpaTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\Spa.Designer.vb 307 42 NuHomeInventory
    Error 49 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\SunRoom.Designer.vb 25 42 NuHomeInventory
    Error 50 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.SunRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\SunRoom.Designer.vb 27 38 NuHomeInventory
    Error 51 Type 'NuHomeInventory.Home_InventoryDataSet' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\SunRoom.Designer.vb 305 50 NuHomeInventory
    Error 52 Type 'NuHomeInventory.Home_InventoryDataSetTableAdapters.SunRoomTableAdapter' is not defined. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\SunRoom.Designer.vb 307 46 NuHomeInventory
    Warning 53 The designer cannot process the code at line 70:

    Me.Home_InventoryDataSet.DataSetName = "Home_InventoryDataSet"


    The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again. C:\Documents and Settings\HP_Owner\My Documents\Visual Studio 2005\Projects\NuHomeInventory\NuHomeInventory\ChildrensBedRoom1.Designer.vb 71 0

    Also, is there a way I can salvage my program from a deployed version of my application on a CD and reinstate it into the Visual Basic 2005 Express Edition I am about to throw the towel in at this point. I admit I do not have exstensive

    experience as a programmer. Most of my past background was as a field Service Engineer and a software/hardware technical writer for over 30 years. I am now totally retired since 2001. Originally retired at 65 which was 12 years ago. Any help you can give me will be greatly appreciated.

    Thanks in advance.

    Richard Williams



  • Crise

    Hi,

    I'd like to add a comment re para 1(b) in shoagMSFT's response. I and others are repeatedly having difficulty in the effect of what changes to a database schema/structure causes to the developer. As for me, it is a big minus as I consider upgrading to the standard edition or higher.

    From an application analyst/programmer's viewpoint, human fallibility, rushed deadlines, and new requirements brought about by changes in the environment (law, taxation, workplace regulations etc) can all bring about a need to alter a schema. To say that more attention should be given to analysis just does not wash in the volatile real-world. After all, probably 75% of all applications oriented IT professionals are maintaining systems not building them, and many of them will have requirements necessitating changes to schema's.

    Finally, a novice/amateur programmer is most likely not aware of the available analysis techniques, which incidentally allow for referring back to the previous level (business analyst or whatever) problems which may require schema modification.

    It is a burden which we potential purchasers should not have to bear.


  • arrgo

    I'm just starting with databases and don't know specifics, but ask a few general questions.

    There are two main parts of the software - the application and the database system.

    Did you go through standard Express deployment procedures, which is supposed to copy everything you need, including the SQL 2005 Express

    Is it possible that the database system does not exist on the second computer, or is somehow incomplete I don't know what message appears if this is the problem.

    You say the database grid displays. Does that mean that SQL Express does exist OK

    What is needed is a "problem determination chart", to isolate the problem.


  • mdenomy

    Hi George,

    In answer to:

    1a) I don't see how this is inconsistent - I can add fields and immediately see the results with 100% consistency. Can you provide exact repro steps where you are adding a new field and are unable to see it

    1b) To add a new field, you would make the changes in the FirstDatabase project; you would then have to repeat the steps to add a data connection and you would need to delete the auto-generated UI (either grid or labels.textboxes) and repeat the step of adding the UI - in other words, you would basically have to repeat the entire 3rd, 4th and 5th lessons in the "Managing Your Records" tutorial.

    This is a lot of work to make a simple schema change; the lesson here is that more consideration to database design should be taken before actually starting to build an app.

    By the way, there already is an FAQ post at the top of this forum that talks about the "Save data" problem; in addition the top link in the Related Questions list on the main page points to another thread on this topic.

    2) The default values for file types in Solution Explorer vary by type; there are so may possible file types that it would be virtually impossible to list all of them. The easiest way is to add a new file and compare its defaults to yours, then delete the new file.

    3) On this issue I think we'll have to agree to disagree. There is no one single way that programmers use Visual Basic, and what works for one may seem totally wrong to another. If you think the default behavior of local data needs to be change, enter a bug and let people vote on it.

    - Steve



  • pwc

    Hi George,

    When talking about database applications, you first need to understand that there are two different models - an application that accesses a shared database, usually over a corporate network; and an application that accesses a private database on a local computer.

    The Express edition only supports the second model - local data. I wasn't directly involved in the design of the local data experience, but I do know there was much discussion around how to do it the "right way".

    In answer to your first question (A)

    Since the target audience for Visual Basic Express is the hobbyist or beginning programmer, we ended up going with the "no brainer" approach - create your definition and data at design time, and whatever you do is automatically propagated with the app. This is why the default for Copy to Output Directory is Copy Always.

    Unfortunately this model was changed late in the product cycle and the "Managing Your Records" tutorial didn't get updated to reflect this. It's totally my fault - I was simply unaware of the change until after we had already shipped.

    Providing the three options gives you flexibility in how local databases are copied and the relationship between the design copy and the run time copy, but again this wasn't well-documented and isn't easy to understand.

    Your suggestion to decouple the definition from the data and have different copy options for each is an interesting one. I don't know if this was considered, however I suspect that for many users it would just make an already confusing situation even more confusing.

    (B)

    To allow an app to work with a test data set, you should set the Copy to Output Directory property to Do not copy. Once you are done testing, delete your test data, change the property back to Copy Always, and then build and deploy.

    (C)

    This is a classic problem with local databases - once you have deployed the database with a given schema, it is very difficult to later change the schema AND maintain the data that the user has entered. With a shared database this is easy, since the administrator can make the changes on the server and all users see them.

    With a local database, the local user owns the data, but they have no way of changing the schema or table definitions. While there are ways to work around this using scripting (copy the data out to a temporary file, install the new database schema, copy the data back in), this isn't a scenario that is supported for Express.

    ****

    As to your other issues, I'm not sure I understand. There is no step in the tutorial to add a "State" field.

    I also don't understand what you mean about the default values of properties - if you select a database file in Solution Explorer, the property values shown in the Properties window are the defaults - unless you have changed them.

    Hope this helps,

    Steve Hoag

    Visual Basic Express



  • Database problems: Save data, Change table definition