[unixODBC-support] Porblems configuring DSN

Martin J. Evans martin at easysoft.com
Thu Jul 15 21:28:20 BST 2004


You are attempting to create a system DSN so you need access to the system
odbc.ini. Run odbcinst -j to find out where system DSNs go (might be
/usr/local/etc/odbc.ini) and make sure the permissions on that file aalow you to
write to it.

Martin
--
Martin J. Evans
Development, Easysoft Ltd


Quoting Cristiano <cristiano at brasmap.com.br>:

> Hi,
> 
> I'm using unixODBC 2.2.3.
> 
> I'm writing an app to change some info of DSN's on both Windows and Linux.
> The following code works fine on Windows (XP and 98SE), but in Linux (gcc
> 2.95.3) it gives me the error: General installer error
> 
> I've tried to run it as root and change the odbc.ini permission, but it
> didn't work.
> 
> Does anybody can gimme a hint.
> 
> Code:
> -------------
> 	char    szError[ODBC_CONFIG_DRIVER_MAX+1];
> 	DWORD   nError;
> 
if(!SQLConfigDataSource(NULL,ODBC_CONFIG_SYS_DSN,"MySQL","DSN=VISUALIZACAO\0DESCRIPTION=somedesc\0\0"))
> {
> 		SQLInstallerError( 1, &nError, szError, ODBC_CONFIG_DRIVER_MAX, NULL );
> 		printf("%s\n",szError);
> 	}
> -------------
> 
> -- 
> #################################
> # Cristiano Costa Neves
> # AQX Instrumentação.
> # Engenharia em Aquisição de Dados
> # Site: www.aqx.com.br
> # Email: info at aqx.com.br
> # Fone: (48) 2107-2724
> # Fax: (48) 333-3745
> #################################
> 
> 
> -- 
> #################################
> # Cristiano Costa Neves
> # AQX Instrumentação.
> # Engenharia em Aquisição de Dados
> # Site: www.aqx.com.br
> # Email: info at aqx.com.br
> # Fone: (48) 2107-2724
> # Fax: (48) 333-3745
> #################################
> 
> 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mail.easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support
> 
> 
> 




More information about the unixODBC-support mailing list