MySQL and C# - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

MySQL and C#

vunalvunal Posts: 8Member
hi i store pictures into MySQL database and i use ""***MySQLDriverCS***""
during typecasting dataset field to byte array i have problem as

*****An unhandled exception of type 'System.InvalidCastException' occurred in******

here is my code

////////////////////////////////////////////////////////
MySQLConnection connection_goster = new MySQLConnection(new MySQLConnectionString("localhost","album","root","asd").AsString);
connection_goster.Open();

MySQLDataAdapter adapter_goster = new MySQLDataAdapter("select * from resim",connection_goster);

DataSet dataset_goster = new DataSet();

adapter_goster.Fill(dataset_goster,"resim");

buffer_goster = (byte[])dataset_goster.Tables["resim"].Rows[0][1];

Comments

  • vunalvunal Posts: 8Member
    Is there anybody who used C# and MySQL???
  • weiccoweicco Posts: 950Member
    : Is there anybody who used C# and MySQL???
    :

    Who in the world would be so twisted in mind that uses C# and My... Mqq... I can't even spell it! :)

    SQL Server Express is out there you know.
  • vunalvunal Posts: 8Member
    : : Is there anybody who used C# and MySQL???
    : :
    :
    : Who in the world would be so twisted in mind that uses C# and My... Mqq... I can't even spell it! :)
    :
    : SQL Server Express is out there you know.
    :

    i am a student and i am studying for my thesis, this thesis will be used in a firm and they cannot pay too much money for SQL Server Express, if you don't know how to use SHUT UP!!!
  • weiccoweicco Posts: 950Member
    : firm and they cannot pay too much money for SQL Server Express

    SQL Express is free you know, you cannot pay money for it even if you wanted to.
  • vunalvunal Posts: 8Member
    : SQL Express is free you know, you cannot pay money for it even if you wanted to.
    :

    thanks...
Sign In or Register to comment.