The old parameter syntax `{param}` is no longer supported
Neo4J
Neo4J is a graph database that has been used a lot now a days. It supports many framework including .Net. So sometimes while working with .net framework you may recieve syntax error while executing query. So for example the query is
MATCH (a:Person)-[:ACTED_IN]->(m:Movie) RETURN m.title as movie, collect(a.name) as cast LIMIT {limit}
Now, when you try to execute the query in asp.net. You will get a exception saying
The old parameter syntax `{param}` is no longer supported. Please use `$param` instead (line 1, column 96 (offset: 95)) "MATCH (a:Person)-[:ACTED_IN]->(m:Movie) RETURN m.title as movie, collect(a.name) as cast LIMIT {limit}"
This error comes because of the syntax of the query we are using for parameters was supported by old versions. So the incorrect syntax is {parameter} as in new versions we have to write $parameter. So the correct query will be
MATCH (a:Person)-[:ACTED_IN]->(m:Movie) RETURN m.title as movie, collect(a.name) as cast LIMIT $limit
So, now have a look at the limit parameter in the end. We have used $limit. As that syntax is supported by new versions of Neo4J Driver. Now run the application and you will not face the error The old parameter syntax `{param}` is no longer supported. Please use `$param` instead. So this is how we will solve Neo4J driver syntax issue The old parameter syntax `{param}` is no longer supported in Asp.net.