\'Declaración de Variables y funciones para crear el DSN Private Const ODBC_ADD_DSN = 1 \' Agrega user data source Private Const ODBC_CONFIG_DSN = 2 \' Configura o edita user data source Private Const ODBC_REMOVE_DSN = 3 \' elimina user data source Private Const ODBC_ADD_SYS_DSN = 4 \' Agrega system data source Private Const ODBC_CONFIG_SYS_DSN = 5 \' configura o edita system data source Private Const ODBC_REMOVE_SYS_DSN = 6 \' elimina system data source Private Const vbAPINull As Long = 0& \' NULL Pointer Private Declare Function SQLConfigDataSource Lib \"ODBCCP32.DLL\" _ (ByVal hwndParent As Long, ByVal fRequest As Long, _ ByVal lpszDriver As String, ByVal lpszAttributes As String) _ As Long Dim intRet As Long Dim strDriver As String Dim strAttributes As String strDriver = \"Client Access ODBC Driver (32-bit)\" strAttributes = \"SYSTEM=Tu_AS400\" & Chr$(0) strAttributes = strAttributes & \"DESCRIPTION=Desc DSN\" & Chr$(0) strAttributes = strAttributes & \"DSN=Nombre_DSN\" & Chr$(0) strAttributes = strAttributes & \"TRACEFILENAME=DirectorioParaTraceFile\" & Chr$(0) strAttributes = strAttributes & \"LANGUAGEID=ENU\" & Chr$(0) strAttributes = strAttributes & \"DBQ=tu_biblioteca\" & Chr$(0) strAttributes = strAttributes & \"UID=usuario\" & Chr$(0) strAttributes = strAttributes & \"PWD=password\" & Chr$(0) strAttributes = strAttributes & \"QAQQINILIB=\'tu_lista_de_bibliotecas\" & Chr$(0) intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD_SYS_DSN, _ strDriver, strAttributes)