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.
LVL 8
ZifNabAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
dwwangConnect With a Mentor Commented:
Glad to hear that!

Regards,
Wang
0
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
How do I define such a system-dsn?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
ZifNabAuthor Commented:
... but I made a new ODBC entry in that other user... so this shouldn't be the problem?
0
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
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
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
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
 
ZifNabAuthor Commented:
Hi dwang,

I just made a small test file (access database)

And this gives me the same problems!

Zif.
0
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
I'm working in WindowsNT 4.0 sp3
0
 
dwwangCommented:
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
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
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
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
dwwang, which BDE version are you using?
0
 
ZifNabAuthor Commented:
SOLVED! The ODBC-drivers on this computer were misteriously of another version then they should be... Updating the drivers solved the problem.
0
 
dwwangCommented:
So, seems my suggestion is correct :-)
0
 
ZifNabAuthor Commented:
yep, correct. Give it as an answer.
0
 
ZifNabAuthor Commented:
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
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
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
 
dwwangCommented:
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
 
ZifNabAuthor Commented:
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
 
dwwangCommented:
I see. :-)

Forgot to say, Merry Christmas!!

Regards,
Wang
0
 
ZifNabAuthor Commented:
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
 
dwwangCommented:
Hopefully this site is Y2K compatible :-)

Regards, Wang
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.