Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
MsAccessDataBase
------------------------------------------------------------------------------
XML
<asp:accessdatasource id="adsgv" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString4 %>" SelectCommand="SELECT * FROM [filter]" FilterExpression="[City] like '{0}%' and [Country] like '{1}%'" Providername="<%$ ConnectionStrings:ConnectionString4.ProviderName %>">
</asp:accessdatasource>

In this tag we have ( ConnectionString and ProviderName ) is available but these 2 are not working in program and how we give the connection string and provider name to it.............

-------------------------------------------------------------------------------
---------------------------------------------------------------------------------

SqlDataBase
-------------------------------------------------------------------------------
XML
<asp:sqldatasource id="sqlDataSourceGridView" mode="hold" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString4 %>" SelectCommand="SELECT * FROM [filter]" FilterExpression="[City] like '{0}%' and [Country] like '{1}%'" ProviderName="<%$ ConnectionStrings:ConnectionString4.ProviderName %>">
</asp:sqldatasource>

....... in this tag ConnectionString And ProviderName will working properly............

------------------------------------------------------------------------------

how i can resolve the problem...... :COOL:...
Posted
Updated 21-Sep-11 3:44am
v2
Comments
Ali Al Omairi(Abu AlHassan) 21-Sep-11 9:47am    
what is the values of ConnectionString4 and ConnectionString4.Provider?

1 solution

SQL
<asp:AccessDataSource
    id="AccessDataSource1"
    DataFile="~/App_Data/Northwind.mdb"
    runat="server"
    SelectCommand="SELECT EmployeeID, LastName, FirstName FROM Employees">
  </asp:AccessDataSource


More Info:
http://msdn.microsoft.com/en-us/library/8e5545e1.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900