New topic: ODBC Database Connection
<http://forums.realsoftware.com/viewtopic.php?t=46922> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message Zudo Post subject: ODBC Database ConnectionPosted: Tue Feb 12, 2013 10:42 am Joined: Wed Aug 15, 2012 1:49 am Posts: 1 Hi, I am new to Real Studio and hope someone can help me. I want my application to check whether the database server connection is available before I start any other processing. The database I am connecting to is on an Informix IDS 11.5 server and I'm using the Informix ODBC driver on windows. oDB = New ODBCDatabase oDB.DataSource = rs.IdxField(3).value oDB.UserName = rs.IdxField(5).value oDB.Password = rs.IdxField(6).value oDB.Timeout = 3 if oDB.Connect = False then MsgBox "Failed to connect to " + rs.IdxField(1).value + EndOfLine + oDB.ErrorMessage CurrentOpenConnection = 0 oDB = nil return false end if The above code only shows the msgbox about the failure after I have pressed cancel on an ODBC settings window. Does anyone know if it is possible to stop the ODBC settings window coming up if a connection can not be made by the connect command? _________________ Regards Andy Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- 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]
