Skip site navigation (1) Skip section navigation (2)

Re: psqlODBC 08.00.0102 available for download

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <mcohan(at)adnc(dot)net>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: psqlODBC 08.00.0102 available for download
Date: 2005-08-03 09:02:39
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC973B@ratbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-odbc
 

> -----Original Message-----
> From: pgsql-odbc-owner(at)postgresql(dot)org 
> [mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Dave Page
> Sent: 03 August 2005 08:12
> To: mcohan(at)adnc(dot)net; pgsql-odbc(at)postgresql(dot)org
> Subject: Re: [ODBC] psqlODBC 08.00.0102 available for download
> 
> 
> 
> > -----Original Message-----
> > From: pgsql-odbc-owner(at)postgresql(dot)org 
> > [mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Max Cohan
> > Sent: 02 August 2005 17:47
> > To: pgsql-odbc(at)postgresql(dot)org
> > Subject: Re: [ODBC] psqlODBC 08.00.0102 available for download
> > 
> > 
> > I'm using ODBC via VB.NET (1.1)...
> > When I switch to this version I get the following error:
> > ODBC ERROR: [01004] The buffer was too small for the ConnStrOut.
> > 
> 
> Hi Max,
> 
> Yeah, I've noticed that error in recent testing. I hope to resolve it
> for the next snapshot  in the next day or so.

OK, I've looked at this, and from what I can tell, the driver is doing
exactly what it should. The error message is raised when the buffer
passed to SQLDriverConnect (SQLBrowseConnect) is too small to hold the
connection string. According to the docs:

OutConnectionString
    [Output]
Pointer to a buffer for the completed connection string. Upon successful
connection to the target data source, this buffer contains the completed
connection string. Applications should allocate at least 1,024 bytes for
this buffer.

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/ht
m/odbcsqldriverconnect.asp for more info.

In my tests, I'm seeing connection strings that are significantly
shorter than 1024 bytes. The occurances of the error I was seeing were
caused by Microsoft's ODBC test program which used a zero byte
buffer(!). If you want to check this in your case, switch on the mylog,
then check the line in the log that looks like:

[2528]szConnStrOut = '' len=138,0

The first number is the size of the connstring, the second is the size
of the output buffer (0 in my case, hence the empty szConnStrOut).

Anyhoo, the good news is that even if you can't modify your code, this
is actually only a warning - the function just returns
SQL_SUCCESS_WITH_INFO instead of SQL_SUCCESS. The connection is still
perfectly usable.

Regards, Dave.

pgsql-odbc by date

Next:From: Dave PageDate: 2005-08-03 09:22:01
Subject: Re: Usind database with encoding UNICODE and vovel
Previous:From: Josef SpringerDate: 2005-08-03 08:49:49
Subject: Re: Usind database with encoding UNICODE and vovel

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group