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 EBF5AD715F for ; Thu, 1 Sep 2005 15:07:06 -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 82419-05 for ; Thu, 1 Sep 2005 18:07:02 +0000 (GMT) Received: from gk-us1.us.michelin.com (gk-us1.michelin.com [156.65.14.18]) by svr1.postgresql.org (Postfix) with ESMTP id 9A7B5D6FA7 for ; Thu, 1 Sep 2005 15:06:58 -0300 (ADT) Received: from ONCMH1.onc.michelin.com (unverified [156.65.124.40]) by gk-us1.us.michelin.com (Clearswift SMTPRS 5.1.4) with ESMTP id for ; Thu, 1 Sep 2005 14:06:21 -0400 Received: from oncmtap1.onc.michelin.com by oncmh1.onc.michelin.com with ESMTP for pgsql-odbc@postgresql.org; Thu, 1 Sep 2005 14:06:42 -0400 Received: from oncems01.onc.michelin.com ([156.65.125.150]) by oncmtap1.onc.michelin.com (Netscape Messaging Server 4.15) with ESMTP id IM5GZ500.66I for ; Thu, 1 Sep 2005 14:06:41 -0400 Received: from [10.43.12.183] (unverified) by oncems01.onc.michelin.com (Content Technologies SMTPRS 4.2.5) with ESMTP id ; Thu, 1 Sep 2005 14:06:41 -0400 Message-Id: <4317432F.3060702@us.michelin.com> Date: Thu, 01 Sep 2005 14:06:39 -0400 From: "Greg Campbell" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Page Cc: Joel Fradkin , pgsql-odbc@postgresql.org Subject: Re: figuring out why I am having this issue References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------000903080904070105040902" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 required=5 tests=[AWL=0.010] X-Spam-Level: X-Archive-Number: 200509/19 X-Sequence-Number: 5917 This is a multi-part message in MIME format. --------------000903080904070105040902 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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: > > > >>-----Original Message----- >>From: Joel Fradkin [mailto:jfradkin@wazagua.com] >>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 >>If con.Errors.Count >= 1 Then >> set Error = con.Errors.Item(0) >> 'take the error code from SQL Server >> ErrCode = Error.NativeError >> response.Write(cstr(Error.Description)) >> Response.End >>End If >> >>Could be there is better method, but this what I have been using. > > > Dunno if there's a better method - I would be inclined to loop round > con.Errors.Count though - maybe something like: > > For X = 1 To con.Errors.Count > set Error = con.Errors.Item(X - 1) > 'take the error code from SQL Server > ErrCode = Error.NativeError > response.Write(cstr(Error.Description)) > End If > Response.End > > > > >>I have tested putting a 300 meg text field in the data base >>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). > > > Yeah, I can't see anything obviously wrong in it. A few things to > consider though: > > - ASP seems to be retrieving data as SQL_C_CHAR, which means it's > getting raw data, not UCS2 converted from UTF8. > > - ASP is retrieving data in 32KB chunks, so it would probably be worth > making sure max_long_varchar is at least that. > > - Some data (quotes and such) doesn't look so good. Could it have been > pasted from MS Word or similar? > > - 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: > > connecting to the server socket... > connection to the server socket succeeded. > sizeof startup packet = 292 > sent the authentication block. > sent the authentication block successfully. > gonna do authentication > read 15, global_socket_buffersize=8192 > auth got 'R' > areq = 0 > auth got 'K' > auth got 'Z' > > All this is now encapsulated in libpq, which doesn't log what it's > doing. > > To fix this, compile on the command line: > > nmake /f win32.mak > > This should ensure you get the default libpq build. If you're doing this > in an IDE, make sure USE_LIBPQ is defined! > > Regards, Dave. > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster --------------000903080904070105040902 Content-Type: text/x-vcard; charset=utf-8; name="greg.campbell.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="greg.campbell.vcf" begin:vcard fn:Greg Campbell n:Campbell;Greg org:Michelin North America - US5 Lexington;ENG-ASE email;internet:greg.campbell@us.michelin.com title:ASE Systems Engineer tel;work:803-951-5561/x75561 x-mozilla-html:FALSE version:2.1 end:vcard --------------000903080904070105040902--