Re: Storing lists on SQL

*To*: mathgroup at smc.vnet.net*Subject*: [mg106340] Re: Storing lists on SQL*From*: Chris Degnen <degnen at cwgsy.net>*Date*: Fri, 8 Jan 2010 06:29:08 -0500 (EST)*References*: <hi1qbt$eka$1@smc.vnet.net> <hi6sv7$9u5$1@smc.vnet.net>

Thanks to all who replied. SQLExpr was exactly what I was looking for. I found if I define a text field with data length greater than 65535 a 16 million character-length field is created, which should certainly suffice if 65535 isn't enough. E.g. with DatabaseLink connection established: SQLCreateTable[conn, SQLTable["Testing"], {SQLColumn["Record", "DataTypeName" -> "INTEGER"], SQLColumn["Data", "DataTypeName" -> "TEXT", "DataLength" -> 65536]}]; (* check table definition *) Print[SQLColumns[conn, "Testing"]]; data1 = {"Lots of data", aRule -> {91, 90, 93, 92}, {"A list", "Etc."}}; SQLInsert[conn, "Testing", {"Record", "Data"}, {1, SQLExpr[data1]}]; retreivedData = SQLSelect[conn, "Testing", {"Data"}, SQLColumn["Record"] == 1][[1, 1, 1]]; SQLDropTable[conn, "Testing"]; Print[retreivedData]; output: {SQLColumn[{testing,Record}, DataTypeName->int,Nullable->1,DataLength->11], SQLColumn[{testing,Data}, DataTypeName->mediumtext,Nullable->1,DataLength->16277215]} {Lots of data,aRule->{91,90,93,92},{A list,Etc.}}