DSN Less Connection Help

DSN Less Connection Help

am 10.03.2006 12:22:48 von Simon Gare

Can anyone help me create a dsn less connection to the sql server 2005 db
from the connection.asp file below please,

<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_TobiasNET_STRING
MM_TobiasNET_STRING = "dsn=TobiasNET;uid=sa;pwd=*******;"
%>

Need detailed explanation if poss or even better an example.

Regards
Simon

Re: DSN Less Connection Help

am 10.03.2006 12:53:57 von reb01501

SIMON GARE wrote:
> Can anyone help me create a dsn less connection to the sql server
> 2005 db from the connection.asp file below please,
>
> <%
> ' FileName="Connection_odbc_conn_dsn.htm"
> ' Type="ADO"
> ' DesigntimeType="ADO"
> ' HTTP="true"
> ' Catalog=""
> ' Schema=""
> Dim MM_TobiasNET_STRING
> MM_TobiasNET_STRING = "dsn=TobiasNET;uid=sa;pwd=*******;"
> %>
>
You have not provided your server's name, or your database name.

Worse, you have committed the unpardonable sin of proposing to use your
server's sa account in a client application. At least you censored the
password! We've had a few cases where people have posted the password for
their sq account!!

Anyways, you must guard that sa account as if your server, network and job
depended on it. NEVER use that account in client applications! ALWAYS create
an account with the fewest privileges required to allow it to perform the
functions required by the client application, and use that account instead
of sa.

Anyways, for help creating a connection string after you create the new sql
login account:
http://www.aspfaq.com/show.asp?id=2126

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"