Solved

Connect to a GUPTA database with VB 4 PRO

Posted on 1997-03-27
1
236 Views
Last Modified: 2008-02-26
How can i open a database with extension *.dbs (i think it is a "GUPTA" database, it is used by Artemis Project View) with Visual Basic 4.0 Professional.
Do i need any particular driver for connection ?
I need to do this on a PC in wich another application exist written in Visual Basic (i think 3.0 version) of wich however i don't have the sources, therefore the eventual drivers should already be there.
0
Comment
Question by:bizio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
robp032697 earned 100 total points
ID: 1424772
DBS isn't a directly supported database type in DAO. But you probably already knew that. What you want to do is make an ODBC connection to the database. This is pretty easy and has the advantage that every database software company and their mothers makes ODBC drivers to connect to their database app.

First, make sure you have the proper drivers installed for ODBC on your system. If you're trying to access the database via 16 bit VB, you need to check the ODBC Administrator in the control panel. If you're doing it 32 bit, you need to look at 32-bit ODBC Administrator in the control panel.

Open the appropriate ODBC Admin and look at the Data Source Names. Got one that looks correct? Go on. If not, try the other admin app. You are limited to accessing the database by whatever db drivers have been installed, so in all likelihood, you will need to make your program be the same "bitness" as the original program that was accessing the database.

If there is no appropriate DSN in either administrator, you could try adding one to point to your database. The catch is that you need to have the correct drivers installed. Click on the Drivers button in each ODBC Admin to see if ione is listed that might work. If so, go ahead and add an ODBC entry for your database. Each driver asks for different info, but it ususally includes: a Data Source Name, the pathname of the database file, a default login, and a default password.

Now, in VB, for a quick & dirty connection drop a data control on your form, and set the connect string to:
ODBC;DSN=TEST;
Where TEST is the data source name you saw in the ODBC administrator.
Assuming you have a username/password to the database, you should now be able to access it. You can do a similar thing with DAO by using the same connect string when you create a Database object.

If you don't have the ODBC drivers for the database in question on your system, you might need to install whatever appropriate database software (Gupta or otherwise) onto your system from the original disks. I don't know about Artemis Project View, but a call to their tech support should give you at least the brand of database they use for their system.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question