the accessdatasource code use to login to a accses (there are anther code to login to anther databace, like sql sever).
How to use
to use accessdatasource we write this code:
<asp:accessdatasource id="AccessDataSource8" selectcommand="SELECT 4 * FROM [bla] WHERE ([bla] = ?) ORDER BY [id] DESC" datafile="db.mdb" runat="server">
and this are the parameters we use -
id - the id of the accessdatasource
runat - we need to write it in all the asp.net codes we use
datafile - the accses mdb file we use
selectcommand - the sql code. you can see a good bonus we got in the WHERE
Anther things like QuerystringParamater
you can do anther things like QuerystringParamater, but not wite request.querystring.
it use a cookie.
it use a session.
Use the accessdatasource with repater, datagrid and more.
to use the accessdatasource in a repater,datagrid or anther, we use this code -
datasourceid="AccessDataSource8"
and AccessDataSource8 was the id of the accessdatasource.
you add it to the code like this -
and it work.
Succses!
No comments:
Post a Comment