Thread: Select * causes a crash, or How I learned to Hate VB
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
> -----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.
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
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/