Hi All,

I use LONGBLOB and BLOB in SQL Back-End (ie.: mySQL )
Hope SDDODBC driver can support the above datatype ...

Now.   I find that dBUseArea(...) doest not support LONGBLOB and BLOB for
mySQL as back-end...

http://www.mingyik.com/dnload/tstodbc60.jpg
http://www.mingyik.com/dnload/tstodbc70.jpg


/*
 * $Id$
 */

#include "simpleio.ch"
#include "hbrddsql.ch"

REQUEST SQLMIX, SDDODBC, DBFCDX

PROC main()
   LOCAL nConnection, nI, aI

   local aStruct := { { "CHARACTER", "C", 25, 0 }, ;
                      { "NUMERIC",   "N",  8, 0 }, ;
                      { "DOUBLE",    "N",  8, 2 }, ;
                      { "DATE",      "D",  8, 0 }, ;
                      { "LOGICAL",   "L",  1, 0 } }

   RDDSETDEFAULT( "SQLMIX" )
   SET( _SET_DATEFORMAT, "yyyy-mm-dd" )
// nConnection := RDDINFO( RDDI_CONNECT, { "MYSQL",
"localhost","root","mysql","test" } )
// nConnection := RDDINFO( RDDI_CONNECT, { "ODBC",
"Server=localhost;Driver={MySQL ODBC 5.1
Driver};dsn=;User=test;database=test;" } )
   nConnection := RDDINFO( RDDI_CONNECT, { "ODBC", "dsn=testmysql;" } )
   IF nConnection == 0
      ? "Unable connect to server", RDDINFO( RDDI_ERRORNO ), RDDINFO(
RDDI_ERROR )
      RETURN
   ENDIF

   ? "Database Connection: "+ LTrim(Str(nConnection)) + "  OK  with
dsn=testmysql;"
   RDDINFO(RDDI_EXECUTE, "DROP TABLE country")
// RDDINFO(RDDI_EXECUTE, "CREATE TABLE country (CODE char(3), NAME char(50),
RESIDENTS int(11), TD1 date, TN1 Numeric(10,2) default 0.00 )")
// RDDINFO(RDDI_EXECUTE, "CREATE TABLE country (CODE char(3), NAME char(50),
RESIDENTS int(11), TLB1 LONGBLOB, TLT1 LONGTEXT default '', TB1 BLOB, TT1
TEXT default '')" )
   RDDINFO(RDDI_EXECUTE, "CREATE TABLE country (CODE char(3), NAME char(50),
RESIDENTS int(11), TLB1 LONGBLOB, TB1 BLOB)" )
   RDDINFO(RDDI_EXECUTE, "INSERT INTO country (CODE, NAME, RESIDENTS) values
('LTU', 'Lithuania', 3369600),('USA', 'United States of America',
305397000), ('POR', 'Portugal', 10617600), ('POL', 'Poland', 38115967),
('AUS', 'Australia', 21446187), ('FRA', 'France', 64473140), ('RUS',
'Russia', 141900000)")

   ? dBUseArea( .T., "SQLMIX", "SELECT * FROM country ORDER BY CODE LIMIT 0,
1;", "country", .T., .F.)
   ? "Rdd: SQLMIX   Area: "+Ltrim(Str(Select())) +" Alias: " +Alias()+ "  
BOF() is "+ IIF(Bof()," TRUE", "FALSE")
 
   dBCreate( "testdbf", aStruct, "DBFCDX" )
   dBUseArea( .T., "dbfcdx", "testdbf.dbf", "TESTALS", .T., .F. )
   ? "Rdd: DBFCDX   Area: "+Ltrim(Str(Select())) +" Alias: " +Alias()+ "  
BOF() is "+ IIF(Bof()," TRUE", "FALSE")

   DBCLOSEALL()
RETURN



Shum






-- 
View this message in context: 
http://n2.nabble.com/Ask-rddsql-SDDODBC-driver-for-support-BLOB-and-LONGBLOB-tp4864437p4864437.html
Sent from the harbour-devel mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to