Hello,
I am trying to get TS2.0 to save it's results to a MySQL DB across a network, and I have no idea what to try next. The configuration below works fine if used with TS3.0 & TS3.1, or if the database is on the same system as TS2.0.
MySQL Driver: mysql-connector-odbc-3.51.12-win32.msi
Connection string: "Provider=MSDASQL.1
Persist Security Info=False
User ID=root
Data Source=TestResultsConn
Mode=ReadWrite"
SQL for Database: See attached
TS Database Settings: See attached
The error produced by TS2.0 is:
DETAILS:
An exception occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
An error occurred executing a statement.
Schema: ResultArchive - MySQL.
Statement: Sequences.
[MySQL][ODBC 3.51 Driver][mysqld-5.0.18]
Cannot add or update a child row: a foreign key constraint fails
(`resultarchive/sequences`, CONSTRAINT `TestID_FK` FOREIGN KEY (`TestID`) REFERENCES `tests` (`TestID`))
Multiple-step OLE DB operation generated errors.
Check each OLE DB status value, if available.
No work was done.
Source: TSDBLog
ERROR CODE:
-2147217871
User-defined error code.
LOCATION:
Step 'Log Results to Database' of sequence 'Log To Database' in 'Database.seq'
If I remove the foreign key from the second table in the database,
"CONSTRAINT TestID_FK
FOREIGN KEY (TestID)
REFERENCES Tests (TestID)"
and adjust the TS schema accordingly, TS2.0 will save to the DB across the network, which is great, but without the relation between the tables the information is useless.
I have tried 2 additional drivers using the same database and TS schema:
OleDB-3.0
OleDB-3.9.4
The connection string used for these drivers:
"Provider=MySqlProv
Data Source=ResultArchive
Integrated Security=\"\"
Password=\"\"
User ID=root
Location=172.28.3.124
Extended Properties=\"\""
Both TS2.0 and TS3.0 fail at the first column in the first table with both drivers, although I am able to 'view data' from the database options:
DETAILS:
An exception occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
An error occurred while setting a column value.
Schema: ResultArchive - MySQL.
Statement: Tests.
Column: StartTime.
One or more errors occurred during processing of command.
Source: TSDBLog
ERROR CODE:
-2147217900
User-defined error code.
LOCATION:
Step 'Log Results to Database' of sequence 'Log To Database' in 'Database.seq'
All the security settings, passwords and permissions etc in MySQL have been disabled to simplify things until it works. The username 'root' with no password gives access to everything.
Any ideas on what I am doing wrong, or if it is even possible?
Is there a way of seeing what commands TS sends to MySQL to help debug the problem?
Thanks in advance for your help
Regards,
Olly