Information that could be important in advance:
Access 2003 Database (*.mdb)
Table is Linked to SQL Server 2005 Database --> Table
When linked to another Access Database --> Table it works
Program which i use to update : .net 2.0 based C#
Databaselanguage: German?
OleDbConnection used:
Connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + PathToDatabase + ";" +
"Jet OLEDB:System Database=" + PathToSystemFile+ ";" +
"User ID=" + SignedUserID + ";" +
"Password=" + SignedLoginKey + ";");
Problem:
i would like to Update a String, which i successfully have parsed to a SQL-Update Statement like:
UPDATE [Artikel] SET [Artikelbeschreibung]='УБИТЬ ДРОЗДА 4 СЕРИИ' WHERE products_id=32501;
my Table [Artikel] contains a row which met the requirements (products_id=32501) when i update the string, no errors or exceptions where thrown. When I check what has arrived in the Database i only see this:
????? ?????? 4 ?????
Encoding from File is UTF8, i've already tried this but with no luck: Convert ANSI (Windows 1252) to UTF8 in C#
here the steps my program do:
1. Load a file containing the sql statement with placeholder / information in which file, which section, which key the right information will be
EXAMPLE: UPDATE [Artikel] SET [Artikelbeschreibung]='<<C:\myfile.ini::MySection::MyKey>>' WHERE products_id=32501;
2. Grab Placeholder / Information
NOW I HAVE: <<C:\myfile.ini::MySection::MyKey>>
3. Parse, open File, Search for Section, Search for Key, responding Value of Key as String
RESPONSE = УБИТЬ ДРОЗДА 4 СЕРИИ
4. Replace <<C:\myfile.ini::MySection::MyKey>> with УБИТЬ ДРОЗДА 4 СЕРИИ in Original SQL Statement
RESULT: UPDATE [Artikel] SET [Artikelbeschreibung]='УБИТЬ ДРОЗДА 4 СЕРИИ' WHERE products_id=32501;
5. Take the string with the Result, open OleDbConnection with Connection as described above and
do this:
Connection.Open();
if (Connection != null)
{
Command = null;
Command = Connection.CreateCommand();
Command.CommandText = SQL;
Command.ExecuteNonQuery();
Connection.Close();
Connection = null;
}
6. Looking into my Database there is only '????? ?????? 4 ?????' instead of 'УБИТЬ ДРОЗДА 4 СЕРИИ'
Additional Informations: This Only occurs when my Table is linked to a SQL Server, when Table is linked to another Database or is Database directly it works fine.
Maybe someone can help me with this, i dunno where the error might be.
if more information is required then please write, I'll try as soon as possible such documents via "Edit"