Solved

Using DSN to access SQLBase "kills" the mouse

Posted on 1997-12-20
8
218 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String manipulation in Visual Basic 7 73
MS Acccess - Update Field in Table when report is printed 6 47
Excel - Save a copy of work book 13 89
Advice in Xamarin 21 97
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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 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…

828 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