
09/01/2005, 19:26
|
 | | | Fecha de Ingreso: noviembre-2002
Mensajes: 681
Antigüedad: 22 años, 5 meses Puntos: 0 | |
Ayuda con este error!!!!! Please Este error me genera...
Compiler Error Message: BC30002: Type 'SqlDataReader' is not defined.
Source Error:
Line 20: MyConnection.Open()
Line 21:
Line 22: Dim dr As SqlDataReader = MyCommand.ExecuteReader()
Line 23:
Line 24: MyDataGrid.DataSource = dr
-----------------------------------------------------------------
Y este es el codigo que estoy utilizando...
Sub Page_Load(Sender As Object, E As EventArgs)
Dim strConexion As String
Dim DS As DataSet
Dim MyConnection As OleDbConnection
Dim MyCommand As OleDbDataAdapter
strConexion = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("../bdwine/clientes.mdb")
MyConnection = New OleDbConnection(strConexion)
MyCommand = New OleDbDataAdapter("select top 1 * from tabla1 ", MyConnection)
MyConnection.Open()
Dim dr As SqlDataReader = MyCommand.ExecuteReader()
MyDataGrid.DataSource = dr
MyDataGrid.DataBind()
MyConnection.Close()
End Sub
hace rato que estoy parado ahi, por favor alguien que me tienda una mano...
__________________ "Lo importante es nunca dejar de hacerse preguntas"
Albert Einstein |