BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Howto specify password for MS-SQL 2000 from BDE

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Ingo Zettl
Guest





PostPosted: Tue May 11, 2004 11:38 pm    Post subject: Howto specify password for MS-SQL 2000 from BDE Reply with quote



Hi!

I'm trying to use an MS SQL Database from a C++ Builder 6/BDE
application.

I created an ODBC datasource that is working fine, I can connect
from BDE Administrator or SQL explorer by manually specifying
user name and password on login. (For some internal reasons
we're required to use SQL server authentication, not windows
authentication and as the ODBC data source can't store
user name and password it's required to specify these at logon).

How can I connect to this database from my application?
My code looks like

database = new TDatabase(0);
database->DatabaseName = "Test-MSSQL";
database->Params->Add("USER NAME=Ingo");
database->Params->Add("PASSWORD=Test");

What I get is

error info: User name or password unknown
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'Ingo'.
Alias: monitoring-mssql

It seems the user specified with "USER NAME" is ok, but
somehow the password is not passed to the ODBC driver.

(When using Windows authentication everything works fine, but
this approach is not possible).

- Does anyone know how to specify the password correctly to open
an ODBC Database?
- Can someone tell me about SQLMSS32.DLL (I suppose this should
be the native BDE driver to MS SQL server) I don't find it on
my machine (BCB6 Pro), is this dll included in BCB6 Ent or
how can I get it?

kind regards

Ingo Zettl
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.