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 June 15th, 2012, 08:12 AM
Registered User
 
Join Date: Jun 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Question

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
 
Old June 15th, 2012, 09:23 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 15th, 2012, 08:27 PM
Registered User
 
Join Date: Jun 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Question

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
 
Old June 16th, 2012, 03:27 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
paulapaupau (June 17th, 2012)
 
Old June 17th, 2012, 10:54 PM
Registered User
 
Join Date: Jun 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Thumbs up

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot log in brianrodda ASP.NET 2.0 Basics 1 July 15th, 2008 09:02 AM
How to log to server's event log LenexaKS Access VBA 4 March 11th, 2008 12:49 PM
Can't get Log to write the Log.txt file jnbutler BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 3 July 31st, 2007 04:04 AM
Log out neil.abachi07 Classic ASP Basics 67 March 9th, 2007 07:02 AM
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM





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