![]() $mysql = Connect-MySQL -User $User -Password $Password -Database $Database -Server $Server -Port $Port With the data and column names collected, you are ready to replicate the data into a MySQL database.Ĭonnect to MySQL, using the server address and port of the MySQL server, valid user credentials, and a specific database with the table in which the data will be replicated: ![]() Inserting XML Data into the MySQL Database $columns = ($data | Get-Member -MemberType NoteProperty | Select-Object -Property Name).Name Save a list of the column names from the returned data. $data = Invoke-XML -Connection $xml -Query 'SELECT * FROM people WHERE = ]' -Params ]'='Roberts'} You can also use the Invoke-XML cmdlet to execute pure SQL-92 statements: $data = Select-XML -Connection $xml -Table "people" Retrieve the data from a specific resource: $xml = Connect-XML -URI $URI -DataModel $DataModel The data includes entries for people, the cars they own, and various maintenance services performed on those cars. You will also find the sample data used in the following examples. See the Modeling XML Data chapter for more information on configuring the relational representation. The tables contain a primary key and a foreign key that links to the parent document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |