Re: ODBC
- Posted by Matthew Lewis <MatthewL at KAPCOUSA.COM> Jan 18, 2001
- 520 views
> From: Ray Smith > This is great!!! Thanks! > I downloaded it and connected to an ACU Cobol ODBC driver > sitting on a SCO > Unix box. > I can't say I wanted to do it in Euphoria ... but it does show the > flexibility ODBC has. > > What is the correct way of closing an ODBC connection? You should use the function SQLDisconnect: SQLDisconnect Conformance Version Introduced: ODBC 1.0 Standards Compliance: ISO 92 Summary SQLDisconnect closes the connection associated with a specific connection handle. Syntax SQLRETURN SQLDisconnect( SQLHDBC ConnectionHandle); Arguments ConnectionHandle [Input] Connection handle. Returns SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE. This is one of the things that's defined in the file, but it isn't wrapped at all--and that you should really use if you're writing an ODBC app. I'd recommend writing a disconnect procedure that closes the connection and then frees the connection handle. This is a good example of the rest of the work that needs to be done before someone incorporates it into a serious project. You can check out MSDN for the full API docs (that's what I've been using): If you want to connect with a connect string, take a look at SQLDriverConnect > Note: I think you had a little type error in your readme file when you > wrote .... ODBC was "online" database connectivity. err....yeah.....<blushes> Matt Lewis