Asp ODBC not holding password

View: New views
2 Messages — Rating Filter:   Alert me  

Asp ODBC not holding password

by Michael Dinowitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is an IIS 6/ASP thing. I've got an ODBC datasource set up and an open command opening up the connection. I've set the username/password for the SQL database in the ODBC, but when I call it the code acts like the username/password was never set.

This code works:
Set Conn = Server.CreateObject("ADODB.Connection")
conn.open "affiliate", "username", "password"

This code does not

Set Conn = Server.CreateObject("ADODB.Connection")
conn.open "affiliate"

Is there something missing to 'force' the username/password to be stored in the ODBC so that I don't have to have it in code? It should be simple but for some reason is not being kind to me.
Thanks



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:44:1624
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/44
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:44
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.44
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Re: Asp ODBC not holding password

by Frank Mamone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The way I understand it is that the username/password in the ODBC is
used only to test the config. Someone correct me if I'm wrong.

You can use a DSNless connection with ASP.NET and use a trusted
connection to avoid the password in your code. This of course raises
other security concerns.

- Frank


On 5/31/05, Michael Dinowitz <mdinowit@...> wrote:

> This is an IIS 6/ASP thing. I've got an ODBC datasource set up and an open command opening up the connection. I've set the username/password for the SQL database in the ODBC, but when I call it the code acts like the username/password was never set.
>
> This code works:
> Set Conn = Server.CreateObject("ADODB.Connection")
> conn.open "affiliate", "username", "password"
>
> This code does not
>
> Set Conn = Server.CreateObject("ADODB.Connection")
> conn.open "affiliate"
>
> Is there something missing to 'force' the username/password to be stored in the ODBC so that I don't have to have it in code? It should be simple but for some reason is not being kind to me.
> Thanks
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:44:1640
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/44
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:44
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.44
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54