Ignore:
Timestamp:
2008-10-03T16:00:50+13:00 (16 years ago)
Author:
mdewsnip
Message:

Support for using MSSQL for infodb databases, many thanks to Jeffrey Ke from DL Consulting Ltd. (http://www.dlconsulting.com). Please note that MSSQL only runs on Windows, and requires some setup before use. Documentation will be added to the Greenstone Wiki explaining this.

Location:
gsdl/trunk/runtime-src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/colservr/collectset.cpp

    r16895 r17476  
    4848#endif
    4949
     50#ifdef USE_MSSQL
     51#include "mssqldbclass.h"
     52#endif
     53
     54
    5055collectset::collectset (text_t& gsdlhome, text_t& collecthome)
    5156{
     
    251256  }
    252257#endif
    253 
     258 
     259#ifdef USE_MSSQL
     260  if (infodbtype == "mssql")
     261  {
     262    mssqldbclass *mssql_db_ptr = new mssqldbclass();
     263    db_ptr = mssql_db_ptr;
     264
     265    // add a sql browse filter
     266    sqlbrowsefilterclass *sqlbrowsefilter = new sqlbrowsefilterclass();
     267    sqlbrowsefilter->set_sql_db_ptr(mssql_db_ptr);
     268    cserver->add_filter (sqlbrowsefilter); 
     269  }
     270#endif
     271 
    254272  // Use GDBM if the infodb type is empty or not one of the values above
    255273  if (db_ptr == NULL)
  • gsdl/trunk/runtime-src/src/colservr/win32.mak

    r16577 r17476  
    3636DLLDEBUG = 0
    3737USE_SQLITE = 0
     38USE_MSSQL = 0
    3839
    3940
     
    6061!ENDIF
    6162
     63!IF $(USE_MSSQL)
     64MSSQL_DEFINES = -DUSE_MSSQL
     65!ELSE
     66MSSQL_DEFINES =
     67!ENDIF
     68
    6269
    6370AR = lib
    6471CC = cl
    6572DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE \
    66         -DXML_STATIC $(SQLITE_DEFINES)
     73        -DXML_STATIC $(SQLITE_DEFINES) $(MSSQL_DEFINES)
    6774# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist!
    6875INCLUDES = -I"$(GSDL_DIR)" -I"$(COMMON_DIR)\src\lib" \
  • gsdl/trunk/runtime-src/win32.mak

    r16734 r17476  
    3333DLLDEBUG = 0
    3434USE_SQLITE = 0
     35USE_MSSQL = 0
    3536USE_Z3950 = 0
    3637
     
    6162!IF $(USE_SQLITE)
    6263MAKECMD = $(MAKECMD) USE_SQLITE=1
     64!ENDIF
     65!IF $(USE_MSSQL)
     66MAKECMD = $(MAKECMD) USE_MSSQL=1
    6367!ENDIF
    6468!IF $(USE_Z3950)
Note: See TracChangeset for help on using the changeset viewer.