New topic: ODBC Issues with OpenLink and FreeTDS
<http://forums.realsoftware.com/viewtopic.php?t=46181> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message kgingeri Post subject: ODBC Issues with OpenLink and FreeTDSPosted: Sat Dec 08, 2012 8:25 pm Joined: Fri Nov 02, 2012 1:45 am Posts: 23 Location: Ontario, Canada Hi All, I cannot get a ODBC link to a MS SQL Server DSN no matter what I try. ODBC is working fine at OSX command level - isql, tsql, osql, all work. I have tried both FreeTDS (installed with Brew) and OpenLinks paid product. It is always a connection on my local network (LAN) only. With freetds, my app dumps (runs then stops out right away) at the "if connect..." line. A "try" statement won't catch any error. Debugging doesn't help either - just quits as soon as I step onto the connect statement. OpenLink got a little farther but keeps telling me the server disconnected. I uninstalled OpenLink cuz I know FreeTDS works. Any suggestions?! Code: /// Test for ODBC connection /// dim dbConnection as new ODBCDatabase dbConnection.DataSource = "TestDB" dbConnection.UserName = "sa" dbConnection.Password = "password-here" If dbConnection.Connect = True then MsgBox "Success at last!" else MsgBox "The connection failed...\n" + dbConnection.ErrorMessage end if Also tried stuff as follows.... // VPN connection may be required here! ' ' Dim db as ODBCDatabase /// ...trying as global define g_db = New ODBCDatabase ' g_db.DataSource = "Driver=/usr/local/Cellar/freetds/0.91/lib/libtdsodbc.0.so;" +_ ' "Server=192.168.1...;Database=db-name-here;UId=sa;Pwd=password-here" g_db.DataSource = "TestDB" g_db.DatabaseName = "db-name-here" g_db.UserName = "sa" g_db.Password = "password-here" g_db.Host = "192.168.1...." g_db.Timeout = 10 If g_db.Connect = True then MsgBox "Success at last!" else MsgBox "The connection failed...\n" + g_db.ErrorMessage end if I never see either MsgBox statement _________________ Karl :v) RS Web Edition, developing on OSX Deployed on Linux Top npalardy Post subject: Re: ODBC Issues with OpenLink and FreeTDSPosted: Sat Dec 08, 2012 9:28 pm Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7588 Location: Canada, Alberta, Near Red Deer Have you tried with NO data source name ? Something like dim dbConnection as new ODBCDatabase dbConnection.DataSource = "" If dbConnection.Connect = True then MsgBox "Success at last!" else MsgBox "The connection failed...\n" + dbConnection.ErrorMessage end if This _should_ prompt you to select a DSN from the configured ones _________________ My web site Great White Software RBLibrary.com REALbasic learning Top kgingeri Post subject: Re: ODBC Issues with OpenLink and FreeTDSPosted: Sat Dec 08, 2012 9:44 pm Joined: Fri Nov 02, 2012 1:45 am Posts: 23 Location: Ontario, Canada npalardy wrote:Have you tried with NO data source name ? Something like dim dbConnection as new ODBCDatabase dbConnection.DataSource = "" If dbConnection.Connect = True then MsgBox "Success at last!" else MsgBox "The connection failed...\n" + dbConnection.ErrorMessage end if This _should_ prompt you to select a DSN from the configured ones Tried just now, and same results. App just closes on the connect. I need a way to test the ODBC DSN's I have defined another way maybe? I'll have to hunt for a tool. I do use SQuirreL all the time to connect, but I think it uses FreeTDS driectly or maybe just a Java driver entirely - not sure. It's weird that OpenLink fails as well. I may have to do a reinstall or something - unless FreeTDS and OpenLink don't do well together?! I've put in over 20 hours just trying to figure this one thing out already I have an app using MySQL just fine at least. _________________ Karl :v) RS Web Edition, developing on OSX Deployed on Linux Top npalardy Post subject: Re: ODBC Issues with OpenLink and FreeTDSPosted: Sat Dec 08, 2012 9:51 pm Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7588 Location: Canada, Alberta, Near Red Deer kgingeri wrote:Tried just now, and same results. App just closes on the connect. Closes ? Or crashes ? If it's a crash there should be a crash log we can examine _________________ My web site Great White Software RBLibrary.com REALbasic learning Top kgingeri Post subject: Re: ODBC Issues with OpenLink and FreeTDSPosted: Sat Dec 08, 2012 10:06 pm Joined: Fri Nov 02, 2012 1:45 am Posts: 23 Location: Ontario, Canada npalardy wrote:kgingeri wrote:Tried just now, and same results. App just closes on the connect. Closes ? Or crashes ? If it's a crash there should be a crash log we can examine Not sure. In the browser, I just get msg that the app has been taken offline AND I can't debug past the connect line. GOOD NEWS THO... I've had success, after a complete uninstall of OpenLink and a reinstall I have my "Success at last msg"!! It's possible there was leftover stuff from a trial install I did a while back. Also on rerunning, there was an Openlink pop-up telling me I had to supply a DSN and user/password. No DSN is only supported on Windows - apparently (I'm OSX). BUT! I sure won't mind learning more about logs or how to follow up on such problems. If you have any other hints on that @npalardy (or anyone else, of course) I'd really appreciate it!? I expect it was crashing as debugging won't work? EDIT: OpenLink does have a test connection option too after re-installing. I don't recall seeing it the first time?! (I'd also love to know if it all works under freetds) _________________ Karl :v) RS Web Edition, developing on OSX Deployed on Linux Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
