Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2004, 11:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Have you granted database-access and (at the very least) select-permissions to the IUSR_machinename user in MSSQL?

The reason that the ODBC-test is working but your code isn't could be that the ODBC-test runs with YOUR privileges - that is, the account you used to log on to Windows. ASP has it's own account, named IUSR_thenameofyourcomputer...

Good sites for learning ASP:
msdn.microsoft.com
www.4guysfromrolla.com

For COOL SQL-tricks, do a Google on "Joe Celko"...

 
Old December 5th, 2004, 11:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sorry about that. Something went in my mind that he is using Access. It think connectionstrings.com site doesn't open up for a long time. not sure if I am alone facing that problem or the site has been moved.

You can also try this.

Using OLEDB provider. For Standard Security

oConn.Open "Provider=sqloledb;" & _
         "Data Source=myServerName;" & _
         "Initial Catalog=myDatabaseName;" & _
         "User Id=myUsername;" & _
         "Password=myPassword"

Or check out this link. - http://www.able-consulting.com/MDAC/...erForSQLServer

Using ODBC driver. For Standard Security

oConn.Open "Driver={SQL Server};" & _
         "Server=MyServerName;" & _
         "Database=myDatabaseName;" & _
         "Uid=myUsername;" & _
         "Pwd=myPassword"

http://www.able-consulting.com/MDAC/...erForSQLServer

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old December 7th, 2004, 11:50 AM
Authorized User
 
Join Date: Dec 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hai
  if u want to use DSN to connect database in asp. u must create system dsn instead of user dsn.

bye.

 
Old December 7th, 2004, 03:55 PM
Authorized User
 
Join Date: Jun 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:):) Thanks to all the hearts who help me :):)
After followings all of your advices finally I was able to connect with SQL server. The following code worked for me:

Using ODBC driver. For Standard Security

oConn.Open "Driver={SQL Server};" & _
           "Server=MyServerName;" & _
           "Database=myDatabaseName;" & _
           "Uid=myUsername;" & _
           "Pwd=myPassword"

but OLEDB provider is still not working

Further I have questions:
-------------------------
1) What is the difference between User DSN and System DSN?

2) What is the difference between ODBC and OLEDB?

3) I want to do my College project in ASP with SQL Server which type of Connection to use (ODBC or OLEDB). Which is safer and faster?

Any replies appreciated. Once again thanks to all who helped me.

Arul Kumar.PA





Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP/1.1 500 Internal Server Error Dmitriy General .NET 0 February 26th, 2008 04:50 PM
Http/1.1 500 Internal Server Error abinashpatra ASP.NET 1.0 and 1.1 Basics 17 May 10th, 2007 02:06 AM
HTTP 500 - Internal server error helmsly BOOK: Beginning ASP 3.0 11 November 8th, 2006 03:15 AM
HTTP 500: Internal Server Error cyberddindia Classic ASP Databases 4 October 5th, 2006 11:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.