Follow up to This I have also read up on some other questions but am not understanding what would cause this to happen. Permissions? How to apply a work around? Whats LAME?
I was directed to THIS tutorial and have worked it into a C# program to execute on Button Clicks.
However I get a error on this line
[DllImport("ODBCCP32.dll")]
stating
The type or namespace name "DllImport" could not be found (are you missing a using directory or an assembly reference?)
I have tried inporting that file as a reference but am then hit with this error
"Please make sure file is accessile, and that it is a valid assembly or COM component"
Am I missing something that I need imported? Here is a section of my code.
using System;
using System.Runtime.InteropServices;
namespace DsnUtil{
public partial class Form1 : Form{
[DllImport("ODBCCP32.dll")]
private static extern bool SQLConfigDataSource(//etc etc)
public Form1(){
button1_Click();
}
private void button1_Click(object sender, EventArgs e){
//DoesWork
}
}