00001 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases 00002 * Copyright (C) 1998-1999 Brian Bruns 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Library General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public 00015 * License along with this library; if not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 * Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef CONNECTPARAMS_H 00021 #define CONNECTPARAMS_H 00022 00023 #ifdef UNIXODBC 00024 #ifndef HAVEODBCINST 00025 #define HAVEODBCINST 00026 #endif 00027 #endif 00028 00029 static char rcsid_connectparams_h[] = "$Id: connectparams.h,v 1.8 2003/04/03 20:17:01 freddy77 Exp $"; 00030 static void *no_unused_connectparams_h_warn[] = { rcsid_connectparams_h, no_unused_connectparams_h_warn }; 00031 00032 /***************************** 00033 * tdoParseConnectString 00034 * 00035 * PURPOSE 00036 * 00037 * Parses a connection string for SQLDriverConnect(). 00038 * 00039 * ARGS 00040 * 00041 * see ODBC documentation 00042 * 00043 * RETURNS 00044 * 00045 * see ODBC documentation 00046 * 00047 * NOTE 00048 * 00049 * - I doubt pszDataSourceName is useful here? 00050 * 00051 *****************************/ 00052 int tdoParseConnectString(const char *pszConnectString, TDSCONNECTINFO * connect_info); 00053 00054 int odbc_get_dsn_info(const char *DSN, TDSCONNECTINFO * connect_info); 00055 00056 #ifndef HAVEODBCINST 00057 /***************************** 00058 * SQLGetPrivateProfileString 00059 * 00060 * PURPOSE 00061 * 00062 * This is an implementation of a common MS API call. This implementation 00063 * should only be used if the ODBC sub-system/SDK does not have it. 00064 * For example; unixODBC has its own so those using unixODBC should NOT be 00065 * using this implementation because unixODBC; 00066 * - provides caching of ODBC config data 00067 * - provides consistent interpretation of ODBC config data (i.e, location) 00068 * 00069 * ARGS 00070 * 00071 * see ODBC documentation 00072 * 00073 * RETURNS 00074 * 00075 * see ODBC documentation 00076 * 00077 * NOTES: 00078 * 00079 * - the spec is not entirely implemented... consider this a lite version 00080 * - rules for determining the location of ODBC config may be different then what you 00081 * expect see tdoGetIniFileName(). 00082 * 00083 *****************************/ 00084 int SQLGetPrivateProfileString(LPCSTR pszSection, LPCSTR pszEntry, LPCSTR pszDefault, LPSTR pRetBuffer, int nRetBuffer, 00085 LPCSTR pszFileName); 00086 #endif 00087 00088 #endif