Can't get a new table into my dataset

Can't get a new table into my dataset

I created a new table Person in my Access 2003 database.  However, I can't get it into my dataset.

I tried refresh, the designer, and confiqure with the wizard, however the table Person doesn't appear.

Is this a bug

Or am I just being an idiot, as usual

dennist



Answer this question

Can't get a new table into my dataset

  • arazy

    Hi,

    Here are the steps that I did when I add a table in a DataSource:

    1. Add a DataSource, specify the path, etc...
    2. After adding the datasource, I manually added a table in Microsoft Access.
    3. After adding, I went back to VS, right click on my DataSet and select "Configure Dataset with Wizard..."
    4. In the wizard, I just expanded the tables node and check the newly added table.

    I think it must not behave that way, could you try it in a new project

     

    cheers,

    Paul June A. Domag



  • Chuck Wagner

    Hi,

    Just tried it and it works. Are you editing the right file I mean adding the new table to the mdb connected to your dataset Coz sometimes VS copies a mdb in your project directory and rediverts the connection to the copied instance.

    To check the current location of your dbase, right click your database and choose "Configure Dataset with Wizard", click previous, and expand the connectionstring...

     

    cheers,

    Paul June A. Domag



  • Sivaji Raju

    Hi,

    Don't worry, the wizard would not override your old Hasbara2005ConnectionString. It just detected that it has the same settings and therefore used the old instead of creating a new. Why won't you try copying your table into another location and add it as a datasource in your project. See if the changes will still reflect...

    Keep us posted...

     

    cheers,

    Paul June A. Domag



  • ASHISH SAHI


    Paul,

    My connectionstring is Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\HasbaraSample.mdb;Persist Security Info=True

    VS did not copy  the mdb to my project directory.  The only version is in C:\vs2005Projects\Hasbara\Hasbara\bin\Debug

    and that has Person, and all the updates I make to the table.

    However, I've added many insert and scalar queries to the schema. I use them frequently to add rows and get autoincremental ID fields.  It all works and the results show in the database.


    I tentatively decided to add a new datasource.  It asked what datasource.  I selected local database.  It then asked which data connection shouldyour application use to connect to the database

    Other than new connection, the combobox gave me the choices of C:\vs2005Projects\Hasbara\Hasbara\bin\Debug
    and HasbaraSampleConnectionString(Settings).

    If I choose the first , click next it saves save the connectgion as Hasbara2005ConnectionString.  At this point I cancelled out, smelling a disaster in the making.

    What do you suggest I do next

    dennist

     


  • JPD

    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\vs2005Projects\HasbaraSample.mdb

    Microsoft.Jet.OLEDB.4.0;Data Source=C:\vs2005Projects\HasbaraSample.mdb

    failed to open a dataconnection to the database
    could not find installable isam
    check the connection and try again.

    connection is still Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\vs2005Projects\HasbaraSample.mdb

    mystery deepens

    I even did it on a different computer.  In both mdbs the Person table was there

    dennist


  • Keith Kaimsinki

    Paul,

    <g>

    A copy of the .mdb was in the body of the project.  How I missed it I don't know.

    I copied the database from /bin/debug to the project folder and all was well.

    Thank you very much.

    I also had help from the Office/Access/Queries newsgroup in creating a delete and append query.

    In the designer, it was easy enough to create a delete (rows) query. But there is no append query, just an update query.

    I put the sql into the updatequery and renamed it appendquery.

    This worked as well.

    Why doesn't the designer have an append query option   It has all the other kinds.

    dennist

  • CharissaJB123

    Paul,

    It turned out to be a disaster.  It kept recogtnizing that it is the same database and would I like to change my connection string.  It asked me for the connection string and the provider.  I'd put both in.  Usually it'd find something wrong with my answers and I'd have to use the task manager to close the devenv.

    When it accepted the same answer it'd toally screw up the schema and vs 2005 wouldn't build.  Once when it would build it closed on debugging.

    I'd try to reopen but it closed on debugging, even using the original.  I had to reboot.

    dennist

    exactly what did you do to add the new table.  Refresh   configure   edit


  • Can't get a new table into my dataset