Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I have setup an ODBC entry for SQL 11 Anywhere, I select integrated log in as I dont want users knowing what the password is. I try run my app which first connects to DB to process...connect failed. Go back into ODBC setting, it has entered in the default dba, sql username and pwd and although I have changed, saved, rebooted, deleted added again ...NADA. I tried editing in registry ...and it still changes the settings in Windows 7....this is SO annoying. Short from changing my application to connect without using a DSN...can anyone tell me if I am doing something wrong. I have registered the dbodbc11.dll already with regsvr32.exe. Any ideas?

asked 03 Jun '11, 05:11

Lisava's gravatar image

Lisava
16224
accept rate: 0%

I am using Windows 7 64 bit without the described behavior (32 and 64bit ODBC)

(03 Jun '11, 05:16) Martin

Are you sure, that your Win 7 is 32 bit: your observation 2. is usually a hint, that under win 7 64 Bit you are using the wrong odbccad tool to view the odbc settings.

(06 Jun '11, 07:01) Martin

It's definitely 32 bit.

(06 Jun '11, 08:02) Lisava

"Integrated Login" means that you're trying to use the Windows user login information to log in to the database. The database must be explicitly set up to use this information (by setting the appropriate database options) - are you really trying to do this? Or is your database really set up to use the 'Standard' log in feature?


(06 Jun '11, 13:14) Jeff Albion

It worked fine on Win XP...it's JUST windows 7 that doesn't work..

(10 Jun '11, 06:15) Lisava
Replies hidden

As you say you can connect via DBISQL - do the database engine and the client/DBISQL run on the same Win7 box?

And what does the following query return?

select * from sysoption where "option" = 'login_mode';

As DBISQL works, does dbisqlc work with this DSN, too?

(Note: FAIK, DBISQL uses JDBC and dbisqlc uses ESQL, so both do not really use ODBC but can use the ODBC DSN to build a connection string - so their successful connection is not a full hint. Nevertheless, they should treat a DSN just as your app should do.)

(10 Jun '11, 06:35) Volker Barth

Ran it now...shows 3 columns

1st - user_id = 2 2nd - option = login_mode 3rd - setting = standard

Yes they run on the same Win 7 machine

(10 Jun '11, 06:40) Lisava

Well, then obviously you do not have integrated logins enabled, as that should contain 'Integrated' in the setting column. So, how do you connect via DBISQL?

See Jeff's comment above how to enable integrated logins.

BTW: To respond to a comment (instead to the whole question/answer), you can use the "Reply" button right below each comment. That makes it easier to follow nested discussions...

(10 Jun '11, 07:27) Volker Barth

to get into DBISQLC, I type in the UN and PWD, then choose the DSN name from the drop down list. The App however doesnt require a UN and PWD.

(13 Jun '11, 03:21) Lisava

So obviously you use a standard login (with UID and PWD) to connect from dbisqlc.

I still suspect that the database is not configured to allow integrated logins. Have you tried to follow Jeff's suggestion?

(13 Jun '11, 07:59) Volker Barth
More comments hidden
showing 5 of 10 show all flat view

Just a few hints:

  1. What error (SQLCODE) is returned by the application that fails to connect?
  2. If you check the DSN in the registry, can you assure that there's the "Integrated=YES" setting?
  3. And do you use an user or a system DSN?
  4. Or is there a SQLCONNECT environment variable set (check with SET in a cmd shell) that might add a default UID and PWD?
permanent link

answered 03 Jun '11, 05:43

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

  1. Failed to connect to database
  2. Yes Registry is right, but in Windows it's wrong.
  3. System DSN
  4. Checked and no, no variable SQLCONNECT even listed.
(06 Jun '11, 02:41) Lisava
Replies hidden

What happens when you use DBISQL with the same DSN to connect?

(06 Jun '11, 09:13) Volker Barth

Connects fine

(10 Jun '11, 06:15) Lisava
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×145

question asked: 03 Jun '11, 05:11

question was seen: 5,076 times

last updated: 13 Jun '11, 08:00