Hola estoy teniendo un problema a tartar de conectarme con la base de datos de Access, Mi codigo es este:
Sub Page_load(Sender As Object, E As EventArgs)
if Not IsPostback then
Dim DBConn as OleDbConnection
Dim DBCommand As OleDbDataAdapter
Dim DsPagaData as New DataSet
DBConn = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0; " & "DATA SOURCE=" & Server.MapPath("C:\Inetpub\wwwroot\ddlBD.mdb;"))
DBCommand = New OleDbDataAdapter("Select * From Departaments Order By DeptName",DBConn)
DBCommand.Fill= (DSPageData,"Departaments")
ddlDepartaments.DataSource= DSPageData.Tables("Departaments").DefaultView
ddlDepartaments.DataBind()
end If
End Sub
Y el Error que me da es este:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30516: Overload resolution failed because no accessible 'Fill' accepts this number of arguments.
Source Error:
Line 11: DBConn = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0; " & "DATA SOURCE=" & Server.MapPath("C:\Inetpub\wwwroot\ddlBD.mdb;"))
Line 12: DBCommand = New OleDbDataAdapter("Select * From Departaments Order By DeptName",DBConn)
Line 13: DBCommand.Fill= (DSPageData,"Departaments")
Line 14: ddlDepartaments.DataSource= DSPageData.Tables("Departaments").DefaultView
Line 15: ddlDepartaments.DataBind()
Source File: C:\InetPub\wwwroot\conexion.aspx Line: 13
Les agradeceria me echaran la mano Gracias.