Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB5 OLE DB IBProvider to interbase pointers needed

Status
Not open for further replies.

abraxas

Programmer
Jan 15, 2001
75
AU
Hi,
I've been appointed instant expert and am required to write a VB app to taketh from Interbase and giveth to MsSQL. While the mssql part is understandable the vb/interbase bit is very vague. I have searched the web for 3 days and sifted much info and finally selected upon an OLE DB sub tool, called IBProviderfree (available from Borland), of IBProvider.

The _ibproviderfree.dll installed nicely and was registered successfully. I trawled through the numerous VB examples the majority of which have as connection setup something like

Dim cn As New ADODB.Connection

cn.Provider = "LCPI.IBProvider"
cn.Open "data source=localhost:c:\database\employee.gdb;
ctype=win1251", , "SYSDBA", "masterkey"

cn.close

But on execution the result is "invalid outside procedure" with LCPI.IBProvider hilighted.

Has anyone had any experience with VB and interbase/IbProvider? What kind of references do I need to install in VB?

The documentation I've found on the web is great once you get the thing started (I suppose) but it doesn't spell out how to associate the two. A lot of the doco was the same doco bundled with IBProvider.

As a related question, where does .Provider actually look for LCPI.IBProvider?

Please let me know if you need more information as I am a little green in this area.

Many thanks
Anthony Lawrence




 
From what I see, you've declared the connection object (cn) but not instantiated it ...

Code:
set cn = new ADODB.Connection

The rest of the code works fine for me.

Hope this helps, Patrick
 
Thanks anyway but still the same message "invalid outside procedure". This time "set" is the culprit. I think what maybe a problem is that I've changed computers/os (win98 to win2000 adv server) and installed a fresh vb5. I downloaded service packs and some related controls (eg msadodc.ocx ADO Data Control 6.0 (OLEDB) ) which brought the components up to speed but still no fun.
Anthony
 
Is the code you're showing actually in a procedure? or is it just in the Declarations section?

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Sorry for the delay I had to do some OLE in my mother's garden.

Yes, a major problem occured where I had the code placed (in declarations), thank you. I haven't played with VB for a while. There was also major dilemmas with having had previously loaded Firebird. It puts its version of gdb32.dll in system32. When Interbase install comes along it and says " Oh, you've already installed it, I won't bother" Needless to say, nothing works (admin tools) when Firebird's .dll is installed.

Thank you both for your help, I now have Employees.gdb lurking in my forms. Now on to the real work.
Anthony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top