Below are a DBI test script and my odbc.ini from my
Linux client.  Target database is a SQL Server 2000 on
Win2K.  Coonection possible via Easysoft ODBC::ODBC
bridge.  My problem is that I can't log in to
the database under the desired user.  My DBI script
gives the following output:
master
guest

If I try to use the commented connect it gives the
same output.

The LOGONUSER of SQL_user, logs in via trusted
connection/Windows authentication and has access to
the devel database, has a default database of master.
The target user has default of devel, and logs in via
SQL server authentication.

If I change SQL_user to have default of "devel" then
the DBI script says:
devel
SQLUser

But, I still can't get to user test.  See anything
wrong?

------ User_test.pl ------
use DBI;

my $hDB = DBI->connect( "DBI:ODBC:HOMER" )
        or die $DBI::errstr;
#my $hDB = DBI->connect(
"DBI:ODBC:HOMER;TargetUser=test;TargetAuth=password;DBN=devel"
)
#       or die $DBI::errstr;

my @a = $hDB->selectrow_array( "select db_name()" );
print join( "\t", @a ) , "\n";

my @b = $hDB->selectrow_array( "select user_name()" );
print join( "\t", @b ) , "\n";


------- odbc.ini ------
[demo]
Driver  = OOB
SERVER  = demo.easysoft.com
PORT  = 8888
TRANSPORT    = tcpip
TARGETDSN    = pubs
LOGONUSER    = demo
LOGONAUTH    = easysoft
TargetUser   = demo
TargetAuth   = easysoft

[HOMER]
Driver  = OOB
SERVER  = homer.odyssey.local
PORT  = 8888
TRANSPORT    = tcpip
TARGETDSN    = HOMER_SQL
LOGONUSER    = SQLUser
LOGONAUTH    = password
TargetUser   = test
TargetAuth   = password






__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Reply via email to