[unixODBC-support] Parsing string

Nick Gorham nick.gorham at easysoft.com
Mon May 31 20:52:22 BST 2010


Michel Boaventura wrote:
> Hello,
>
> I'm helping pspp development (www.gnu.org/software/pspp) and trying to 
> make it support odbc.
> I'm facing an issue that I'm wondering if there is a better way to 
> solve it.
>
> I receive from the pspp's parser a string like this: 
> "DSN=MSAccess;UID=user;PWD=password".
>
> The order here is not important. To call SQLConnect, I must split this 
> string into dsn,user and pass.
>
> I could do it using strstr(), but I'm wondering if there is function 
> similar to SQLConnect
> which receives this string and take care of it itself?
>
Hi.

SQLDriverConnect is what you are lookng for.

-- 
Nick


More information about the unixODBC-support mailing list