Re: psqlODBC 08.00.0102 available for download
От | Dave Page |
---|---|
Тема | Re: psqlODBC 08.00.0102 available for download |
Дата | |
Msg-id | E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC973B@ratbert.vale-housing.co.uk обсуждение исходный текст |
Ответ на | psqlODBC 08.00.0102 available for download ("Dave Page" <dpage@vale-housing.co.uk>) |
Список | pgsql-odbc |
> -----Original Message----- > From: pgsql-odbc-owner@postgresql.org > [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Dave Page > Sent: 03 August 2005 08:12 > To: mcohan@adnc.net; pgsql-odbc@postgresql.org > Subject: Re: [ODBC] psqlODBC 08.00.0102 available for download > > > > > -----Original Message----- > > From: pgsql-odbc-owner@postgresql.org > > [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Max Cohan > > Sent: 02 August 2005 17:47 > > To: pgsql-odbc@postgresql.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 по дате отправления: