source: admin/Sources/Includes/Database.h @ 64f4ada

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 64f4ada was 3ec149c, checked in by alonso <alonso@…>, 15 years ago

git-svn-id: https://opengnsys.es/svn/trunk@1314 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 1.8 KB
Line 
1// ******************************************************************************************************
2// Aplicación HIDRA
3// Copyright 2004 Jos�Manuel Alonso. Todos los derechos reservados.
4// Fichero: Database.h
5//      Descripción:
6//              Fichero de cabecera de la clase Database para implementar funciones de manipulaci�
7//              de bases de datos sobre un Servidor Mysql
8// ******************************************************************************************************
9#include <stdio.h>
10#include <stdlib.h>
11#include <string.h>
12#include </usr/include/mysql/mysql.h>
13// __________________________________________________________________________
14class Database;
15class Table;
16// __________________________________________________________________________
17class Database
18{
19public:
20        MYSQL *m_Cnn;
21        char m_ErrStr[500];
22        Database();
23        bool Open(char* UserName, char* Pwd,char* server,char*Database);
24        bool OpenTbl(int Mode, char* CmdStr, Table& Tbl);
25        bool Close(void);
26        bool Execute(char* CmdStr);
27        bool Execute(char* CmdStr, Table& Tbl);
28        void GetErrorErrStr(char* ErrStr);
29};
30// __________________________________________________________________________
31class Table{
32        char* tomadato(const char* FieldName);
33public:
34        bool eof,bof;
35        MYSQL_RES       * m_Rec ;
36        MYSQL_FIELD *fields;
37        unsigned int num_fields;
38        MYSQL_ROW       row ;
39        MYSQL_ROW_OFFSET ptr;
40        my_ulonglong numreg;
41        char m_ErrStr[500];
42        Table();
43        void GetErrorErrStr(char* ErrStr);
44        bool ISEOF();
45        bool MoveNext();
46        bool MovePrevious();
47        bool MoveFirst();
48        bool MoveLast();
49
50        bool Get(const char* FieldName, char* FieldValue);
51        bool Get(const char* FieldName,int &FieldValue);
52        bool Get(const char* FieldName,char &FieldValue);
53};
54// __________________________________________________________________________
55class Herror
56{
57public:
58        int nError; // C�igo del error
59        char dError[500]; // Descripción del error
60};
Note: See TracBrowser for help on using the repository browser.