DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT:import_mssql¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2007-11-14T23:15:55 |
Author: | Olaf Lehmann |
Email: | im_mssql@lehmano.de |
Info 3: | |
Info 4: |
EXT:import_mssql¶
Extension Key: import_mssql
Copyright 2007, Olaf Lehmann, <extension_typo3@gmx.de>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
Table of Contents¶
EXT:import_mssql 1
Introduction 1
What does it do? 1
Users manual 1
FAQ 1
Adminstration 1
Configuration 2
FAQ 3
Tutorial 3
Known problems 4
To-Do list 4
Changelog 4
Introduction¶
What does it do?¶
- This backend module can import data from a given mssql server to one typo3 table
- The module is intended for import of specific data from some mssql tables from the local network into one typo3 table
Adminstration¶
- Describes how to manage the extension from a superuser point of view. That relates to Page/User TSconfig, permissions, configuration etc. which administrator level users have access to.
- The extension requires a working connection of your typo3 server to a running mssql server.
- Here you can configure the connection parameter for the mssql server
Configuration¶
- To configure the import we use the TS config field of the page. Here we define from which mssqltable we fetch data from and the data destination.
mod.web_tximportmssqlM1 {
*table = orders //Tablename of the mssql table
table_label = Orders // Label for table name
*fields = UID,CUSTOMERNAME,55,CODE,image //Data fields, are related to targetfields
*targettable = tx_sometypotable //The table which we want to fill
*targetfields = code,name,category,image //The data fields of target table
fieldheader = UID,NAME,CAT,NUM //Fieldheader labels
*filter = name LIKE "Customer" OR name LIKE "custom" //Place your conditions here
file_source_path = some/path/to/file/
fileext = .jpg
file_destination_path = /tx_cabinetshop
*uidfield = code //the field where we can test if data already exists (must be unique on both sides)
}
(*required)
Tutorial¶
We have a typo3 server and a mssql server together in the same local network and want to fetch/update some typo3 data from the mssqlserver from time to time.
After install and configuring the main connection parameters, we find a new Backend module. But when we click on the module, we just see this screen:
For a working import you have to do two things: Browse to a page where you have put your TSconfig settings and press the button Import/Update.
Your import module should look like this:
Lets say we want fetch new product price from the mssql server (table “mssqlproducts) and import/update the table “tt_products_articles” with that data.
Additionally we want copy a image file from a source directory to “uploads/tx_ttproducts”. The file name is always the last field in the line. The source table has no image field, but the “productcode” is always the filename of the picture.
In the Tsconfig field we put this code:
mod.web_tximportmssqlM1 {
table = mssqlproducts
table_label = Products
fields = msuid,price, productcode
targettable = tt_products_articles
targetfields = uid_product,price,image
fieldheader = UID ,PRICE
filter = msuid >1234
file_source_path = some/path/to/file/
fileext = .jpg
file_destination_path = /tx_ ttproducts
uidfield = uid_product
}
If we already have a data field with content like “lolo.jpg” we do not need the parameter “fileext”.
To be able to create new datasets in the target table make sure that you fill at least all required fields!
Known problems¶
To-Do list¶
Changelog¶
EXT:import_mssql - 4