Good Morning Everyone,
I'm working on "Spiffy VB App that uses Postgres as it's backend number
three" and I am encountering a weird problem.
PG Driver is version 7.02.00.01 and MDAC is version 2.7 . Should I use
MDAC2.5?
When I execute the line below, everything is just fine:
rs.Open "SELECT * FROM itemlist WHERE jobno='" & lst_job_numbers & "' and
room = '" & lst_rooms & "'", cn, adOpenKeyset, adLockOptimistic
But, I only need eight columns returned, so I try this:
rs.Open "SELECT jobno,itemno,room,model,w,h,d,qty FROM itemlist WHERE
jobno='" & lst_job_numbers & "' and room = '" & lst_rooms & "'", cn,
adOpenKeyset, adLockOptimistic
and the proverbial "all hell" breaks loose.
I get the following error message:
VB6.exe Application Error
The instruction at "0x0523abb5" referenced memory at "0xbfffffffc". The
memory could not be "written".
So i click Cancel to go into the MS Visual C++ debugger and i get this
message box:
Unhandled exception in VB6.EXE (PSQLODBC.DLL):0xC0000005: Access Violation
Once in the debugger, i see much stuff that i sort of recognize, but it's
been years since i've written in assembly language :)
here's the line it's pointing to:
0523ABB0 push 52577D0h
is the line it's complaining about=> 0523ABB5 mov byte ptr
[edi+esi],0
here's the table definition from PGAdmin-II (nice job on that software btw)
(i didn't set this up, it's been imported from an access datafile that i
didn't set up either :( )
-- Table: itemlist
CREATE TABLE "itemlist" (
"uniqueid" int4 DEFAULT nextval('Itemlist_UniqueID_key'::text) NOT NULL,
"jobno" varchar(50),
"fulldwgpath" varchar(150),
"area" varchar(50),
"floor" varchar(50),
"building" varchar(50),
"room" varchar(150),
"elevation" varchar(50),
"phase" varchar(50),
"cycle" varchar(50),
"model" varchar(150),
"w" varchar(150),
"h" varchar(50),
"d" varchar(50),
"itemno" varchar(50),
"notes" text,
"finish" varchar(150),
"mtostatus" varchar(50) DEFAULT 'No',
"qty" int4 DEFAULT 1,
"color" varchar(50),
"handle" varchar(50),
"locks" varchar(50),
"lockgroup" varchar(50),
"data1" varchar(50),
"data2" varchar(50),
"data3" varchar(50),
CONSTRAINT "ItemList_UniqueID_idx" UNIQUE ("uniqueid"),
CONSTRAINT "ItemList_pkey" PRIMARY KEY ("uniqueid")
) WITH OIDS;
I know i need to work on the table definition, but I'm not the creator of
the application that made this table.
Any help would be greatly appreciated. I am able to reproduce the problem,
so if anyone needs any further information, let me know.
thanks in advance
Corey Gibbs