Jump to content
Server Maintenance This Week. ×

connect from C# when FM closed?


This topic is 5712 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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!

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

This topic is 5712 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.