Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/06/2004, 08:24
Ares7
 
Fecha de Ingreso: mayo-2004
Mensajes: 27
Antigüedad: 20 años
Puntos: 0
Hola,
tienes que indicar de que tipo es tu comando (mycommand.type=CommandType.Text)
y dentro de los parentesis del ExecuteReader tienes que poner (CommandBehavior.CloseConnection)
en definitiva te quedaria asi:

Dim myConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Inetpub\wwwroot\prueba3\Base_Datos.mdb"
myConnection = New OleDbConnection(myConnectionString)
Dim myCommand As SqlCommand = New SqlCommand()
myCommand.Connection = myConnection
myCommand.CommandType = CommandType.Text
Dim mySelect As String = "SELECT Famila, Descripcion FROM tblFamilias"
myCommand.CommandText = mySelect
myConnection.Open()
myReader = myCommand.ExecuteReader(CommandBehavior.CloseConne ction)

Pruebalo y me dices que tal, espero haberte sido de ayuda

Última edición por Ares7; 16/06/2004 a las 08:33