Can't connect to MySql database from server using Devart
- by annelie
Hello,
I'm having trouble connecting to a MySql database from a server. I'm using Devart to connect, and I'm not sure if I need to do something more than to simply reference the dlls. When I started working on this project it was referencing the CoreLabs dlls, which if I've understood is the previous name for Devart. That didn't work, so I downloaded the new Devart dlls instead.
It works on my local machine, but when uploading to the server it crashes. I made a tiny console app to test the connection, and it fails when initialising, before I've even assigned a host etc.
Do I need to do anything more than just upload my .exe file to the server?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Devart.Data;
using Devart.Data.MySql;
namespace TestDatabaseConnection
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("about to connect");
ConnectToDatabase();
Console.ReadLine();
}
public static void ConnectToDatabase()
{
MySqlConnection connection = new MySqlConnection();
}
}
}
UPDATE: I can't see what the error is, I had a try catch around MySqlConnection connection = new MySqlConnection(); but no exception is thrown, it just crashes.
Thanks,
Annelie