Solved

Connect to a GUPTA database with VB 4 PRO

Posted on 1997-03-27
1
215 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now