Denaes Posted November 18, 2003 Posted November 18, 2003 I know my way around a bit with datasets, but I'm working on a rather large project, so I figured I'd do things the easier way, more professional way, which is to create a Typed Dataset. I have a book (ADO.Net by Microsoft), which is... well half the book doesn't apply to me. I know MS wants to sell their SQL Server, but I don't want to spend 2000 on some program to augment my VB database programming. Thats silly. The book mentions Visual Studio having its own SQL server of a sorts, but it doesn't work with the examples in the book (maybe because I'm using VB.net, not VS.net?). So I'm stuck in the Jet 4.0 Ole database world. I'm following this example in the book, which works. Then I try to do it myself and it doesn't. It actually REVERSES itself and undoes what I need! Here is what I did: 1. I added the Dataconnection and data adapters for each of the tables in my database. 2. Data -> Generate Dataset. Choose New "dsSchema". 3. Choose the tables I want to add to the dataset. I choose one. 4. Click Ok. It works perfectly. It adds dsSchema to the designer and the .xsd file for it to the project. Wow, thats pretty useless. I need to make sure it actually has the data I need on it. I add the other 7 tables to it. The dsSchema is now removed from my designer!!? Why? I try to add a dataset to the designer. I still have the dsSchema.xsd Schema, but its not on my designer, just in my project, so I can't use that. I'm more used to datasets in code and using xml. This working with an actual database went from a pleasant experience in vb6 to a down and out pain in the butt. I have the .xsd file, is there a way, maybe programatically to create the typed dataset? I don't really NEED it, unless this ADO.Net is a REAL pain. But I'll ask another question in another post to tell if I really require it, or if ADO.Net is cool. Thank you for your help :) Quote
Shirtster Posted December 9, 2003 Posted December 9, 2003 Hi Denaes I've used typed datasets with SQL Server for a while and, once you get the hang of their quirks, they're very powerful and can save you hours of effort. Not had a play with them and Access akthough I should imagine it's the same, except you can't generate the stored procedures from the .NET dataset wizard (cos Access doesn't have stored procs). I can send you some Component classes & xsd's I've written/generated using the wizard, along with an explanation of how to use the wizard and correct any problems. Persevere with typed datasets, they are worth the effort. Quote
Mehyar Posted December 10, 2003 Posted December 10, 2003 I add the other 7 tables to it. The dsSchema is now removed from my designer!!? Why? [/Quote] What do you mean you added 7 tables to it ?? If you changed the structure of the dataset then you better generate it again to inclide all the datadapters you added... Quote Dream as if you'll live forever, live as if you'll die today
Denaes Posted December 17, 2003 Author Posted December 17, 2003 What do you mean you added 7 tables to it ?? If you changed the structure of the dataset then you better generate it again to inclide all the datadapters you added... I didn't change the structure of the dataset, I said I added the 7 tables from the dataset to the schema and everything dissapeared. The schema works with 1 table, but not when you add all 8 tables to it. I'm following these steps out of the book microsoft put out to teach you how to do this. Actually since then (it was a while ago) I had to move on with the project. So I just used SQL statements and rigged my own in VB.Net code relations, which was a huge pain, having to grab one field and search another table for that field to grab the other tables... I just got a book by A! (apress?) which looks a lot more complete and thurough than that microsoft book did. Quote
MyGeneration Posted April 14, 2004 Posted April 14, 2004 Hi Denaes (cos Access doesn't have stored procs). Access does support stored procs, we use them fully, if you want to know more let me know Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.