Solved

Using DSN to access SQLBase "kills" the mouse

Posted on 1997-12-20
8
215 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 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…

803 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