Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 passing names to query
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 6

laser
Advanced Member

Australia
3859 Posts

Posted - 08 August 2003 :  19:51:09  Show Profile
Check!

Next step :

4) Between the While and Wend lines, create a new line and add this :

Response.Write DisplayMedalIcon(mymedals("member_id"))
mymedals.movenext


It should now be close to working.
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 08 August 2003 :  20:00:10  Show Profile  Visit Alfred's Homepage
Something's orking - at least we're getting error messages again:
quote:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'Member_ID ='.
/BG/forums/decorated3.asp, line 6


Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 08 August 2003 :  20:12:57  Show Profile
Change this line :

strSql = "SELECT * from member_medals WHERE Member_ID = " & Request("id")

to this :

strSql = "SELECT * from member_medals WHERE Member_ID = " & m_id


This is really the code from your inc function file ?? ... I didn't think it would work like that, but as long as it does you're fine.
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 08 August 2003 :  20:41:23  Show Profile  Visit Alfred's Homepage
quote:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required
/BG/forums/decorated3.asp, line 89


The file with the function is called medalsfunction.asp!
Uploaded all 3 files:
http://www.ggholiday.com/bg/forums/decorated3.asp
http://www.ggholiday.com/bg/forums/decorated3.txt
http://www.ggholiday.com/bg/forums/medalsfunction.txt

Alfred
The Battle Group
CREDO

Edited by - Alfred on 08 August 2003 20:45:30
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 08 August 2003 :  20:53:39  Show Profile
arrghhhh, I was hoping we wouldn't get this error but the fix is simple.

On these lines ONLY:

82, 84, 86,88, 89, 93, 94

change "mymedals" to "member_medals"


It looks like you altered the function you pasted in before, but it looks ok now.
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 08 August 2003 :  22:07:28  Show Profile  Visit Alfred's Homepage
Wow, that shows a string of medals now, but no names with them!

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 08 August 2003 :  22:21:48  Show Profile
PERFECT now change :

Response.Write DisplayMedalIcon(member_medals("member_id"))

to this :

Response.Write member_medals("m_name") & " " & DisplayMedalIcon(member_medals("member_id")) & "<br>"
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 08 August 2003 :  22:44:34  Show Profile  Visit Alfred's Homepage
We must be close, but it still lists the names more than once!

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 08 August 2003 :  23:06:42  Show Profile
5) in the SQL statement that was originally there, change this line :

strSql = "SELECT M.MEMBER_ID, M.MEDAL_ID, M1.M_NAME " & _

to this

strSql = "SELECT DISTINCT M.MEMBER_ID, M1.M_NAME " & _
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 08 August 2003 :  23:47:30  Show Profile  Visit Alfred's Homepage
You did mean on line 79, right?
quote:
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
/BG/forums/decorated3.asp, line 80
'strSql = "SELECT M.MEMBER_ID, M.MEDAL_ID, M1.M_NAME " & _

Alfred
The Battle Group
CREDO

Edited by - Alfred on 08 August 2003 23:52:27
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 09 August 2003 :  00:04:30  Show Profile
You can't comment the line following a line continuation, so delete the commented line, or swap the order
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 09 August 2003 :  11:16:11  Show Profile  Visit Alfred's Homepage
Oh, I see.
So much to learn - so little time!

Well, it looks like you did it!
We got each name listed once, and all medals that belong to it!

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 09 August 2003 :  17:49:29  Show Profile
There are a few little things to clean up, but no biggies and nothing that will affect the page at all.
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 09 August 2003 :  19:47:23  Show Profile  Visit Alfred's Homepage
You mean code-cosmetically, right?
Well, nobody expects clean code on my site I guess.

I think now that you have laid out the stucture I can play around with the size and formatting a bit before I get stuck again.

Thanks a heap for now, laser!

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 09 August 2003 :  20:02:25  Show Profile
As I said, little things, and everything works so you may not want to play with it at all, but the maintenance when you add medals is not the best. I don't mean medal-member links, I mean making a new medal available.
Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07