From: Jonathan M. <io...@ac...> - 2004-11-13 00:33:26
|
On Nov 12, 2004, at 5:58 PM, Theodore H.Smith wrote: > Will iODBC ever auto-scan a particular folder for libraries? > > To me, that seems the most sensible thing to do. That way, we wouldn't > even need the iODBC admin folder. Many other MacOS technologies work > this way, just by putting a file in a certain folder it is used by the > system. Its a much nicer way. iODBC on Mac Classic works that way. For some reason that functionality was dropped for the port to Mac OS X. > Also, I'm a bit new to this data source name thing, I don't quite get > it yet. Must I register every database with a DSN in the admin? > > Can ODCB just use the regular access name? That would be much easier. > EG something like this: > > DataBaseConnection = SomeODBCConnectFunction( "127.0.0.1 username > password databasename" ); > > That way, I wouldn't need to set up any DSN in the iODCB admin. Its certainly possible to create DSN-less connections. Using C and our driver for open source databases to connect to PostgreSQL, it would look something like this: char finalDSN[512]; int dsnLen; char dsn[] = "Driver= /Library/ODBC/atopnsrc.bundle/Contents/MacOS/atopnsrc;" "Database=my_database;" "Server=localhost;" "Type=PostgreSQL;" "UID=my_user_id;PWD=my_password"; retcode = SQLDriverConnect(con, NULL, dsn, SQL_NTS, finalDSN, dsnLen, SQL_DRIVER_NOPROMPT); The same thing can be done in REALbasic by setting the DataSource property of the ODBCDatabase class to the above string. > I'm just thinking of the end-user. They'd like everything to be as > simple as possible, so it is preferable to avoid asking the end-user > to fiddle around with the iODCB admin. With DSN-less connections, end users don't have to worry about the Administrator at all. Best regards, Jonathan Monroe Actual Technologies - ODBC for OS X http://www.actualtechnologies.com mo...@ac... |