pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ODBC & VB5
3+ messages / 2 participants
[nested] [flat]

* ODBC & VB5
@ 1999-08-19 05:15 rjd@intekom.co.za
  0 siblings, 0 replies; 3+ messages in thread

From: rjd@intekom.co.za @ 1999-08-19 05:15 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

Hi All

I am using postdrv v06-40-0006.  I have a really strange problem 
when I access the database from Visual Basic 5.

Everything works fine, except for the following:

When I add a new record, I have to refresh the database before I 
can access any records.  Now, this on it's own would be strange 
enough, but here is the REALLY fun part : I have to refresh it using 
a different subroutine / function / etc...  As a matter of fact, the only 
thing that works every time is to create a button that refeshes the 
db and moves it to the last record, and then getting my program to 
activate the button.

If I DON'T do this I get a message saying that the current record is 
deleted.

Has anyone else encountered this?  Is there a patch / fix that I am 
unaware of?

TIA

Jason Doller



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

* RE: [INTERFACES] ODBC & VB5
@ 1999-08-19 07:23 Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Dave Page @ 1999-08-19 07:23 UTC (permalink / raw)
  To: pgsql-interfaces



> -----Original Message-----
> From: rjd@intekom.co.za [mailto:rjd@intekom.co.za]
> Sent: 19 August 1999 05:16
> To: pgsql-interfaces@hub.org
> Subject: [INTERFACES] ODBC & VB5
> 
[...]

> If I DON'T do this I get a message saying that the current record is 
> deleted.

Good old M$ bugs^W features!. I'm guessing you are using DAO(?). If so, try
using ADO instead if you can - I've found that it solves this problem and
generally seems to do a better job of talking to PostgreSQL when you need to
update recordsets.

BTW what's this 'Check out "PostgreSQL Wearables" @ http://www.pgsql.com';
that seems to be appearing on the bottom of the last 5 or 6 messages on the
list - I'm not sure I want that added to my sig.

Regards,

Dave.

--
Dave Page, Network & Systems Manager, The Vale Housing Association Ltd.
dpage@vale-housing.co.uk
http://www.vale-housing.co.uk (Work)
http://www.pgadmin.freeserve.co.uk/ (Home of pgAdmin)
Beer can be a permanent solution - but only if you have enough of it!  



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

* RE: [INTERFACES] ODBC & VB5
@ 1999-08-25 07:47 Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Dave Page @ 1999-08-25 07:47 UTC (permalink / raw)
  To: pgsql-interfaces



> -----Original Message-----
> From: Stephen Martin Trans-Euro I.T Ltd
> [mailto:stephen@sealteam.demon.co.uk]
> Sent: 23 August 1999 21:06
> To: Dave Page
> Subject: Re: [INTERFACES] ODBC & VB5
> 
> 
> Hello,
> 
> I am experimenting with the code that you have sent,
> I am discovering some interesting things :)
> The first is that some of the databound controls seem to
> want to utilise a protocol called OLE DB,
> and whilst there appears to be an OLE DB provider for ODBC
> my Visual Basic setup complains that it is not a viable provider ..
> so no luck there...   back to using code and forms of my own
> design:)

You should still be able to use these controls. You need to create a
recordset as outlined in my sample code. You then need an MS data control on
your form (this may be hidden). Add a line to your code that reads something
like:

Set Data1.Recordset = RS

This will make the data control's recordset the one you just created. You
should now be able to bind grids, text boxes combos etc. to the data contrl.

> With regard to your example code when I run it (changing the DSN info
> to a DSN of my creation) the code stops at the line
> 
> Set RS = DB.OpenRecordset("SELECT * FROM pg_class;", dbOpenSnapshot)
> 
> with a type mismatch error (13)
> 
> interestingly enough if I change RS to type variant all seems ok?
> RS is correctly declared as type recordset in the preamble code.

Urgggh. Do you have any references to ADO in your project? It may be that
you need to define RS as a DAO.Recordset in case a reference to ADO is
taking preference over the reference to the DAO library.
 
On something of a shameless plug, I'm going to try to release my custom data
control today. It's in a beta form but is far more friendly than the MS
controls. It can talk to PostgreSQL without any supporting code :-)

I'll post here when I manage to release it...


Regards,

Dave.

--
Dave Page, Network & Systems Manager, The Vale Housing Association Ltd.
http://www.vale-housing.co.uk (Work)
http://www.pgadmin.freeserve.co.uk/ (Home of pgAdmin)
Beer can be a permanent solution - but only if you have enough of it!   



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


end of thread, other threads:[~1999-08-25 07:47 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-08-19 05:15 ODBC & VB5 rjd@intekom.co.za
1999-08-19 07:23 RE: [INTERFACES] ODBC & VB5 Dave Page <dpage@vale-housing.co.uk>
1999-08-25 07:47 RE: [INTERFACES] ODBC & VB5 Dave Page <dpage@vale-housing.co.uk>

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