Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trusted Connection with MSSQL driver

173 views
Skip to first unread message

Marina Davydova

unread,
Mar 8, 2005, 5:48:06 PM3/8/05
to

I am trying to set-up trusted (Windows) connection thru BDE alias to MS SQL 2000 using Delphi 5.
Currently we have 'normal' mechanism to connect to database. I create BDE connection on fly and supply the following parameters:

procedure TFrmMain.dbNewMWLogin(Database: TDatabase;
LoginParams: TStrings);
begin
LoginParams.Values['USER NAME']:=gvLogin_User;
LoginParams.Values['PASSWORD']:= 'abc123';
end;

However, we have to get rid of hardcoded password, since it's the firm policy. I can connect thru ISQL using my Windows account. Could someone help and let me know how I can do it by BDE. To replace BDE is NOT an option, since the application works fine and have about 3,000 database objects tied with BDE connection.

I already did:

1 - set-up Named Piped as 1st protocol in SQL Clieny Utility
2 - Delete user name from BDE - Configuration - Drivers- MSSQL
3 - Replace psw and user name with spaces
procedure TFrmMain.dbNewMWLogin(Database: TDatabase;
LoginParams: TStrings);
begin
LoginParams.Values['USER NAME']:='';
LoginParams.Values['PASSWORD']:= '';
end;


It's still does not work. Please help, I have to finish it in 2 weeks.

Bertil Isberg

unread,
Mar 9, 2005, 3:31:49 PM3/9/05
to
Marina

Create an ODBC DSN specifying Windows Authentication in the ODBC setup. Then
you can skip the username and password.

--
Bertil Isberg - CTECH
Paradox buglist:
online: http://web.comhem.se/~u82608896/
FAQ newsgroup: corel.paradox-FAQ


Marina Davydova

unread,
Mar 9, 2005, 6:52:23 PM3/9/05
to

Thank you, Bertil fo your advise.
However, ODBS is not the best choice for many reasons. Do you know if it's possible to stay with BDE MSSQL native driver?
Regards, Marina

Tomislav Kardaš

unread,
Mar 10, 2005, 12:52:13 AM3/10/05
to
Hi Marina!

It works for me so it must also work for you:

1. In the BDE Administrator, Configuration/Drivers/Native/MSSQL field
USER_NAME must be left empty.

2. If you use an BDE Alias or just the TDatabase component to connect
the server also there this parameter must be empty.

3. In Client Network Utility from Microsoft SQL Server program group
Named Pipes have to be first Enabled Protocol in the list. It wouldn't
work with TCP/IP and this would be the default protocol.

4. Pay attention to Alias tab sheet in this Client Network Utility if
you server is maybe listed there with some other protocol than Named
Pipes. Click Edit button to see what protocol is behind the alias.

5. In SQL Server, you have to add new login for every domain user who
would be connecting over Windows Authentication. You there select
Domain and after it click the '...' button behind the name field and
select user. For that user enable databases to be used. Logins that
you have created for SQL Server Authentication can not be used and
will not be used by Windows Authentication even if it matches your
windows user name.

TK.

marina davydova

unread,
Mar 10, 2005, 1:52:44 AM3/10/05
to

Tomislav,
I did all items below which you recommended and it still does not work. However, it's fine if I connect to SQL 6.5.
Could you specify which SQL, BDE and Delphi versions are you using. In my case it's MS SQL 2000, Delphi 5 and BDE 5.01.
I suspect that the problem related with MS SQL version, since BDE was not intended to work with SQL2000. Hope I am wrong and just miss something.
Thank you very much in advance for all your help
Marina

Bertil Isberg

unread,
Mar 10, 2005, 11:49:12 AM3/10/05
to
Marina

<<
Do you know if it's possible to stay with BDE MSSQL native driver?
>>

I never got it to work with the native driver.

marina davydova

unread,
Mar 10, 2005, 10:02:17 AM3/10/05
to

Thank you, Tomi.
Looks like my problem related with the fact that I used BDE with SLQ 6.5 previosly on the same PC and even now I have 2 virsions installed on my PC: SQL 6.5 and 2000.
When I go to BDE Admin,Databases and do right click on my database and select dbVer, it shows library from MSSQL 6.5, not from SQL 2000. What is it on your PC?

Thank you, Marina

nomail@sorry (Tomislav Kardaš) wrote:
>Hi!
>
>On 9 Mar 2005 22:52:44 -0800, "marina davydova"


><marina....@chase.com> wrote:
>
>>Tomislav,
>>I did all items below which you recommended and it still does not work. However, it's fine if I connect to SQL 6.5.
>>Could you specify which SQL, BDE and Delphi versions are you using. In my case it's MS SQL 2000, Delphi 5 and BDE 5.01.
>>I suspect that the problem related with MS SQL version, since BDE was not intended to work with SQL2000. Hope I am wrong and just miss something.
>>Thank you very much in advance for all your help
>

>I am still bound to Delphi 4, BDE 5.01, and the database is MS SQL
>2000. I haven't used Windows Authentication while working with MS SQL
>6.5.
>
>Besides the 5 key points I already sent I have no further ideas what
>could be wrong in your situation. I can only assure you that this is
>not a wrong idea to have this working no matter how eager others are
>to convince you that you should use ADO.
>
>tomi.

Tomislav Kardaš

unread,
Mar 10, 2005, 8:22:17 AM3/10/05
to
Hi!

On 9 Mar 2005 22:52:44 -0800, "marina davydova"
<marina....@chase.com> wrote:

>Tomislav,
>I did all items below which you recommended and it still does not work. However, it's fine if I connect to SQL 6.5.
>Could you specify which SQL, BDE and Delphi versions are you using. In my case it's MS SQL 2000, Delphi 5 and BDE 5.01.
>I suspect that the problem related with MS SQL version, since BDE was not intended to work with SQL2000. Hope I am wrong and just miss something.
>Thank you very much in advance for all your help

I am still bound to Delphi 4, BDE 5.01, and the database is MS SQL

Tomislav Kardaš

unread,
Mar 11, 2005, 3:38:04 AM3/11/05
to
Hi!

On 10 Mar 2005 07:02:17 -0800, "marina davydova"
<marina....@chase.com> wrote:

>Looks like my problem related with the fact that I used BDE with SLQ 6.5 previosly on the same PC and even now I have 2 virsions installed on my PC: SQL 6.5 and 2000.
>When I go to BDE Admin,Databases and do right click on my database and select dbVer, it shows library from MSSQL 6.5, not from SQL 2000. What is it on your PC?

That could be a source of problem. Be sure that you use dbnetlib.dll,
dbnmpntw.dll & ntwdblib.dll from mssql 2000 client utilities.

You can place those three dll files in the directory of your exe and
check if it works then.

tomi.

Marina Davydova

unread,
Mar 11, 2005, 11:58:38 AM3/11/05
to

Tomy, thank you very much! Will try it next week as soon as I come back to work.
Would like to tell you one more time that I really appreciate your help, time and desire to share your knowledge with other!!!

Buddy Blair

unread,
Apr 7, 2005, 12:21:40 PM4/7/05
to
All you need to do is specify that your SQL Server Client Network Utility is
using the Named Pipes network protocol rather than TCP/IP. For some reason
the BDE has trouble using integrated security over protocols other than
named pipes.

I hope this helps.

Buddy

"Marina Davydova" <Marina....@chase.com> wrote in message
news:422e2ba6$1...@newsgroups.borland.com...

0 new messages