all groups > sql server connect > february 2004 >
You're in the

sql server connect

group:

DSN less connection fro ASP pages


DSN less connection fro ASP pages namita
2/25/2004 1:43:59 PM
sql server connect:
I have installed Microsoft SQL server 2000 on a server.
My web server is having windows NT having all asp pages.
I want to connect to SQL Server 2000 using a DSN less
connection for my asp pages. Could anyone help me with
that?

Also, if I try to create system DSN on windows NT, it
gives me an error message and does not create DSN. What
could be the reason?

Thanks
Re: DSN less connection fro ASP pages Sue Hoegemeier
2/25/2004 9:20:46 PM
The syntax depends on whether you are using OLE DB or ODBC,
it you are connecting using a standard SQL login or Windows
Authentication, etc. You can find sample ADO connection
strings which cover different scenarios at:
http://www.able-consulting.com/ADO_Conn.htm

The problem creating the DSN would depend on what the error
message is that you are receiving - it's hard to say without
more information about the error.

-Sue

On Wed, 25 Feb 2004 13:43:59 -0800, "namita"
[quoted text, click to view]
Re: DSN less connection fro ASP pages Ayaz Ahmed
3/19/2004 9:58:44 PM
Hello,

<%
set conn1=server.CreateObject("adodb.connection")
conn1.cursorlocation=3
conn1.Open "Provider=sqloledb;" & _
"Data Source=Server;" & _
"Initial Catalog=DB;" & _
"User Id=ayaz;" & _
"Password=ayaz"

%>


and also

try this one too.


conn1.open "dsn=ayaz;uid=ayaz;pwd=ayaz;DATABASE=ayaz;APP=ASP Script"


i hope its will help you , if any problem then email me.


Thanks,


Warm Regards,

Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414

*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button