Solved

Using DSN to access SQLBase "kills" the mouse

Posted on 1997-12-20
8
213 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Controlling which port to download from 4 71
VB error "Type mismatch" 2 50
Sending a email via excel using vba 6 72
How to measure sizes and angles in scanned images ? 3 54
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…
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…
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…
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…

895 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