Asp ODBC not holding password

View: New views
4 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:29:38
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/29
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:29
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.29
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Re: Asp ODBC not holding password

by Marlon Moyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As far as I know, the ODBC datasource will not store a
username/password.  The option is only there so that you can change
default db,etc. in the datasource itself.  Even back in the CF5 days
you had to specify a username/password for existing ODBC connections.

Marlon


On 6/1/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:29:39
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/29
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:29
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.29
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Re: Asp ODBC not holding password

by Michael Dinowitz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

so in an asp program, you must always specify the username/password for a connection to a DB?
Man, that alone is a reason to move to CF.

>As far as I know, the ODBC datasource will not store a
>username/password.  The option is only there so that you can change
>default db,etc. in the datasource itself.  Even back in the CF5 days
>you had to specify a username/password for existing ODBC connections.
>
>Marlon
>
>
>On 6/1/05, Michael Dinowitz <mdinowit@...> wrote:
>>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:29:40
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/29
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:29
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.29
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Re: Asp ODBC not holding password

by cj sutton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's what I was going to do.  But I searched the
world over to find a free CF webhosting site and found
nary a one.  I even wouldn't have minded space
limitations!  So if you find  a free CF web hosting
site, please do let me know!  

Thanks!

ps  Oh I did find one if I was a member of the UK.
Talk about discrimination!

--- Michael Dinowitz <mdinowit@...>
wrote:

> so in an asp program, you must always specify the
> username/password for a connection to a DB?
> Man, that alone is a reason to move to CF.
>
> >As far as I know, the ODBC datasource will not
> store a
> >username/password.  The option is only there so
> that you can change
> >default db,etc. in the datasource itself.  Even
> back in the CF5 days
> >you had to specify a username/password for existing
> ODBC connections.
> >
> >Marlon
> >
> >
> >On 6/1/05, Michael Dinowitz
> <mdinowit@...> wrote:
> >>
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get help! RoboHelp
http://www.houseoffusion.com/banners/view.cfm?bannerid=58

Message: http://www.houseoffusion.com/lists.cfm/link=i:29:41
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/29
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:29
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.29
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
LightInTheBox - Buy quality products at wholesale price!