rfactorX
rfactorX Overview
The rfactorX project was design to parser the race results XML from the game Rfactor and load the data into either Microsoft SQL server or MYSQL using an ODBC connection. The program was developed for the F1A League to collate and view race statisical data.
Database Structure
The follwoing image is example of the database structure that a rfactor race or qualitying XML file.
ODBC Configuration
Microsoft SQL Server ODBC Example
[ODBC]
DRIVER=SQL Native Client
UID=username
DATABASE=rfactorDB
WSID=computername
APP=Microsoft Data Access Components
Trusted_Connection=Yes
SERVER=computername\SQLEXPRESS
MySQL ODBC Example
[ODBC]
DRIVER=MySQL ODBC 3.51 Driver
UID=username
PASSWORD=password
SERVER=server_ipaddress
PORT=0
OPTION=0
DATABASE=rfactorDB
The MySQL ODBC connector can be download from Connector/ODBC - MySQL ODBC driver
Application Options
-v [ --version ] print version string
Provide details of version
-h [ --help ] produce help message
List of argument options:
Application Options:
-v [ --version ] print version string
-h [ --help ] produce help message
-d [ --dsn ] arg Database connection file
-r [ --resultfile ] arg xml results file
-s [ --string ] All Db data types to Strings
--debug turns on debug logging
-d [ --dsn ] arg Database connection file
you must add the path of the dsn file. Example -d .\rfactorDB.dsn
-r [ --resultfile ] arg xml results file
example: -r srace.xml
-s [ --string ] All Db data types to Strings
If you define the -s flag all the data in the database will be presented as strings.
--debug turns on debug logging
Enables debuging.
Known Issues
There is a known bug with the MySQL interface. If a key word is used as a column name MySQL load will fail.
Example: The RaceResults table contains a column called Mod. Mod is a Key word. To get around this issue when Mod is detected as a column name a underscore is added to the end of the name "Mod_".