[unixODBC-dev] SQLConfigDataSource failing with sapdb driver

Igor Korot ikorot at earthlink.net
Fri Aug 4 09:08:25 BST 2006


Hi, Ajit,
You are absolutely correct. It does not provide this method.
Since his is a OpenSource software, you can re-use the function source code.
I had he same problem some time ago...

Thank you.

-----Original Message-----
>From: Ajit <ajit at onmobile.com>
>Sent: Aug 3, 2006 11:49 PM
>To: unixodbc-dev at easysoft.com
>Subject: [unixODBC-dev] SQLConfigDataSource failing with sapdb driver
>
>Hi,
> I am running 2.2.11 and am having a problem with SQLConfigDataSource
>failing.
>
>	SQLHENV   henv ;
>	SQLCHAR     SqlState[6],  Msg[SQL_MAX_MESSAGE_LENGTH];
>	SQLINTEGER    NativeError;
>	SQLSMALLINT   MsgLen;
>	SQLRETURN     rc2;
>
>	SQLAllocHandle (SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);
>	SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0);
>	BOOL x = SQLConfigDataSource(0,ODBC_ADD_SYS_DSN,"SAP DB", AttributeString);
>	if (x !=TRUE)
>	{
>            DWORD temp;
>            WORD temp2;
>            rc2 =
>SQLInstallerError(1,&temp,(char*)Msg,SQL_MAX_MESSAGE_LENGTH,&temp2);
>		printf("Failed to create  System DSN %s",(char *) Msg);
>		SQLFreeHandle (SQL_HANDLE_ENV,  henv);
>		return -1;
>	}
>
>SQLinstallerError return the following
>Failed to create  System DSN General installer error
>
>The attribute string is as follows:
>DSN=testdsn
>Description=used by xxxxx
>IsolationLevel=Committed
>Driver=SAPDB
>LongVarTrunc=SQL_NO_TOTAL
>ServerDB=mmp
>ServerNode=172.16.xx.xx
>Sqlmode=Oracle
>
>Can anyone spot the problem here??
>I think the sapdb setup .so does not export a ConfigDSN method??
>Any workarounds??
>Regards,
>Ajit
>
>_______________________________________________
>unixODBC-dev mailing list
>unixODBC-dev at easysoft.com
>http://mail.easysoft.com/mailman/listinfo/unixodbc-dev




More information about the unixODBC-dev mailing list