?
Solved

Using DSN to access SQLBase "kills" the mouse

Posted on 1997-12-20
8
Medium Priority
?
223 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
LVL 2

Author Comment

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

Accepted Solution

by:
mrmick earned 360 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…
Suggested Courses

800 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