Package: libmysql5.0-cil
Version: 5.2.1+dfsg-1
Severity: grave
Justification: renders package unusable
I got a strange error when i connect to mysql-server by mono(C#),
little information can be got on google, and no one answers me on the
mono mail lists:
Here is the code, it compiles successfully
using System;
using System.IO;
using System.Xml;
using System.Data;
using MySql.Data.MySqlClient;
namespace StarConsole
{
class MainClass
{
public static void Main(string[] args)
{
string connectionString ="Server=localhost;Database=Star;User
ID=root;Password=password;Pooling=false";
IDbConnection dbcon = new MySqlConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
string sql ="insert into Departments(deptno,deptname)
values('0004','caohejin');";
dbcmd.CommandText = sql;
dbcmd.ExecuteNonQuery();
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}
}
}
here is the debug information output by monodevelop when i run it:
Unhandled Exception: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. --->
System.ArgumentException: Stream is not a valid .resources file,
magic=0x6d783f3c
at System.Resources.ResourceReader.ReadHeaders () [0x00000]
at System.Resources.ResourceReader..ctor (System.IO.Stream stream) [0x00000]
at System.Resources.ResourceSet..ctor (System.IO.Stream stream) [0x00000]
at (wrapper managed-to-native)
System.Reflection.MonoCMethod:InternalInvoke (object,object[])
at System.Reflection.MonoCMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x00000] --- End of inner exception stack trace ---
at System.Reflection.MonoCMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x00000]
at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
at System.Activator.CreateInstance (System.Type type, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes) [0x00000]
at System.Activator.CreateInstance (System.Type type,
System.Object[] args, System.Object[] activationAttributes) [0x00000]
at System.Activator.CreateInstance (System.Type type,
System.Object[] args) [0x00000]
at System.Resources.ResourceManager.InternalGetResourceSet
(System.Globalization.CultureInfo culture, Boolean Createifnotexists,
Boolean tryParents) [0x00000]
at System.Resources.ResourceManager.GetString (System.String name,
System.Globalization.CultureInfo culture) [0x00000]
at MySql.Data.MySqlClient.Resources.get_PerfMonCategoryName () [0x00000]
at MySql.Data.MySqlClient.PerformanceMonitor..ctor
(MySql.Data.MySqlClient.MySqlConnection connection) [0x00000]
at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000]
at StarConsole.MainClass.Main (System.String[] args) [0x0000d] in
/root/Life/Mono/StarConsole/Main.cs:31
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_HK.UTF-8, LC_CTYPE=en_HK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libmysql5.0-cil depends on:
ii cli-common 0.5.7 common files between all CLI packa
ii libmono-corlib1.0-cil 1.9.1+dfsg-2 Mono core library (1.0)
ii libmono-corlib2.0-cil 1.9.1+dfsg-2 Mono core library (2.0)
ii libmono-system-data2.0-cil 1.9.1+dfsg-2 Mono System.Data Library
ii libmono-system2.0-cil 1.9.1+dfsg-2 Mono System libraries (2.0)
libmysql5.0-cil recommends no packages.
libmysql5.0-cil suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]