Solved

ODBC Acces-driver problems

Posted on 1998-12-17
27
325 Views
Last Modified: 2010-04-04
Hi,

Ok, I've the following problem. On a certain account I create an ODBC driver - alias. My program uses this alias and everything works ok. Even BDE Administrator gives no proiblems.

BUT, if I log on into another account and create the same ODBC driver-alias (by the way program and database are stored on the same pc, I log on this pc with different accounts) my program gives errors! Even in the BDE administrator if I want to open the database through this ODBC-alias the BDE HANGS!!!!!!!

Using the Native Access driver I have no problems!

Please, help!

Regards, Zif.
0
Comment
Question by:ZifNab
  • 14
  • 13
27 Comments
 
LVL 4

Expert Comment

by:dwwang
ID: 1351479
That's mainly because the ODBC USER-DSNs is stored in the HK_CURRENT_USER branch of registry, so when you logon as another user, some of the information are lost.

To solve the problem, define SYSTEM-DSN rather than USER-DSN in the ODBC administrator. (the former is stored in HK_LOCAL_MACHINE)

Regards,
Wang
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351480
How do I define such a system-dsn?
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351481
... but I made a new ODBC entry in that other user... so this shouldn't be the problem?
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351482
You mean a new ODBC entry in the BDE Admin or ODBC Admin?

To add a system-dsn, you just open the ODBC administrator in control-panel (usually called "32bit ODBC"),  then under the Data source list box, there is a button named "System DSN...", click it and then add a new datasource as usually do. This datasource can be shared by all users, and hence should solve the problem.

Regards,
Wang
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351483
Hi Wang,

I just made a ODBC system entry in one account.
I opened the other account but there I couldn't find this system entry. So, I made the same system entry as in the other account.

Trying to open this in the BDE administrator gave me the same problem as before...

Regards, Zif.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351484
Opps...

So I suppose that you are using different user configuration for each user, right? That is, every user has his/her own profile in Windows. This may make more differences between each user, then could cause the problem.

Except that, I can't imagine any possibilities, since I did the same thing in my machine and every things works well -- I define a System-DSN as one user and then when I login as another user, I can still see the DSN in ODBC Admin as well as in BDE Admin, also I can open it with no problem. Nevertheless, if I create a user-DSN as one user, and login as another, I'll suffer the same problem as you have right now.

Regards, Wang
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351485
Ok, just deleted the system entries.

Set it again and this time they appeared correctly in all users.

But the problem still persists....

Snif.
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351486
Hi dwang,

I just made a small test file (access database)

And this gives me the same problems!

Zif.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351487
Currently no more ideas, because I don't like to suggest you to modify Win95 system settings.
Maybe some test in my office tomorrow.

However, you haven't tell me yet, are you running your Win95 in the mode that every user has his own profile? This setting can be viewed in Cotrol-Panel's "password" applet, in the last tabsheet.
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351488
I'm working in WindowsNT 4.0 sp3
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351489
Oh, I see. So every user has his own profiles.

However, I still don't understand why such kind of problem exists, since system-dsn is just for the purpose of sharing by different users.

I will have a try tomorrow, hopefully I won't make our machine work improper :-)
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351490
Hi, I have tried and still found no problem.

The situation is that I have SQL-Server installed on my machine(NT4+SP3), and it will automatically create a system-DSN. For this DSN, every user of the NT can access with no problem(in Delphi3's BDE Administrator).

I currently have no Access drivers installed on my machine, so that only reason I can imagine is becase of Ms-Access driver's setup configuration.

Regards,
Wang
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351491
Hi dwwang, thanks for the work you've put in. I must say that if I now set up a system-DSN, every user can see it... only problem is that if I open it on other users: with BDE Admin, BDE Admin hangs (looks like if it stays in a loop, because the PC keeps running on it's HD..). Same if I try to open it with my program.

I'm going to try some other stuff.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 4

Expert Comment

by:dwwang
ID: 1351492
Yes, I know your problem, as I said in above comment, I can use BDE ADMIN to access the ODBC-DSN using other user's accounts.

So what I suggested to you is: the problem should be because of MS-Access driver's setup.
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351493
dwwang, which BDE version are you using?
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351494
SOLVED! The ODBC-drivers on this computer were misteriously of another version then they should be... Updating the drivers solved the problem.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351495
So, seems my suggestion is correct :-)
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351496
yep, correct. Give it as an answer.
0
 
LVL 4

Accepted Solution

by:
dwwang earned 70 total points
ID: 1351497
Glad to hear that!

Regards,
Wang
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351498
Still, one q'n.... why doesn't a prior version allow this?????
How does it fail to open an odbc-driver? Nothing is changed in the registery, I only copied some dll's...
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351499
I'm not sure aoubt Access drivers, maybe older versions of Access ODBC driver has different way relating to registry.
As I mentioned before, the ODBC driver come with SQL-Server 6.5 does not cause the error.

By the way, why not use SQL-Link(MSACCESS) instead of ODBC?

0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351500
How do I use SQL-link?

So I've three different links? ODBC, Native Access driver and SQL... And which one is the fastest?
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351501
Oh, SQL-Linkis just native Access-Driver of BDE, Inprise always call it SQL-Link. I think native drivers is much faster and better that ODBC, and even with more functionalities.

0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351502
Ok, then I can explain. Native driver for Access came along in a newer version of BDE. At that moment we were already using the ODBC-driver.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351503
I see. :-)

Forgot to say, Merry Christmas!!

Regards,
Wang
0
 
LVL 8

Author Comment

by:ZifNab
ID: 1351504
Merry Christmas and a happy New Year for you too.

Hope to see you also at E-E in 1999. mmmmm...thinking of it... Is E-E 2000 compatible? :-))

Regards, Zif.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351505
Hopefully this site is Y2K compatible :-)

Regards, Wang
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

19 Experts available now in Live!

Get 1:1 Help Now