(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 5603, 166]*) (*NotebookOutlinePosition[ 9128, 253]*) (* CellTagsIndexPosition[ 8946, 244]*) (*WindowFrame->Normal*) Notebook[{ Cell["Creating databases", "Title"], Cell[CellGroupData[{ Cell["Introducing a New Database", "Section", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}], Cell["\<\ Creation of a new database can be done only through the ODBC Control Panel.\ \>", "Text", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}] }, Closed]], Cell[CellGroupData[{ Cell["Filling the New Database", "Section", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[CellGroupData[{ Cell["Create the structure of dbcreate.mdb", "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[BoxData[ \(Needs["\"]\)], "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[CellGroupData[{ Cell[BoxData[ \(dbcreate\ = \ OpenDataSource["\"]\)], "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[BoxData[ \(DataSourceObject["dbcreate", "<>"]\)], "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Create the table", "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[BoxData[ \(DataSourceEvaluate[dbcreate, \ SQLCreateTable[ SQLTable["\"], \ {SQLColumn[ColumnName -> "\", \ DataTypeName -> "\", \ DataLength -> 4, \ Nullable \[Rule] False], \ SQLColumn[ColumnName -> "\", \ DataTypeName -> "\", \ DataLength -> 40, \ Nullable \[Rule] False], \ SQLColumn[ColumnName -> "\", DataTypeName -> \ "\", \ DataLength -> 20, \ Nullable \[Rule] False]}]]\)], "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[TextData[{ "Enter three rows of data in the \[OpenCurlyDoubleQuote]employees\ \[CloseCurlyDoubleQuote] table using the ", StyleBox["SQLInsert", "MR"], " function three times, with different data values each time." }], "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[BoxData[{ \(DataSourceEvaluate[dbcreate, \ SQLInsert[ SQLTable["\"], \ {{SQLColumn["\"], "\<0001\>"}, \ \ {SQLColumn["\"], "\"}, \ {SQLColumn["\"], "\ \"}}]]\n\), "\[IndentingNewLine]", \(DataSourceEvaluate[dbcreate, \ SQLInsert[ SQLTable["\"], \ {{SQLColumn["\"], "\<0002\>"}, \ {SQLColumn["\"], "\"}, \ {SQLColumn["\"], \ "\"}}]]\n\), "\n", \(DataSourceEvaluate[dbcreate, \ SQLInsert[ SQLTable["\"], \ {{SQLColumn["\"], "\<0003\>"}, \ \ {SQLColumn["\"], "\"}, \ {SQLColumn["\"], "\ \"}}]]\)}], "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell["\<\ View the \[OpenCurlyDoubleQuote]employees\[CloseCurlyDoubleQuote] table with \ column headings. The column names each have a space in the name as \ defined.\ \>", "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[CellGroupData[{ Cell[BoxData[ \(DataSourceEvaluate[dbcreate, \ SQLSelect[SQLTable["\"]], \ ShowColumnHeadings\ -> \ True] // TableForm\)], "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[BoxData[ TagBox[GridBox[{ {"\<\"emp_id\"\>", "\<\"emp_lname\"\>", "\<\"emp_fname\"\>"}, {"\<\"0001\"\>", "\<\"Wayne\"\>", "\<\"Sandy\"\>"}, {"\<\"0002\"\>", "\<\"Coburn\"\>", "\<\"Washington\"\>"}, {"\<\"0003\"\>", "\<\"James\"\>", "\<\"John\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], (TableForm[ #]&)]], "Output"] }, Closed]], Cell[BoxData[ \(CloseDataSource[dbcreate]\)], "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}] }, Closed]] }, Closed]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, ScreenStyleEnvironment->"Presentation", WindowSize->{621, 575}, WindowMargins->{{Automatic, 46}, {24, Automatic}}, StyleDefinitions -> "Classroom.nb" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{ "DBAK Chapter 2"->{ Cell[1777, 53, 97, 1, 78, "Section", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}], Cell[1877, 56, 151, 3, 41, "Text", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}]}, "DBAK Chapter 2.2"->{ Cell[1777, 53, 97, 1, 78, "Section", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}], Cell[1877, 56, 151, 3, 41, "Text", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}]}, "DBAK Chapter 6"->{ Cell[2065, 64, 95, 1, 50, "Section", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2185, 69, 110, 1, 66, "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2298, 72, 113, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2436, 78, 130, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2686, 89, 90, 1, 38, "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2779, 92, 632, 12, 286, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[3414, 106, 288, 6, 66, "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[3705, 114, 808, 16, 424, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[4516, 132, 233, 5, 66, "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[4774, 141, 209, 3, 102, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[5465, 160, 110, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}]}, "DBAK Chapter 6.3"->{ Cell[2065, 64, 95, 1, 50, "Section", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2185, 69, 110, 1, 66, "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2298, 72, 113, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2436, 78, 130, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2686, 89, 90, 1, 38, "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2779, 92, 632, 12, 286, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[3414, 106, 288, 6, 66, "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[3705, 114, 808, 16, 424, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[4516, 132, 233, 5, 66, "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[4774, 141, 209, 3, 102, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[5465, 160, 110, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}]} } *) (*CellTagsIndex CellTagsIndex->{ {"DBAK Chapter 2", 6289, 184}, {"DBAK Chapter 2.2", 6508, 189}, {"DBAK Chapter 6", 6725, 194}, {"DBAK Chapter 6.3", 7835, 217} } *) (*NotebookFileOutline Notebook[{ Cell[1717, 49, 35, 0, 67, "Title"], Cell[CellGroupData[{ Cell[1777, 53, 97, 1, 78, "Section", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}], Cell[1877, 56, 151, 3, 41, "Text", CellTags->{"DBAK Chapter 2", "DBAK Chapter 2.2"}] }, Closed]], Cell[CellGroupData[{ Cell[2065, 64, 95, 1, 50, "Section", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[CellGroupData[{ Cell[2185, 69, 110, 1, 66, "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2298, 72, 113, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[CellGroupData[{ Cell[2436, 78, 130, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2569, 82, 68, 1, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[2686, 89, 90, 1, 38, "Subsection", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[2779, 92, 632, 12, 286, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[3414, 106, 288, 6, 66, "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[3705, 114, 808, 16, 424, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[4516, 132, 233, 5, 66, "Text", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[CellGroupData[{ Cell[4774, 141, 209, 3, 102, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}], Cell[4986, 146, 464, 11, 129, "Output"] }, Closed]], Cell[5465, 160, 110, 2, 56, "Input", CellTags->{"DBAK Chapter 6", "DBAK Chapter 6.3"}] }, Closed]] }, Closed]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)