LamonteCristo LamonteCristo - 1 month ago 19
SQL Question

How are special characters handled in an oData query?

How is the & symbol handled in the following query in oData?

/vendordataservice.svc/vDataMapper_SourceMapVendor?&$filter=startswith(ParentName,'AT&T')&$top=7&$skip=0


I'm using EF3.5 and SQL2008. When I send that to my oData service I get no data back.

Answer

Here is a list of characters that should be encoded prior to sending to SQL server over HTTP:

http://msdn.microsoft.com/en-us/library/aa226544(SQL.80).aspx

Yes, the '&' symbol is one of them.