 |
| 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
|
|
|
|

June 15th, 2012, 08:12 AM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
uhmm... can I use this one :
<%
End Sub
Sub CheckLogin
Dim Conn, rs, sql
set Conn = server.createobject("adodb.connection")
Conn.Open "DSN=datasource;UID=user;PWD=password;Database=dat abase"
sql = "SELECT * FROM CarInfo WHERE EmpId = '"&username&"'"
...
...
instead of :
Conn.Open "Provider=sqloledb;Data Source=dsource;" & _
"Initial Catalog=catalog;User Id=id;Password=password;" ?
thank you,
Paula
|
|

June 15th, 2012, 09:23 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
uhmm... can I use this one :
|
Why don't you try it out? You can actually test it and see if it works; I can only see if it looks valid....
Imar
|
|

June 15th, 2012, 08:27 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
I tried the:
Conn.Open "DSN=datasource;UID=user;PWD=password;Database=dat abase"
When I try to login, wether I input the correct username and password or not,
the "Login Failed" message appears..
then..
I tried:
Conn.Open "Provider=sqloledb;Data Source=(local);" & _
"Initial Catalog=catalog;User Id=id;Password=password;"
Still..
When I try to login, wether I input the correct username and password or not,
the "Login Failed" message appears..
Thank you Imar,
Paula
|
|

June 16th, 2012, 03:27 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Paula,
Posting the same type of error description over and over again isn't going to help much. You need to debug this your self and see what happens. Use Response.Write to write the flow through the code (e.g. in your various If statements, in the code that accesses the database, your SQL statement etc. Otherwise, this is never going to work.
By seeing how your program flows, you'll hopefully be able to see where it fails.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

June 17th, 2012, 10:54 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Hi Imar!..
I've done it!!.. My login page is finally working!!.. Thank you so much to you!!..
you're a big big help!!..
Cheers,
Paula
|
|
 |