Jump to content


Photo

Problema con DbExpress "Operation not allowed on unidirectional dataset"


  • Please log in to reply
4 replies to this topic

#1 poliburro

poliburro

    Advanced Member

  • Administrador
  • 4945 posts
  • LocationMéxico

Posted 09 November 2010 - 04:39 PM

Pues, he logrado establecer mi conexión a Db2 con dbexpress y he colocado una consulta en un SqlDataset ligado a mi SqlConnection y al activarlo todo funciona bien. Pero cuando ligo un Datasource con un dbGrid y el Sql dataset me manda el error: "Operation not allowed on unidirectional dataset"


Alguién podria ayudarme a solucionar eso?

gracias desde ya
  • 0

#2 egostar

egostar

    missing my father, I love my mother.

  • Administrador
  • 14448 posts
  • LocationMéxico

Posted 09 November 2010 - 04:43 PM

Necesitas utilizar un ClientDataSet y un DataSetProvider ligados al SQLDataSet.

Salud OS
  • 0

#3 Fenareth

Fenareth

    Advanced Member

  • Administrador
  • 3486 posts
  • LocationMexico City

Posted 09 November 2010 - 04:50 PM

El error lo que dice es que de alguna manera estás queriendo hacer lecturas y modificaciones con el DataSet amor...

A unidirectional dataset can only move through records in one direction, not back and forward.  A grid can move in both directions and so can't be connected to a unidirectional dataset.

You realy need to read the "Developers Guide", part II, 'Developing Database Applications', page 14-6.

To use a grid you need these components ...
SQLQuery
DataSetProvider
ClientDataSet
DataSource
DBGrid

This can also be achieved by using the TSQLClientDatSet which murges the first 3 components in the above list into 1.


Tomado de aquí

Saludox ! :)
  • 0

#4 felipe

felipe

    Advanced Member

  • Administrador
  • 3283 posts
  • LocationColombia

Posted 09 November 2010 - 04:51 PM

¿Y que hace tu Query?


Saludos!
  • 0

#5 poliburro

poliburro

    Advanced Member

  • Administrador
  • 4945 posts
  • LocationMéxico

Posted 09 November 2010 - 04:53 PM

Es un simple select amigo felipe.

Muchas gracias ego, efectivamente eso soluciona el problema.

Muchas gracias amor (Alias fenareth juas¡¡¡) de hecho me dió mucha curiosidad el saber por qué tendría que ser así.
  • 0




IP.Board spam blocked by CleanTalk.