Last post Jul 15, 2009 07:10 AM by firstname.lastname@example.org
Jul 10, 2009 11:56 PM|vincentd|LINK
I have been getting into ASP after developing in MS Access. I have figured out how to use a gridview to view the contents of an Access database called: DataDatabase.mdb which is located in the AppData folder of my website.
The database has a single table: tblBooks with two fields (other than the ID field): BookTitle and BookAuthor
I have a simple form where I have two textboxes. One is for the Book Title and one is for the Book Author.
After much searching I've finally realized that I needed to include a
right at the top of the script in order to be able to declare any data-related objects.
I would simple like to insert the contents of the two textboxes I mentioned above into my table on the click event of a button. In MS Access I could simple execute a single SQL command on the "CurrentDb()" object. Can someone show me what I need to add
to the following sub to add the record and reload the page?
strBookAuthor = Me.BookAuthorTB.Text
strBookTitle = Me.BookTitleTB.Text
Jul 11, 2009 12:42 AM|integrasol|LINK
I think you might want to look at the AccessDataSource control for this type of work, as it could make your job a lot easier, if you're not designing an enterprise grade application.
Th AccessDataSource control can be used with the GridView control and take care of a lot of the mundane and manual work for you,
Jul 11, 2009 05:01 AM|Mikesdotnetting|LINK
You can use ADO.NET code with parameters:
http://www.mikesdotnetting.com/Article.aspx?ArticleID=26, or you can use a DataSource control. If you choose to use the DataSource control, I would advise against the AccessDataSource. Use the SqlDataSource instead:
Jul 15, 2009 07:10 AMemail@example.com|LINK
check this page.