July 16, 200817 yr Newbies This is my first project that involves connecting to FileMaker 9 from C# via ODBC (where everything is taking place at my single computer (XP)). I have managed to open a connection to my data file, called Ecost.fp7, when FM is running and the file is open, using the line, OdbcConnection conn = new OdbcConnection(@"DSN=FM;UID=Admin,Pwd="); where the DSN FM is a User DSN set up using the ODBC Data Source Adminstrator. But I do not want to need to have FileMaker and this file open before running my C# program. After all, when a C# program opens a connection to Excel or some other databases, I do not need to open them first; instead I just run the C# program, connect, and proceed to query, etc. So my first question is: why does my connection attempt fail when the database file Ecost is closed, and how can I change the set up to allow my C# program to open the connection without FileMaker and the db Ecost being already open? I also can't figure out how to write a DSN-less connection string, which would be preferable. Thanks for any suggestions!
September 4, 200817 yr I haven't been able to do DSN-less connections either although I've been told it's possible to do. Since FMI doesn't make the ODBC drivers the question might be better asked on the DataDirect support forums. As to having the files open: I guess that's just the way ODBC is implemented in FM. You could make this easier by hosting the file on FileMaker Server Advanced and make the ODBC connection to there. HTH Wim
Create an account or sign in to comment