Subject Invalid Token when trying to insert XML into a BLOB
Author dasdiohsauiguihsfda
Hello to everyone,

First off:
1. Used Firebird Version & Model:
Firebird-2.5.1 - Embedded (x86)

2. Operating System
Windows 7 Enterprise x64
Windows 7 Professional x64
Windows 7 Enterprise x86
Windows 7 Professional x86

3. Language
C# + .NET-Provider FirebirdSql.Data.FirebirdClient (Version 2.6.0, I couldn't get 2.6.5 to work)

My Problem:
I am building a database which heavily relies on XML-Data. The problem is that I cannot get any XML-Data into the database, the db refuses to accept the data and always throws "Token Unknown in line 3 Column 122 s" - which is strange, because even if I actually change the statement for insertion or do an update on the xml-field, I always get "line 3 Column 122 s", it refuses to accept the XML as a value. When I use any other string (for example "TESTTESTTESTTESTTEST") it works however.

Here is my insert statement:
FbCommand DBCommand = new FbCommand("INSERT INTO games (name_of_game, info_xml) VALUES ('" + GameToInsert.Name + "', '" + XMLString + "')", DBConnector, DBTransaction);
DBCommand.ExecuteNonQuery();
DBTransaction.Commit();

Now - if I do an insert on the "name_of_product"-field, it works fine. The info_xml however refuses everything. The field is a "BLOB SUB_TYPE TEXT"-type field. I cannot seem to get a grasp why this happens - can someone help me out here? How do I insert the XML into the db?


Thanks in advance for your replies,
Thomas Bueter


P.S.:
An example for the full insert statement (I also tried with removing the ", no luck either):
INSERT INTO games (name_of_game, info_xml) VALUES ('Rage', '<Game><gamesdbid>895</gamesdbid><GameTitle>Rage</GameTitle><Platform>PC</Platform><ReleaseDate>10/07/2011</ReleaseDate><Overview>Rage is a groundbreaking first-person shooter set in the not-too-distant future after an asterogamesdbid impacts Earth, leaving a ravaged world behind. You emerge into this vast wasteland to discover humanity working to rebuild itself against such forces as ragamesdbider gangs, mutants, and the Authority -- an oppressive government regime that has a special interest in you in particular.

Featuring intense first-person action, vehicle combat, an expansive world and jaw-dropping graphics powered by gamesdbid's revolutionary gamesdbidTech 5 technology, Rage continues the legacy of design studio Id Software in delivering an experience like no other.</Overview><ESRB>M - Mature</ESRB><Genres><genre>Shooter</genre></Genres><Players>1</Players><Co-op>No</Co-op><Youtube>http://www.youtube.com/watch?v=OVX9V_Uf30Q?hd=1</Youtube><Publisher>Bethesda Softworks</Publisher><Developer>ID Software</Developer><Rating>10</Rating><Images><fanart><original wgamesdbidth="1920" height="1080">http://thegamesdb.net/banners/fanart/original/895-1.jpg</original><vignette wgamesdbidth="1920" height="1080">fanart/vignette/895-1.jpg</vignette><thumb>http://thegamesdb.net/banners/fanart/thumb/895-1.jpg</thumb></fanart><fanart><original wgamesdbidth="1920" height="1080">http://thegamesdb.net/banners/fanart/original/895-2.jpg</original><vignette wgamesdbidth="1920" height="1080">fanart/vignette/895-2.jpg</vignette><thumb>http://thegamesdb.net/banners/fanart/thumb/895-2.jpg</thumb></fanart><fanart><original wgamesdbidth="1920" height="1080">http://thegamesdb.net/banners/fanart/original/895-3.jpg</original><vignette wgamesdbidth="1920" height="1080">fanart/vignette/895-3.jpg</vignette><thumb>http://thegamesdb.net/banners/fanart/thumb/895-3.jpg</thumb></fanart><fanart><original wgamesdbidth="1920" height="1080">http://thegamesdb.net/banners/fanart/original/895-4.jpg</original><vignette wgamesdbidth="1920" height="1080">fanart/vignette/895-4.jpg</vignette><thumb>http://thegamesdb.net/banners/fanart/thumb/895-4.jpg</thumb></fanart><boxart sgamesdbide="front" wgamesdbidth="1280" height="1803">http://thegamesdb.net/banners/boxart/original/front/895-1.jpg</boxart></Images></Game>')