Quantcast
Channel: FiveTech Software tech support forums
Viewing all articles
Browse latest Browse all 26212

FWH 16.08 : Built-in MySql/MariaDB functionality (Updated )

$
0
0
[b:1ymx74id][size=150:1ymx74id]FWH 17.05: New methods of Connection Object[/size:1ymx74id][/b:1ymx74id] [color=#FF0000:1ymx74id][b:1ymx74id]oCn:TableStructure( cTable ) --> aStructure[/b:1ymx74id][/color:1ymx74id] cTable should be a table in the curreent db. We can query the structure of a table without opening the table. The result is identical to oRs:aStructure. oCn:ListColumns( [db.]cTable ) gives more information about the columns. [color=#FF0000:1ymx74id][b:1ymx74id]oCn:CopyStructure( [dbsrc.]srctable, [dbdst.]dsttable ) --> lSuccess[/b:1ymx74id][/color:1ymx74id] For creating a new table in the same or other database with the same structure as the source table. This function fails if (a) srctable does not exist or (b) dsttable already exits or (c) the table has a foreign key and the referred table is not availble in the destination db. [color=#FF0000:1ymx74id][b:1ymx74id]oCn:CopyTable( [dbsrc.]srctable, [dbdst.]dsttable, ; [cSrcFieldList], [cDstFieldList], [cSrcWhere], ;[/b:1ymx74id] ["update/ignore'] ) --> lSuccess[/color:1ymx74id] Copies contents of all fields or specified fields from srctable to dsttable for all rows or for selected rows with where condition. If the destination table does not exist, it is created.(See CopyStructure) By default if the dsttable already contains the primary/unique keys the entire operation fails. If 6th parameter is "ignore", only non-duplicate values are copied/inserted. If 6th parameter is "update", non-duplicate values are inserted and duplicate rows are updated with the values in the source table.

Viewing all articles
Browse latest Browse all 26212

Trending Articles