Help wanted : ASP & SQL

Help wanted : ASP & SQL

Post by Glenn Jacob » Wed, 10 May 2000 04:00:00



I've got a database like this one :

class1            class2            class3
-----------------------------------
item1            group1            vendor1 & country1
item2            group2            vendor3 & country3
item3            group1            vendor2 & country1

The URL would look like :

test2.asp?Cat1='Windows 98'&Cat2='Software'&Cat3='Microsoft & UK'

The script looks like this :

<SCRIPT LANGUAGE=javascript RUNAT=Server>

 function VRARecordset1_onbeforeopen() {
  newSQL = "SELECT * FROM Prijslijst WHERE (Class1 = " + Request("Cat1") +
") AND (Class2 = " + Request("Cat2") + ") AND (Class3 = " + Request("Cat3")
+ " ) ";
  VRARecordset1.setSQLText(newSQL);
 }
</script>

The problem is :
The things that use the "&" won't show up and give errors. I don't have the
possibility to change the database. Is there a working solution for this
problem ?

Thanks,

Glenn Jacobs

 
 
 

Help wanted : ASP & SQL

Post by Ted Lin » Wed, 10 May 2000 04:00:00


Hello Glenn

I think your problem is asp/html not sqlserver.

 As far as I know you can't use quotes etc in a url you must put + signs
instead of spaces so

test2.asp?Cat1='Windows 98'&Cat2='Software'&Cat3='Microsoft & Uk

should be

test2.asp?Cat1=Windows+98'&Cat2=Software&Cat3=Microsoft++UK

you will also have to use the decimal code for the ampersand &' which I
can't remember. There is also some functions in asp that correctly create
the URL from a string which you can use.

Hope this helps.

Ted.

 
 
 

1. Help wanted on APT && C++

I was trying to compile the aptlib file using C++ compiler. It was giving the following
errors. I tried using extern "C", but it doesnot seem to work.

Thanks

Raju

***********************************************************************************
"a.cc", line 24: warning: old style definition of main() (anachronism)
"a.cc", line 38: error:  undefined function fsinit called
"a.cc", line 45: error: unexpected  1 argument for fsopenscreen()
"a.cc", line 47: error: unexpected  1 argument for fsdblogin()
"a.cc", line 52: error: unexpected  1 argument for fsdbrec()
"a.cc", line 53: error: unexpected  1 argument for fsdbenviron()
"a.cc", line 68: error: unexpected  1 argument for fsgetform()
"a.cc", line 71: error: unexpected  1 argument for dbclose()
"a.cc", line 72: error: unexpected  1 argument for fsabort()
"a.cc", line 76: error: unexpected  1 argument for fsinstallproc()
"a.cc", line 78: error: unexpected  1 argument for fsprocargs()
"a.cc", line 82: error: unexpected  1 argument for fscallform()
"a.cc", line 84: error: unexpected  1 argument for dbclose()
"a.cc", line 86: error:  undefined function fsexit called
"a.cc", line 96: error:  argument declaration syntax
***************************************************************************

2. NJ Delphi Position

3. help wanted jr asp,vb,db,html dude

4. backup to a network disk

5. WANTED: VisualBasic, SQL and ASP Programmer

6. MSXML Send from SQL

7. ASP SQL Consultant wanted

8. join with criteria

9. ASP SQL consultant wanted

10. ASP, SQL Consultant Wanted

11. asp/sql developer wanted for contract work

12. SQL/ASP Consultant Wanted

13. ASP/SQL Consultant Wanted