Link to home
Start Free TrialLog in
Avatar of ZifNab
ZifNab

asked on

ODBC Acces-driver problems

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.
Avatar of dwwang
dwwang

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
Avatar of ZifNab

ASKER

How do I define such a system-dsn?
Avatar of ZifNab

ASKER

... but I made a new ODBC entry in that other user... so this shouldn't be the problem?
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
Avatar of ZifNab

ASKER

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.
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
Avatar of ZifNab

ASKER

Ok, just deleted the system entries.

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

But the problem still persists....

Snif.
Avatar of ZifNab

ASKER

Hi dwang,

I just made a small test file (access database)

And this gives me the same problems!

Zif.
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.
Avatar of ZifNab

ASKER

I'm working in WindowsNT 4.0 sp3
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 :-)
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
Avatar of ZifNab

ASKER

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.
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.
Avatar of ZifNab

ASKER

dwwang, which BDE version are you using?
Avatar of ZifNab

ASKER

SOLVED! The ODBC-drivers on this computer were misteriously of another version then they should be... Updating the drivers solved the problem.
So, seems my suggestion is correct :-)
Avatar of ZifNab

ASKER

yep, correct. Give it as an answer.
ASKER CERTIFIED SOLUTION
Avatar of dwwang
dwwang

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ZifNab

ASKER

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

Avatar of ZifNab

ASKER

How do I use SQL-link?

So I've three different links? ODBC, Native Access driver and SQL... And which one is the fastest?
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.

Avatar of ZifNab

ASKER

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.
I see. :-)

Forgot to say, Merry Christmas!!

Regards,
Wang
Avatar of ZifNab

ASKER

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.
Hopefully this site is Y2K compatible :-)

Regards, Wang