|
From: <cre...@us...> - 2007-07-03 02:46:09
|
Revision: 1709
http://frontierkernel.svn.sourceforge.net/frontierkernel/?rev=1709&view=rev
Author: creecode
Date: 2007-07-02 19:46:10 -0700 (Mon, 02 Jul 2007)
Log Message:
-----------
adding data and examples directories to mySql directory
Added Paths:
-----------
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/States2Esql.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/exportMySqlDump.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/importMySqlDump.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/connect.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/getNames.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/init.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/pingTest.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/query.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/selectDatabase.fvc
ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/threadSafe.fvc
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/States2Esql.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/States2Esql.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/States2Esql.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,81 @@
+FrontierVcsFile:3:TEXT:system.verbs.builtins.mySql.data.["States.sql"]
+
+# data obtained from < http://en.wikipedia.org/wiki/List_of_capitals_in_the_United_States >
+
+# CocoaMySQL dump
+# Version 0.5
+# http://cocoamysql.sourceforge.net
+#
+# Host: localhost (MySQL 4.1.9-standard-log)
+# Database: States
+# Generation Time: 2007-07-02 01:25:01 -0700
+# ************************************************************
+
+# Dump of table States
+# ------------------------------------------------------------
+
+CREATE TABLE `States` (
+ `State` varchar(32) NOT NULL default '',
+ `Date_of_statehood` smallint(6) unsigned NOT NULL default '0',
+ `Capital` varchar(32) NOT NULL default '',
+ `Capital_since` smallint(6) unsigned NOT NULL default '0',
+ `Most populous city?` enum('Yes','No') NOT NULL default 'No',
+ `Population` mediumint(8) unsigned NOT NULL default '0',
+ `Notes_on_current_capital` tinytext NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Alabama","1819","Montgomery","1846","No","200127","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Alaska","1959","Juneau","1906","No","30987","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Arizona","1912","Phoenix","1889","No","1475834","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Arkansas","1836","Little Rock","1836","No","184564","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("California","1850","Sacramento","1854","No","467343","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Colorado","1876","Denver","1867","No","566974","Denver City served as the capital of the Colorado Territory 1861-1862 and 1867-1876.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Connecticut","1776","Hartford","1875","No","124397","Hartford also served as the capital 1639-1686 and 1689-1700, and as the co-capital with New Haven 1701-1875.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Delaware","1776","Dover","1777","No","32135","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Florida","1845","Tallahassee","1824","No","156612","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Georgia","1776","Atlanta","1868","No","483108","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Hawaii","1959","Honolulu","1845","No","371657","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Idaho","1890","Boise","1865","No","216248","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Illinois","1818","Springfield","1839","No","111454","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Indiana","1816","Indianapolis","1825","No","791926","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Iowa","1846","Des Moines","1857","No","194163","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Kansas","1861","Topeka","1856","No","122327","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Kentucky","1792","Frankfort","1792","No","27741","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Louisiana","1812","Baton Rouge","1880","No","224097","Baton Rouge also served as the capital 1849-1862.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Maine","1820","Augusta","1832","No","18560","Augusta was officially capital from 1827 but the legislature did not sit there until 1832.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Maryland","1776","Annapolis","1694","No","36217","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Massachusetts","1776","Boston","1630","No","596368","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Michigan","1837","Lansing","1847","No","119128","Lansing is the only state capital that is not also the county seat of the county in which it is situated.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Minnesota","1858","Saint Paul","1849","No","287151","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Mississippi","1817","Jackson","1821","No","184256","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Missouri","1821","Jefferson City","1826","No","39636","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Montana","1889","Helena","1889","No","25780","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Nebraska","1867","Lincoln","1867","No","225581","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Nevada","1864","Carson City","1861","No","57701","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("New Hampshire","1776","Concord","1808","No","42221","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("New Jersey","1776","Trenton","1784","No","84639","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("New Mexico","1912","Santa Fe","1610","No","70631","El Paso del Norte served as the capital of the Santa Fé de Nuevo Méjico colony-in-exile during the Pueblo Revolt of 1680-1692.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("New York","1776","Albany","1797","No","95993","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("North Carolina","1776","Raleigh","1794","No","359332","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("North Dakota","1889","Bismarck","1883","No","55532","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Ohio","1803","Columbus","1816","No","730657","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Oklahoma","1907","Oklahoma City","1910","No","541500","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Oregon","1859","Salem","1855","No","149305","Salem first served as the capital in 1851, but Corvallis was briefly the capital in 1855.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Pennsylvania","1776","Harrisburg","1812","No","48950","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Rhode Island","1776","Providence","1900","No","176862","Providence also served as the capital 1636-1686 and 1689-1776. It was one of five co-capitals 1776-1853, and one of two co-capitals 1853-1900.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("South Carolina","1776","Columbia","1786","No","122819","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("South Dakota","1889","Pierre","1889","No","13876","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Tennessee","1796","Nashville","1826","No","607413","Nashville also served as the capital 1812-1818.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Texas","1845","Austin","1839","No","690252","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Utah","1896","Salt Lake City","1858","No","181743","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Vermont","1791","Montpelier","1805","No","8035","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Virginia","1776","Richmond","1780","No","195251","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Washington","1889","Olympia","1853","No","42514","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("West Virginia","1863","Charleston","1885","No","52700","Charleston also served as the capital 1870-1875.");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Wisconsin","1848","Madison","1838","No","221551","");
+INSERT INTO `States` (`State`,`Date_of_statehood`,`Capital`,`Capital_since`,`Most populous city?`,`Population`,`Notes_on_current_capital`) VALUES ("Wyoming","1890","Cheyenne","1869","No","55362","");
+
+
+
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/States2Esql.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/exportMySqlDump.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/exportMySqlDump.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/exportMySqlDump.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,15 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.data.utilities.exportMySqlDump
+
+«Changes
+ «7/2/07; 7:23:11 PM by TAC
+ «created
+
+local ( item = table.getCursor ( ) );
+local ( f = nameOf ( item^ ) );
+
+if file.putFileDialog ( "", @f ) {
+ local ( s = string.replaceAll ( item^, cr, lf ) );
+
+ file.writeWholeFile ( f, s )}
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/exportMySqlDump.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/importMySqlDump.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/importMySqlDump.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/importMySqlDump.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,16 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.data.utilities.importMySqlDump
+
+«Changes
+ «7/2/07; 7:23:11 PM by TAC
+ «created
+
+local ( f );
+
+if file.getFileDialog ( "", @f, 0 ) {
+ local ( s = file.readWholeFile ( f ) );
+
+ s = string.replaceAll ( s, lf, cr );
+
+ mySql.data.[ file.fileFromPath ( f ) ] = s}
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/data/utilities/importMySqlDump.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/connect.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/connect.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/connect.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,31 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.examples.connect
+
+on connect ( ) {
+
+ «Changes
+ «5/29/07; 12:00:00 AM by DG
+ «created
+
+ local ( databaseId, databaseName = "States", password = "", port = 3306, result, server = "127.0.0.1", user = "root" );
+
+ try {
+ databaseId = mySql.connect ( server, user, password, databaseName, port )}
+ else {
+
+ dialog.alert ( mySql.getErrorMessage ( databaseId ) );
+ dialog.alert ( mySql.getErrorNumber ( databaseId ) )};
+
+ result = mySql.close ( databaseId );
+
+ return ( result )};
+
+local ( i );
+
+mySql.init ( );
+
+for i = 1 to 1000000 {
+ msg ( i + ": " + connect ( ) + " (" + sys.memavail ( ) + ")" )};
+
+mySql.end ( )
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/connect.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/getNames.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/getNames.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/getNames.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,37 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.examples.getNames
+
+«Changes
+ «5/29/07; 12:00:00 AM by DG
+ «created
+
+local ( databaseId, databaseName = "States", password = "", port = 3306, result, server = "127.0.0.1", names, user = "root" );
+
+mySql.init ( );
+
+try {
+ databaseId = mySql.connect ( server, user, password, databaseName, port )}
+else {
+ dialog.alert ( mySql.getErrorMessage ( databaseId ) )};
+
+names = mySql.getDatabaseNames ( databaseId );
+
+dialog.alert ( names );
+
+if names contains "States" {
+ names = mySql.getTableNames ( databaseId );
+
+ dialog.alert ( names );
+
+ names = mySql.getFieldNames ( databaseId, "States" );
+
+ dialog.alert ( names );
+
+ result = mySql.close ( databaseId );
+
+ mySql.end ( );
+
+ msg ( result )}
+else {
+ scriptError ( "Please install the States table (mySql.examples.data.[ \"States.sql\" ]) in a States database on your MySQL server." )}
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/getNames.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/init.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/init.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/init.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,14 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.examples.init
+
+«Changes
+ «5/29/07; 12:00:00 AM by DG
+ «created
+
+try {
+ mySql.init ( );
+
+ dialog.alert ( "MySQL initialized." )}
+else {
+ dialog.alert ( tryError )}
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/init.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/pingTest.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/pingTest.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/pingTest.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,31 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.examples.pingTest
+
+«Changes
+ «5/29/07; 12:00:00 AM by DG
+ «created
+
+local ( databaseId, databaseName = "States", password = "", port = 3306, server = "127.0.0.1", user = "root" );
+
+mySql.init ( );
+
+dialog.alert ( "Testing server. Be sure it's on." );
+
+databaseId = mySql.connect ( server, user, password, databaseName, port );
+
+dialog.alert ( "Server ping: " + mySql.pingServer ( databaseId ) );
+
+dialog.alert ( "Now, turn server off for a moment. Click OK when server is off." );
+
+dialog.alert ( "Server ping: " + mySql.pingServer ( databaseId ) );
+
+dialog.alert ( "Now, turn back on. Click OK when server is on." );
+
+dialog.alert ( "Server ping: " + mySql.pingServer ( databaseId ) );
+
+dialog.alert ( "Server ping: " + mySql.pingServer ( databaseId ) );
+
+mySql.close ( databaseId );
+
+mySql.end ( )
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/pingTest.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/query.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/query.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/query.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,42 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.examples.query
+
+«Changes
+ «5/29/07; 12:00:00 AM by DG
+ «created
+
+local ( databaseId, databaseName = "States", password = "", port = 3306, queryId, result, server = "127.0.0.1", user = "root" );
+
+result = mySql.init ( );
+
+databaseId = mySql.connect ( server, user, password, databaseName, port );
+
+if mySql.getDatabaseNames ( databaseId ) contains "States" {
+ queryId = mySql.compileQuery ( databaseId, "select * from States" );
+
+ dialog.alert ( "Selected row count: " + mySql.getSelectedRowCount ( queryId ) );
+
+ dialog.alert ( "Column count: " + mySql.getColumnCount ( databaseId ) );
+
+ dialog.alert ( "Query warnings: " + mySql.getQueryWarningCount ( databaseId ) );
+
+ dialog.alert ( "Query info: " + mySql.getQueryInfo ( databaseId ) );
+
+ loop {
+ result = mySql.getRow ( queryId );
+
+ if result == 0 {
+ break};
+
+ dialog.alert ( result )};
+
+ mySql.clearQuery ( queryId );
+
+ result = mySql.close ( databaseId );
+
+ result = mysql.end ( );
+
+ msg ( result )}
+else {
+ scriptError ( "Please install the States table (mySql.examples.data.[ \"States.sql\" ]) in a States database on your MySQL server." )}
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/query.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/selectDatabase.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/selectDatabase.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/selectDatabase.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,47 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.examples.selectDatabase
+
+«Changes
+ «5/29/07; 12:00:00 AM by DG
+ «created
+
+local ( databaseId, databaseName = "States", password = "", port = 3306, result, server = "127.0.0.1", names, user = "root" );
+
+mySql.init ( );
+
+try {
+ databaseId = mySql.connect ( server, user, password, databaseName, port )}
+else {
+ dialog.alert ( mySql.getErrorMessage ( databaseId ) );
+
+ return ( false )};
+
+names = mySql.getDatabaseNames ( databaseId );
+
+dialog.alert ( names );
+
+names = mySql.getTableNames ( databaseId );
+
+dialog.alert ( names );
+
+try {
+ mySql.selectDatabase ( databaseId, "mysql" )}
+else {
+ dialog.alert ( mySql.getErrorMessage ( databaseId ) );
+
+ result = mySql.close ( databaseId );
+
+ mySql.end ( );
+
+ return ( false )};
+
+names = mySql.getTableNames ( databaseId );
+
+dialog.alert ( names );
+
+result = mySql.close ( databaseId );
+
+mySql.end ( );
+
+msg ( result )
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/selectDatabase.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
Added: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/threadSafe.fvc
===================================================================
--- ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/threadSafe.fvc (rev 0)
+++ ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/threadSafe.fvc 2007-07-03 02:46:10 UTC (rev 1709)
@@ -0,0 +1,12 @@
+FrontierVcsFile:3:scpt:system.verbs.builtins.mySql.examples.threadSafe
+
+«Changes
+ «5/29/07; 12:00:00 AM by DG
+ «created
+
+if not ( mySql.isThreadSafe ( ) ) {
+ dialog.alert ( "Library is NOT thread-safe." )}
+else {
+ dialog.alert ( "Library compiled to be thread-safe." )}
+
+
Property changes on: ODBs/trunk/frontierRoot/system/verbs/builtins/mySql/examples/threadSafe.fvc
___________________________________________________________________
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|