Solved

Using DSN to access SQLBase "kills" the mouse

Posted on 1997-12-20
8
210 Views
Last Modified: 2012-06-27
Environment:    VB 4.0 (16-bit), MS-Access 2.0,
                SQLBase 6.x
                ODBC GPGUP06, Intersolv 2.00.0000)

Problem:  

I have to combine some information stored in an SQLBase-
Database with some Access 2.0 Data.              

My attempt to link to the SQLBase table in VB:

        Set tdef = CreateTableDef("AnyTable"....)
        tdef.Attributes = db_AttachODBC
        tdef.SourceTabelName = "SQLBaseTable"
        tdef.Connect = "ODBC;DSN=MyDSN......"
        MyDB.tabledef.Append tdef
                        ......
        MYDB.tabledefs.delete "Anytable"                

Now, this works properly in Access Basic.
When I use the same code in VB 4.0 the following
happens:

Appending the SQLBase-table opens the "LOGON TO SQLBASE" modal dialog.
From now on, the mouse is "out of order".
It seems, as if there is an unvisible modal dialog.
A click anywhere on the screen results in
a beep. However, the keyboard is stil working.
The programm is stil running. MS-Query works well
with the GUPTA SQLBase Driver.

The problem doesn't appear in VB 3.0!!

Is this a VB bug?? Is it a GUPTA bug??
Or what am I doing wrong?????

Really in need of help
0
Comment
Question by:richtsteig
  • 4
  • 3
8 Comments
 
LVL 8

Expert Comment

by:mrmick
ID: 1446221
This behavior sounds like a bug to me.  You might try and avoid the dialog altogether like this...

tdef.Connect = "ODBC;UID=MyID;PWD=MyPass;DSN=MyDSN...."

0
 
LVL 2

Author Comment

by:richtsteig
ID: 1446222
Sorry, completing the connect string doesnt work.

UID and password are added to the modal dialogs
text boxes. Nevertheless the dialog opens and
remains opened and cannot be closed by clicking
the OK button cause the mouse click is not accepted.
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 1446223
It's not the best for performance, but you can soetimes get more reliable function by linking the tables via an access database, where the DSN that is used is the source for Access to perform the linkage (attached tables), then processing your VB prgram against the access .mdb that has the links to your SQL database.

I'm not sure what ODBC Driver manager you have installed, but on the later versions of the driver manager, there was/is a tab where you could set up a trace of all ODBC connection traffic.  If you can do this, then you can trace both the Access app traffic and your VB app traffic and try to find the differences for a potential problem source.

Also, you need to be aware of your user rights on your SQL database as well.  You may not have all the permissions you need on the SQLBase to do what you want.
0
 
LVL 2

Author Comment

by:richtsteig
ID: 1446224
Cymbolic, I AM processing my VB application against the access.mdb. All I want to do, is to attach the SQLBase table at runtime (and detach it afterwards). The LOGON dialog to SQLBase is neccesary.

Nevertheless, the effect remains the same when I try to open the SQLBase-database itself.
After dbEngine.workspaces(0).opendatabase("",,"ODBC;")
the "SELECT DATA SOURCE" modal dialog opens (mouse is alive).
After selecting the data source the "LOGON TO SQL BASE" dialog opens, mouse is "dead".

The sql.log seems to normal (thank you for your hint).

Some new information concerning my problem:
Using the Alt-F4 you can exit my VB application, you can exit all other opened applications, but terminating Windows itself results in a system hangup (the torture never stops).
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Author Comment

by:richtsteig
ID: 1446225
Adjusted points to 120
0
 
LVL 8

Accepted Solution

by:
mrmick earned 120 total points
ID: 1446226
I think I have found what you're looking for...

Check Microsoft Knowledge Base Article ID: Q171859
Title: "Mouse Disappears or Machine Hangs When Connecting to ODBC"
At:
http://premium.microsoft.com/support/kb/articles/q171/8/59.asp

0
 
LVL 2

Author Comment

by:richtsteig
ID: 1446227
mrmick, obviously you were right.

Unfortunately my problem is not solved using the
2.10.2401 driver manager. But your answer was good.
So I'll have to try my luck elsewhere and grade your
answer. If you here anything new concerning the GUPTA driver
please send an email to

richtsteig@vdivde-it.de
0
 
LVL 8

Expert Comment

by:mrmick
ID: 1446228
If I see anything that I think may apply - I will.  Thanks.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

762 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

23 Experts available now in Live!

Get 1:1 Help Now