X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CDBFCD86F9 for ; Thu, 1 Sep 2005 15:15:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83448-05 for ; Thu, 1 Sep 2005 18:15:33 +0000 (GMT) Received: from svctag-ckgvz71.mailserver.wazagua.com (unknown [209.34.245.244]) by svr1.postgresql.org (Postfix) with ESMTP id 3A9C0D83AD for ; Thu, 1 Sep 2005 15:15:32 -0300 (ADT) Received: from jfradkin ([66.15.127.235]) by svctag-ckgvz71.mailserver.wazagua.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 1 Sep 2005 14:15:39 -0400 From: "Joel Fradkin" To: "'Greg Campbell'" , "'Dave Page'" Cc: Subject: Re: figuring out why I am having this issue Date: Thu, 1 Sep 2005 14:18:01 -0400 Message-ID: <003501c5af21$7d81d750$797ba8c0@jfradkin> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable In-Reply-To: <4317432F.3060702@us.michelin.com> X-OriginalArrivalTime: 01 Sep 2005 18:15:39.0906 (UTC) FILETIME=[288D5620:01C5AF21] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.907 required=5 tests=[AWL=-0.169, MSGID_DOLLARS=3.076] X-Spam-Level: ** X-Archive-Number: 200509/16 X-Sequence-Number: 5914 Thanks Greg. I inherited this app and doing a one stop shop for db would be an = excellent idea, there is stuff everywhere (no error handling until I got on board, = but I have just been sticking it where the db action is. Unfortunately I am making no progress. I tried the snapshot using the connection DRIVER=3D{PostgreSQL-libpq} so I am more confident at least I = am testing the correct driver version. It is cutting my text fields off at 254 chars. I tried making MaxVarcharSize=3D32768;MaxLongVarcharSize=3D32768; Thinking it might be ignoring the TextAsLongVarchar=3D1;=20 But still was cutting the text off. So basically I can not use the libpq driver at the moment, will have to figure out why its cutting off the text. Joel Fradkin =20 Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel. 941-753-7111 ext 305 =20 jfradkin@wazagua.com www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tools. C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc This email message is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized = review, use, disclosure or distribution is prohibited. If you are not the = intended recipient, please contact the sender by reply email and delete and = destroy all copies of the original message, including attachments. =20 =20 -----Original Message----- From: Greg Campbell [mailto:greg.campbell@us.michelin.com]=20 Sent: Thursday, September 01, 2005 2:07 PM To: Dave Page Cc: Joel Fradkin; pgsql-odbc@postgresql.org Subject: Re: [ODBC] figuring out why I am having this issue I like the collection construct (for each) If (error.Number <> 0) Then 'and this for-next loop is usually in a handle_db_errors routine instead of typing/pasting it all over my code 'plus it become a one-stop change where I can log the error to = a db or file or event_log. For Each dberr in con.Errors Response.Write "An Error occurred................." &
& vbCrLf Response.Write "Number: " & CStr(dberr.Number) &
& vbCrLf Response.Write "Source: " & dberr.Source &
& vbCrLf Response.Write "NativeError: " & CStr(dberr.NativeError) &
& vbCrLf Response.Write "Description: " & dberr.Description &
Next Response.End End If It's all the same. Dave Page wrote: > =20 >=20 >=20 >>-----Original Message----- >>From: Joel Fradkin [mailto:jfradkin@wazagua.com]=20 >>Sent: 01 September 2005 16:16 >>To: Dave Page >>Cc: pgsql-odbc@postgresql.org >>Subject: RE: [ODBC] figuring out why I am having this issue >> >>That is the error description=20 >>If con.Errors.Count >=3D 1 Then >> set Error =3D con.Errors.Item(0) >> 'take the error code from SQL Server=20 >> ErrCode =3D Error.NativeError >> response.Write(cstr(Error.Description)) >> Response.End >>End If >> >>Could be there is better method, but this what I have been using. >=20 >=20 > Dunno if there's a better method - I would be inclined to loop round > con.Errors.Count though - maybe something like: >=20 > For X =3D 1 To con.Errors.Count > set Error =3D con.Errors.Item(X - 1) > 'take the error code from SQL Server=20 > ErrCode =3D Error.NativeError > response.Write(cstr(Error.Description)) > End If > Response.End >=20 >=20 >=20 >=20 >>I have tested putting a 300 meg text field in the data base=20 >>nad it worked so >>not clear why it works on most data and this one does not. >>I did email you the log file (not sure it is any help). >=20 >=20 > Yeah, I can't see anything obviously wrong in it. A few things to > consider though: >=20 > - ASP seems to be retrieving data as SQL_C_CHAR, which means it's > getting raw data, not UCS2 converted from UTF8. >=20 > - ASP is retrieving data in 32KB chunks, so it would probably be worth > making sure max_long_varchar is at least that. >=20 > - Some data (quotes and such) doesn't look so good. Could it have been > pasted from MS Word or similar? >=20 > - Are you compiling the driver yourself? If so how? It seems to be = using > the old comms layer, not libpq (which I'm no longer working on). The > giveaway is lines like the following which are for debugging the = network > protocol: >=20 > connecting to the server socket... > connection to the server socket succeeded. > sizeof startup packet =3D 292 > sent the authentication block. > sent the authentication block successfully. > gonna do authentication > read 15, global_socket_buffersize=3D8192 > auth got 'R' > areq =3D 0 > auth got 'K' > auth got 'Z' >=20 > All this is now encapsulated in libpq, which doesn't log what it's > doing. >=20 > To fix this, compile on the command line: >=20 > nmake /f win32.mak >=20 > This should ensure you get the default libpq build. If you're doing = this > in an IDE, make sure USE_LIBPQ is defined! >=20 > Regards, Dave. >=20 > ---------------------------(end of = broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster