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 February 2nd, 2007, 02:34 PM
Authorized User
 
Join Date: Jan 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Add a space after FROM
now:
strSQL = "SELECT * FROM" & tablename

change to:
strSQL = "SELECT * FROM " & tablename



 
Old February 2nd, 2007, 02:34 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Its not. Your syntax is incorrect. FROMbigcardtable isnt a SQL command, FROM bigcardtable is.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
 
Old February 2nd, 2007, 02:37 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK. Now I get this error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/test.asp, line 19

I think this means that somewhere I need to define what rsgameused is. You see, it should "link" to a query called gameusedquery in my Access database. I see nothing in my code that does this. Is that the problem?

Now is the only thing that's real.
 
Old February 2nd, 2007, 02:40 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I may, it's interesting to note that we are now stuck on the same line of code for this "test" file as with my real website. That,in theory, should mean the problem is with this line. But what is it?

Now is the only thing that's real.
 
Old February 2nd, 2007, 02:44 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Holy ************************!!
I was fooling around with the gameused.asp file.
It works!! Sort of....
It will finally display my page, but not the items I want. I only want it to show items with the Category being GameUsed.
Do I just have to add that on to my SELECT * FROM string?????

Now is the only thing that's real.
 
Old February 2nd, 2007, 02:49 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Your error was probably because you didnt add a Server.MapPath() in the second connection string that I supplied above.

SELECT * from table where category = 'GameUsed'

will return your used games.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
 
Old February 2nd, 2007, 02:49 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wow! I seem to have fixed the SELECT * FROM. I just added a WHERE and it seems to work. However,... I might as well go for broke.
How can I have it sort Alphabetically????

Now is the only thing that's real.
 
Old February 2nd, 2007, 02:52 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

SELECT name FROM table where Category = 'GameUsed' Order By name ASC

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
 
Old February 2nd, 2007, 02:55 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, now one step back. Remeber how I said it worked? Well...
I am trying to view on the net and as a preview in Dreamweaver, but all I get is a loading screen. It's been 3 or 4 minutes. Why might this be happening all of a sudden?

Now is the only thing that's real.
 
Old February 2nd, 2007, 02:58 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Let's try this again. the unending load is gone, replaced by another error. I think I know the cause. I want to only display item in the GameUsed Category, but sorted alphabetically by PlayerName. How would that work?

Now is the only thing that's real.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Access Database Query panuvin Javascript How-To 28 May 9th, 2008 01:53 PM
Displaying query from three tables slims07 .NET Framework 2.0 8 April 2nd, 2008 10:47 AM
Displaying data from access database [email protected] Classic ASP Basics 1 January 24th, 2006 06:35 PM
displaying the query lanita PHP How-To 6 August 23rd, 2004 11:11 PM
Database access from java, INSERT query problem nitusincog BOOK: Beginning Java 2 1 July 21st, 2003 10:26 AM





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