![]() |
| ||
| need help with sql database in asp.net using VB I am new to ASP.net as of today :) I have jumped many hunrdles alreday, writing/deleting text files, connecting to a db, sendiong emails, yeah me. I am looking for 1 concise example to show how i can take the contents of a form and insert them into a datbase. i am having the worst time trying to find a tutorial or example that explains this is a way that makes sense and that also works. please, can someone help me? i just need a straight up form that has like name, last name, phjone and emial, that can store it into a database - right now im using a MYSQL db, but if i can see it in access, i should be able to convert. thanks! ~ Andrea |
| ||
| Re: need help with sql database in asp.net using VB use the formview control and bind it to a datasource control which is configured to access your database. If you use VS2005 they are there and very simple to setup (follow the wizards). Drop a form view onto your page, where it says datasource use the drop down to make a new one and follow the wizard to configure the datasource to do selects, updates, inserts and deletes to your database. When it is all done and working properly you will be able to see the code it created and understand what it did and then you can roll your own at any time. The datasource is a powerful tool, especially the object datasource if you are using multi tier applications |
| ||
| Re: need help with sql database in asp.net using VB i find http://www.w3schools.com/ good when ever i get stuck. hope it helps! |
| ||
| Re: need help with sql database in asp.net using VB I am not using VS2005. I am basically using Notepad, well, ok, an HTML editor.... so, I appreciate the help f1 fan, but it really didn't do too much for me :) i just need a straight up example of asp.net form and inserting the results into a db, preferabbly SQL :) |
| ||
| Re: need help with sql database in asp.net using VB OK You can get webdeveloper express which is free and makes it a lot easier. the code below has a grid view which lets me list, edit and delete items in the grid (it could select too but i have no need of that in this example). grid views dont allow news rows so i use a details view (below it) which is in default mode of insert. Both are bound to the sqldatasource which you see below them. In my case i have the connection string elsewhere in my app which it knows to go find by the <%$ ... %> tags. You can use stored procs etc but i included this code for you to see Hope it helps you <asp:GridView ID="GridView1" runat="server" AllowPaging="True" |
| ||
| Re: need help with sql database in asp.net using VB I would serriously look into the webdevolper express. I think you will fall in love with it plus it just makes everything much more organized. Just my two cents |
| All times are GMT -4. The time now is 9:11 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC