pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Campbell <greg.campbell@us.michelin.com>
To: Dave Page <dpage@vale-housing.co.uk>
Cc: Joel Fradkin <jfradkin@wazagua.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: figuring out why I am having this issue
Date: Thu, 01 Sep 2005 14:06:39 -0400
Message-ID: <4317432F.3060702@us.michelin.com> (raw)
In-Reply-To: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9E08@ratbert.vale-housing.co.uk>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9E08@ratbert.vale-housing.co.uk>

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................." & <br> & vbCrLf
		Response.Write "Number: " & CStr(dberr.Number) & <br> & vbCrLf
		Response.Write "Source: " & dberr.Source & <br> & vbCrLf
		Response.Write "NativeError: " & CStr(dberr.NativeError) & <br> & vbCrLf
		Response.Write "Description: " & dberr.Description  & <br>
	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

Attachments:

greg.campbell.vcf (text/x-vcard, 239B) download 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

view thread (21+ messages)  latest in thread

Message-ID: <4317432F.3060702@us.michelin.com>
Permalink:  ../4317432F.3060702@us.michelin.com/
Also on:    postgresql.org/message-id/4317432F.3060702@us.michelin.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: greg.campbell@us.michelin.com, dpage@vale-housing.co.uk, jfradkin@wazagua.com
  Subject: Re: figuring out why I am having this issue
  In-Reply-To: <4317432F.3060702@us.michelin.com>
  References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9E08@ratbert.vale-housing.co.uk> <4317432F.3060702@us.michelin.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox