Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 URLEncoding Variables WITHIN an SQL Query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-02 : 09:05:17
Ralph writes "We're buiding a database-driven Website using Flash/Generator/SQL Server 7/ASP. The site is hosted on a Windows NT Server. Everything works fine when viewing in Internet Explorer, however Netscape has a problem whenever we pass it a variable whose value contain spaces (data types varchar, smalldate). It WILL accept those same values IF they are "URLEncode"d. All the parameters need to be passed to the Flash Page with a SINGLE query... so if it's receiving variables from another Flash page (which has UN-"URLEncode"d the variable value) the variable must be RE-"URLEncode"d WITHIN the receiving Query.
ie
SELECT * FROM Names WHERE Name = " & Server.URLEncode(variable) & " ORDER BY Name

I realize that this is not REALLY an SQL-esque question, so much as a ? but...

All we really need to do to make it work is to ensure that any spaces in the variable are replaced with "+" but Flash doesn't provide us with a method for doing that and I'm hoping SQL DOES!

ANY ideas..."
   

- Advertisement -