________________________________

        From: Massimo Belgrano [mailto:mbelgr...@deltain.it] 
        Sent: Thursday, June 04, 2009 5:56 PM
        To: Harbour Project Main Developer List.
        Subject: Re: [Harbour] hash() in harbour

        you must repalce connect with string get from
http://www.connectionstrings.com/
        SQLRDD IS a Simple SQL interface that  implements accessing SQL
query result via RDD
        interface. It is not intended to be replacement for
"transparent" move of DBFCDX application to SQL world. 
        SDD is acronym for Sql Database Driver. RDD is used to implement
access
        of different database formats like DBF, SDF, etc. SDD is used to
implement
        access of different SQL databases. Every SQL server (MySQL,
PostgreSQL, etc.)
        has a corresponding SDD. SDD driver implements a specific part
of data
        exchange interface between SQLBASE and SQL server.

        //libs=rddsql sddodbc

        REQUEST SDDODBC, SQLMIX

        #define RDDI_CONNECT          1001
         
        PROC main()
           RDDSETDEFAULT( "SQLMIX" )
           SET( 4, "yyyy-mm-dd" )
           ? "Connect:", RDDINFO( RDDI_CONNECT, { "ODBC", "DBQ="  +
hb_DirBase() + "\..\..\..\hbodbc\tests\test.mdb;Driver={Microsoft Access
Driver (*.mdb)}" } )
           ? "Use:", DBUSEAREA( .T.,, "select * from test", "test" )
           ? "Alias:", ALIAS()
           ? "DB struct:", HB_VALTOEXP( DBSTRUCT() )
           INKEY( 0 )
           BROWSE()

           INDEX ON FIELD->SALARY TO salary
           DBGOTOP()
           BROWSE()
           DBCLOSEAREA()
        RETURN   
____________________________

Any examle to link it with MinGW ?
I try compile code :

*--------------test_sql_sdd.prg-----
//libs=rddsql sddodbc
REQUEST SDDODBC, SQLMIX
#define RDDI_CONNECT          1001
PROC main()
   RDDSETDEFAULT( "SQLMIX" )
   SET( 4, "yyyy-mm-dd" )
   // ? "Connect:", RDDINFO( RDDI_CONNECT, { "ODBC", "DBQ="  +
hb_DirBase() + "\..\..\..\hbodbc\tests\test.mdb;Driver={Microsoft Access
Driver (*.mdb)}" } )
   ? "Connect:", RDDINFO( RDDI_CONNECT, { "ODBC",
"DBQ=C:\harbour\contrib\hbodbc\tests\test.mdb;Driver={Microsoft Access
Driver (*.mdb)}" } )
   ? "Use:", DBUSEAREA( .T.,, "select * from test", "test" )
   ? "Alias:", ALIAS()
   ? "DB struct:", HB_VALTOEXP( DBSTRUCT() )
   INKEY( 0 )
   BROWSE()
   INDEX ON FIELD->SALARY TO salary
   DBGOTOP()
   BROWSE()
   DBCLOSEAREA()
RETURN
*-------------------
With command :

hbmk2 test_sql_sdd.prg -lrddado.lib -lhbwin.lib
-lC:\harbour-11\lib\win\mingw\librddsql.a
-lC:\harbour-11\lib\win\mingw\libsddodbc.a 

And have :

C:\TEST_HB\bin>hbmk2 test_sql_sdd.prg -lrddado.lib -lhbwin.lib
-lC:\harbour-11\lib\win\mingw\librddsql.a
-lC:\harbour-11\lib\win\mingw\libsddodbc.a
Harbour 1.1.0dev (Rev. 11179)
Copyright (c) 1999-2009, http://www.harbour-project.org/
Compiling 'test_sql_sdd.prg'...
Lines 20, Functions/Procedures 1
Generating C source output to 'test_sql_sdd.c'... Done.
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xc4)
: undefined reference to `sqlfe...@4'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x226
): undefined reference to `sqlgetd...@24'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x2b2
): undefined reference to `sqlgetd...@24'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x37b
): undefined reference to `sqlgetd...@24'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x3eb
): undefined reference to `sqlgetd...@24'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x47f
): undefined reference to `sqlgetd...@24'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x514
): more undefined references to `sqlgetd...@24' follow
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x6ef
): undefined reference to `sqlfrees...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x77f
): undefined reference to `sqldisconn...@4'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x795
): undefined reference to `sqlfreehan...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x7ab
): undefined reference to `sqlfreehan...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x814
): undefined reference to `sqlallochan...@12'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x876
): undefined reference to `sqlsetenva...@16'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x89b
): undefined reference to `sqlallochan...@12'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x921
): undefined reference to `sqldriverconn...@32'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x963
): undefined reference to `sqlfreehan...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x97d
): undefined reference to `sqlfreehan...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x9ed
): undefined reference to `sqlallocs...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xa2a
): undefined reference to `sqlexecdir...@12'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xa4b
): undefined reference to `sqlfrees...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xa70
): undefined reference to `sqlrowco...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xa9c
): undefined reference to `sqlfrees...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xb51
): undefined reference to `sqlallochan...@12'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xb86
): undefined reference to `sqlexecdir...@12'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xbb0
): undefined reference to `sqlnumresultc...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xc6d
): undefined reference to `sqldescribe...@36'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xd06
): undefined reference to `sqlfrees...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0xd52
): undefined reference to `sqlfrees...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x11c
a): undefined reference to `sqlfrees...@8'
C:/harbour-11/lib/win/mingw/libsddodbc.a(odbcdd.o):odbcdd.c:(.text+0x121
5): undefined reference to `sqlfrees...@8'
collect2: ld returned 1 exit status
hbmk: Error: Running linker. 1
c:\harbour-11\mingw\bin\gcc.exe test_sql_sdd.o hbmk_7dy41e.o
-mconsole -Wl,--start-group -lrddado -lhbwin C:/harbour-11/li
b/win/mingw/librddsql.a C:/harbour-11/lib/win/mingw/libsddodbc.a
-lhbcpage -lhblang -lhbcommon -lhbcplr -lhbdebug -lhbvm -lhb
rdd -lhbusrrdd -lhbhsx -lhbsix -lrddntx -lrddcdx -lrddfpt -lhbuddall
-lrddnsx -lhbrtl -lhbpp -lhbmacro -lhbextern -lgtcgi -lg
tpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbpcre -lhbzlib -lkernel32
-luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32
-lcomdlg32 -lshell32 -lole32 -loleaut32 -luuid -lmpr -lwinmm -lmapi32
-limm32 -lmsimg32 -Wl,--end-group -otest_sql_sdd.exe -L
c:/harbour-11/lib/win/mingw -Lc:/harbour-11/lib

Regards,
Marek Horodyski
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to