pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Select * causes a crash, or How I learned to Hate VB
4+ messages / 3 participants
[nested] [flat]

* Select * causes a crash, or How I learned to Hate VB
@ 2002-08-08 15:35 Corey Gibbs <cgibbs@westmarkproducts.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Corey Gibbs @ 2002-08-08 15:35 UTC (permalink / raw)
  To: pgsql-odbc

Good Morning Everyone,

This problem with VB crashing isn't going away.  I know it's not a PG or an 
ODBC problem, but i was wondering if anyone else has experenced this 
behavor before in their vb-program development.

Here's what happens.  I've got the following table:

CREATE TABLE "snapshot" (
  "list_name" varchar(25),
  "phase" varchar(2),
  "cabinet_count" float4,
  "pstatus" varchar(1),
  "level" varchar(1),
  "job_number" varchar(6),
  "ship_date" varchar(6)
) WITH OIDS;


Now, in my program, when i do an
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection

cn.Open 
"Driver={PostgreSQL};Server=server4;Port=5432;Database=wpi_accrual;Uid=p  
ostgres;"
rs.Open "select job_number,phase,pstatus,level,cabinet_count,ship_date from 
snapshot WHERE list_name='" & List5.Text & "'", cn, adOpenKeyset, 
adLockOptimistic

or when i
cn.Open 
"Driver={PostgreSQL};Server=server4;Port=5432;Database=wpi_accrual;Uid=p  
ostgres;"
rs.Open "select * from snapshot WHERE list_name='" & List5.Text & "'", cn, 
adOpenKeyset, adLockOptimistic

VB pukes with an application error.  I know the query executes on the 
server, i've watched the logs, and my odbc driver log says "experts agree, 
everything is just fine".  but VB chokes.

I've solved it by making two record sets like this:
rs.Open "select job_number,phase,pstatus,level,cabinet_count,ship_date from 
snapshot WHERE list_name='" & List5.Text & "'", cn, adOpenKeyset, 
adLockOptimistic
rs2.Open "select list_name from snapshot WHERE list_name='" & List5.Text & 
"'", cn, adOpenKeyset, adLockOptimistic

<whine>now i've got two record sets to track</whine>

what is weird is, i've got other select *'s on much larger tables with no 
problems within the same program.

Anyone have any idea what's going on?  Or, if "that's the way it is" that's 
cool too :).

thanks in advance
corey




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Select * causes a crash, or How I learned to Hate VB
@ 2002-08-08 15:36 Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Page @ 2002-08-08 15:36 UTC (permalink / raw)
  To: cgibbs@westmarkproducts.com; pgsql-odbc



> -----Original Message-----
> From: Corey Gibbs [mailto:cgibbs@westmarkproducts.com] 
> Sent: 08 August 2002 16:36
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Select * causes a crash, or How I learned to Hate VB
> 
> 
> Good Morning Everyone,

Afternoon,

> Anyone have any idea what's going on?  Or, if "that's the way 
> it is" that's 
> cool too :).

Certainly sounds odd, and it definately shouldn't be the way it is. If
you pg_dump your database, are there any odd characters in there?

Regards, Dave.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Select * causes a crash, or How I learned to Hate VB
@ 2002-08-08 15:56 Corey Gibbs <cgibbs@westmarkproducts.com>
  2002-08-09 00:19 ` Re: Select * causes a crash, or How I learned to Hate VB Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 1 reply; 4+ messages in thread

From: Corey Gibbs @ 2002-08-08 15:56 UTC (permalink / raw)
  To: 'Dave Page' <dpage@vale-housing.co.uk>; pgsql-odbc

Hello Dave,

I did a pg_dump, and didn't see any odd characters :(.  It's just weird, 
probobly isolated to me :).  Oh well, i'll chalk it up to experence and 
file it away, this problem's already sucked up 8 hours of my time, i think 
i'll move on.  Thank you for your replies.

ttfn
corey


On Thursday, August 08, 2002 8:36 AM, Dave Page 
[SMTP:dpage@vale-housing.co.uk] wrote:
>
>
> > -----Original Message-----
> > From: Corey Gibbs [mailto:cgibbs@westmarkproducts.com]
> > Sent: 08 August 2002 16:36
> > To: pgsql-odbc@postgresql.org
> > Subject: [ODBC] Select * causes a crash, or How I learned to Hate VB
> >
> >
> > Good Morning Everyone,
>
> Afternoon,
>
> > Anyone have any idea what's going on?  Or, if "that's the way
> > it is" that's
> > cool too :).
>
> Certainly sounds odd, and it definately shouldn't be the way it is. If
> you pg_dump your database, are there any odd characters in there?
>
> Regards, Dave.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Select * causes a crash, or How I learned to Hate VB
  2002-08-08 15:56 Re: Select * causes a crash, or How I learned to Hate VB Corey Gibbs <cgibbs@westmarkproducts.com>
@ 2002-08-09 00:19 ` Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 0 replies; 4+ messages in thread

From: Hiroshi Inoue @ 2002-08-09 00:19 UTC (permalink / raw)
  To: cgibbs@westmarkproducts.com <cgibbs@westmarkproducts.com>; +Cc: 'Dave Page' <dpage@vale-housing.co.uk>; pgsql-odbc

Corey Gibbs wrote:
> 
> Hello Dave,
> 
> I did a pg_dump, and didn't see any odd characters :(.  It's just weird,
> probobly isolated to me :).  Oh well, i'll chalk it up to experence and
> file it away, this problem's already sucked up 8 hours of my time, i think
> i'll move on.  Thank you for your replies.

Please try the latest snapshot at http://w2422.nsk.ne.jp/~inoue/.

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-08-09 00:19 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08 15:35 Select * causes a crash, or How I learned to Hate VB Corey Gibbs <cgibbs@westmarkproducts.com>
2002-08-08 15:36 Re: Select * causes a crash, or How I learned to Hate VB Dave Page <dpage@vale-housing.co.uk>
2002-08-08 15:56 Re: Select * causes a crash, or How I learned to Hate VB Corey Gibbs <cgibbs@westmarkproducts.com>
2002-08-09 00:19 ` Hiroshi Inoue <Inoue@tpf.co.jp>

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