RE: [INTERFACES] ODBC & VB5
От | Dave Page |
---|---|
Тема | RE: [INTERFACES] ODBC & VB5 |
Дата | |
Msg-id | 8568FC767B4AD311AC33006097BCD3D60141AF@woody.vale-housing.co.uk обсуждение исходный текст |
Список | 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!
В списке pgsql-interfaces по дате отправления: