Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.66 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. En archivo de estructura:
  2.  
  3. typedef struct
  4. {
  5.         char group [10]; /*Después cambiar por char * */
  6.         char idNoticia [10];
  7.         char head [100];
  8.         char body [100];
  9.         int trans;
  10. } noticia_t;
  11.  
  12. noticia_t *noticia;
  13.  
  14.         key.data = noticia->idNoticia;
  15.         key.size = 10;
  16.         data.data = noticia;
  17.         data.size = sizeof(*noticia_t);
  18. // Me parece q aca.. en la db estas grabando la dir de data q contiene un data q apunta a la noticia y
  19. // ahi se va ala mierda todo
  20.         ret = dbp->put(dbp, NULL, &key, &data, DB_NOOVERWRITE);
  21.         dbp->get(dbp, NULL, &key, &data, 0);
  22. //      printf("Clave: %s, Head: %s \n", key.data, data.data->noticia.IDnoticia);
  23. // no entiendo esa linea de arriba